]> git.baikalelectronics.ru Git - kernel.git/commit
ASoC: soc-pcm: BE dai needs prepare when pause release after resume
authorLibin Yang <libin.yang@intel.com>
Wed, 8 May 2019 02:32:41 +0000 (10:32 +0800)
committerMark Brown <broonie@kernel.org>
Mon, 13 May 2019 11:38:16 +0000 (12:38 +0100)
commit0e25f8be60f67a3c15ae66c312ba20582f5051d5
tree0778cdb4d7979feed40357f0bb0627e41bbb8d46
parentd034ca2f29dbc66f77101c44029e33d43f36c165
ASoC: soc-pcm: BE dai needs prepare when pause release after resume

If playback/capture is paused and system enters S3, after system returns
from suspend, BE dai needs to call prepare() callback when playback/capture
is released from pause if RESUME_INFO flag is not set.

Currently, the dpcm_be_dai_prepare() function will block calling prepare()
if the pcm is in SND_SOC_DPCM_STATE_PAUSED state. This will cause the
following test case fail if the pcm uses BE:

playback -> pause -> S3 suspend -> S3 resume -> pause release

The playback may exit abnormally when pause is released because the BE dai
prepare() is not called.

This patch allows dpcm_be_dai_prepare() to call dai prepare() callback in
SND_SOC_DPCM_STATE_PAUSED state.

Signed-off-by: Libin Yang <libin.yang@intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
sound/soc/soc-pcm.c