From: liam.r.girdwood@linux.intel.com (Liam Girdwood)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH] ASoC: dpcm: Make BE prepare possible in suspend state
Date: Wed, 28 Oct 2015 08:34:25 +0000 [thread overview]
Message-ID: <1446021265.2443.3.camel@loki> (raw)
In-Reply-To: <1445998534-38246-1-git-send-email-koro.chen@mediatek.com>
On Wed, 2015-10-28 at 10:15 +0800, Koro Chen wrote:
> During suspend/resume, there is a flow that if a driver does not support
> SNDRV_PCM_INFO_RESUME, it will fail at snd_pcm_resume(), and user space
> can then issue SNDRV_PCM_IOCTL_PREPARE to let audio continue to play.
>
> However, in dpcm_be_dai_prepare() it only allows BEs to be prepared
> in state SND_SOC_DPCM_STATE_HW_PARAMS or SND_SOC_DPCM_STATE_STOP.
> The BE state will then stay in SND_SOC_DPCM_STATE_SUSPEND, consequently
> dpcm_be_dai_shutdown() is skipped in the end of playback and
> be_substream->runtime is not cleared while this runtime is actually freed
> by snd_pcm_detach_substream(). If another suspend comes, a NULL pointer
> dereference will happen in snd_pcm_suspend() when accessing
> BE substream's runtime.
>
> Signed-off-by: Koro Chen <koro.chen@mediatek.com>
Acked-by: Liam Girdwood <liam.r.girdwood@linux.intel.com>
prev parent reply other threads:[~2015-10-28 8:34 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-10-28 2:15 [PATCH] ASoC: dpcm: Make BE prepare possible in suspend state Koro Chen
2015-10-28 8:34 ` Liam Girdwood [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1446021265.2443.3.camel@loki \
--to=liam.r.girdwood@linux.intel.com \
--cc=linux-arm-kernel@lists.infradead.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).