summaryrefslogtreecommitdiff
path: root/arch/sh/boards
diff options
context:
space:
mode:
authorChancel Liu <chancel.liu@nxp.com>2023-09-20 18:36:21 +0300
committerMark Brown <broonie@kernel.org>2023-09-27 12:29:52 +0300
commit3efcb471f871cc095841d411f98c593228ecbac6 (patch)
tree5e66b390f69040acfe78d61b996826f56fb452ab /arch/sh/boards
parentad484cc98f2c7ee8e22f63691562a7abae5a9832 (diff)
downloadlinux-3efcb471f871cc095841d411f98c593228ecbac6.tar.xz
ASoC: soc-pcm.c: Make sure DAI parameters cleared if the DAI becomes inactive
The commit 1da681e52853 ("ASoC: soc-pcm.c: Clear DAIs parameters after stream_active is updated") tries to make sure DAI parameters can be cleared properly through moving the cleanup to the place where stream active status is updated. However, it will cause the cleanup only happening in soc_pcm_close(). Suppose a case: aplay -Dhw:0 44100.wav 48000.wav. The case calls soc_pcm_open()->soc_pcm_hw_params()->soc_pcm_hw_free()-> soc_pcm_hw_params()->soc_pcm_hw_free()->soc_pcm_close() in order. The parameters would be remained in the system even if the playback of 44100.wav is finished. The case requires us clearing parameters in phase of soc_pcm_hw_free(). However, moving the DAI parameters cleanup back to soc_pcm_hw_free() has the risk that DAIs parameters never be cleared if there're more than one stream, see commit 1da681e52853 ("ASoC: soc-pcm.c: Clear DAIs parameters after stream_active is updated") for more details. To meet all these requirements, in addition to do DAI parameters cleanup in soc_pcm_hw_free(), also check it in soc_pcm_close() to make sure DAI parameters cleared if the DAI becomes inactive. Fixes: 1da681e52853 ("ASoC: soc-pcm.c: Clear DAIs parameters after stream_active is updated") Signed-off-by: Chancel Liu <chancel.liu@nxp.com> Link: https://lore.kernel.org/r/20230920153621.711373-2-chancel.liu@nxp.com Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'arch/sh/boards')
0 files changed, 0 insertions, 0 deletions