Thread (2 messages) read the whole thread 2 messages, 2 authors, 2015-10-28

[PATCH] ASoC: dpcm: Make BE prepare possible in suspend state

From: liam.r.girdwood@linux.intel.com (Liam Girdwood)
Date: 2015-10-28 08:34:34
Also in: alsa-devel, linux-mediatek, lkml

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 <redacted>
Acked-by: Liam Girdwood <liam.r.girdwood@linux.intel.com>
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help