aboutsummaryrefslogtreecommitdiff
path: root/sound
diff options
context:
space:
mode:
authorShalini Manjunatha2024-03-06 16:23:20 +0530
committerMark Brown2024-03-18 14:41:51 +0000
commit9a8b202f8cb7ebebc71f1f2a353a21c76d3063a8 (patch)
tree0ceb8fe95c15907c74aed2441bde8927383b200e /sound
parentf107ffcaa01f15fcd87069a42ffb35f218ce7a39 (diff)
ASoC: soc-compress: Fix and add DPCM locking
We find mising DPCM locking inside soc_compr_set_params_fe before calling dpcm_be_dai_hw_params() and dpcm_be_dai_prepare() which cause lockdep assert for DPCM lock not held in __soc_pcm_hw_params() and __soc_pcm_prepare() Signed-off-by: Shalini Manjunatha <quic_c_shalma@quicinc.com> Link: https://msgid.link/r/d985beeafdd32316eb45f20811eb7926da7a796e.1709720380.git.quic_c_shalma@quicinc.com Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'sound')
-rw-r--r--sound/soc/soc-compress.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/sound/soc/soc-compress.c b/sound/soc/soc-compress.c
index a38fee48ee00..e692aa3b8b22 100644
--- a/sound/soc/soc-compress.c
+++ b/sound/soc/soc-compress.c
@@ -385,11 +385,15 @@ static int soc_compr_set_params_fe(struct snd_compr_stream *cstream,
fe->dpcm[stream].runtime_update = SND_SOC_DPCM_UPDATE_FE;
+ snd_soc_dpcm_mutex_lock(fe);
ret = dpcm_be_dai_hw_params(fe, stream);
+ snd_soc_dpcm_mutex_unlock(fe);
if (ret < 0)
goto out;
+ snd_soc_dpcm_mutex_lock(fe);
ret = dpcm_be_dai_prepare(fe, stream);
+ snd_soc_dpcm_mutex_unlock(fe);
if (ret < 0)
goto out;