* [PATCH] ASoC: Intel: Skylake: Fix missing check in skl_pcm_trigger
@ 2021-02-15 15:13 Dinghao Liu
2021-02-15 15:28 ` Tom Rix
0 siblings, 1 reply; 3+ messages in thread
From: Dinghao Liu @ 2021-02-15 15:13 UTC (permalink / raw)
To: dinghao.liu, kjlu
Cc: Cezary Rojewski, Pierre-Louis Bossart, Liam Girdwood, Jie Yang,
Mark Brown, Jaroslav Kysela, Takashi Iwai, Kuninori Morimoto,
Gustavo A. R. Silva, Julia Lawall, Tom Rix, alsa-devel,
linux-kernel
When cmd == SNDRV_PCM_TRIGGER_STOP, we should also check
the return value of skl_decoupled_trigger() just like what
we have done in case SNDRV_PCM_TRIGGER_PAUSE_RELEASE.
Signed-off-by: Dinghao Liu <dinghao.liu@zju.edu.cn>
---
sound/soc/intel/skylake/skl-pcm.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/sound/soc/intel/skylake/skl-pcm.c b/sound/soc/intel/skylake/skl-pcm.c
index b1ca64d2f7ea..a5b1f333a500 100644
--- a/sound/soc/intel/skylake/skl-pcm.c
+++ b/sound/soc/intel/skylake/skl-pcm.c
@@ -516,6 +516,9 @@ static int skl_pcm_trigger(struct snd_pcm_substream *substream, int cmd,
return ret;
ret = skl_decoupled_trigger(substream, cmd);
+ if (ret < 0)
+ return ret;
+
if ((cmd == SNDRV_PCM_TRIGGER_SUSPEND) && !w->ignore_suspend) {
/* save the dpib and lpib positions */
stream->dpib = readl(bus->remap_addr +
--
2.17.1
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] ASoC: Intel: Skylake: Fix missing check in skl_pcm_trigger
2021-02-15 15:13 [PATCH] ASoC: Intel: Skylake: Fix missing check in skl_pcm_trigger Dinghao Liu
@ 2021-02-15 15:28 ` Tom Rix
2021-02-19 5:18 ` dinghao.liu
0 siblings, 1 reply; 3+ messages in thread
From: Tom Rix @ 2021-02-15 15:28 UTC (permalink / raw)
To: Dinghao Liu, kjlu
Cc: Cezary Rojewski, Pierre-Louis Bossart, Liam Girdwood, Jie Yang,
Mark Brown, Jaroslav Kysela, Takashi Iwai, Kuninori Morimoto,
Gustavo A. R. Silva, Julia Lawall, alsa-devel, linux-kernel
On 2/15/21 7:13 AM, Dinghao Liu wrote:
> When cmd == SNDRV_PCM_TRIGGER_STOP, we should also check
> the return value of skl_decoupled_trigger() just like what
> we have done in case SNDRV_PCM_TRIGGER_PAUSE_RELEASE.
>
> Signed-off-by: Dinghao Liu <dinghao.liu@zju.edu.cn>
> ---
> sound/soc/intel/skylake/skl-pcm.c | 3 +++
> 1 file changed, 3 insertions(+)
>
> diff --git a/sound/soc/intel/skylake/skl-pcm.c b/sound/soc/intel/skylake/skl-pcm.c
> index b1ca64d2f7ea..a5b1f333a500 100644
> --- a/sound/soc/intel/skylake/skl-pcm.c
> +++ b/sound/soc/intel/skylake/skl-pcm.c
> @@ -516,6 +516,9 @@ static int skl_pcm_trigger(struct snd_pcm_substream *substream, int cmd,
> return ret;
Is there any additional error handling to be done for the
skl_stop_pipe that just happened ?
Tom
>
> ret = skl_decoupled_trigger(substream, cmd);
> + if (ret < 0)
> + return ret;
> +
> if ((cmd == SNDRV_PCM_TRIGGER_SUSPEND) && !w->ignore_suspend) {
> /* save the dpib and lpib positions */
> stream->dpib = readl(bus->remap_addr +
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: Re: [PATCH] ASoC: Intel: Skylake: Fix missing check in skl_pcm_trigger
2021-02-15 15:28 ` Tom Rix
@ 2021-02-19 5:18 ` dinghao.liu
0 siblings, 0 replies; 3+ messages in thread
From: dinghao.liu @ 2021-02-19 5:18 UTC (permalink / raw)
To: Tom Rix
Cc: kjlu, Cezary Rojewski, Pierre-Louis Bossart, Liam Girdwood,
Jie Yang, Mark Brown, Jaroslav Kysela, Takashi Iwai,
Kuninori Morimoto, Gustavo A. R. Silva, Julia Lawall, alsa-devel,
linux-kernel
>
> On 2/15/21 7:13 AM, Dinghao Liu wrote:
> > When cmd == SNDRV_PCM_TRIGGER_STOP, we should also check
> > the return value of skl_decoupled_trigger() just like what
> > we have done in case SNDRV_PCM_TRIGGER_PAUSE_RELEASE.
> >
> > Signed-off-by: Dinghao Liu <dinghao.liu@zju.edu.cn>
> > ---
> > sound/soc/intel/skylake/skl-pcm.c | 3 +++
> > 1 file changed, 3 insertions(+)
> >
> > diff --git a/sound/soc/intel/skylake/skl-pcm.c b/sound/soc/intel/skylake/skl-pcm.c
> > index b1ca64d2f7ea..a5b1f333a500 100644
> > --- a/sound/soc/intel/skylake/skl-pcm.c
> > +++ b/sound/soc/intel/skylake/skl-pcm.c
> > @@ -516,6 +516,9 @@ static int skl_pcm_trigger(struct snd_pcm_substream *substream, int cmd,
> > return ret;
>
> Is there any additional error handling to be done for the
>
> skl_stop_pipe that just happened ?
>
I think the check is enough here.
Regards,
Dinghao
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2021-02-19 5:19 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-02-15 15:13 [PATCH] ASoC: Intel: Skylake: Fix missing check in skl_pcm_trigger Dinghao Liu
2021-02-15 15:28 ` Tom Rix
2021-02-19 5:18 ` dinghao.liu
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).