Skip to content

Commit 9a8b202

Browse files
Shalini Manjunathabroonie
authored andcommitted
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>
1 parent f107ffc commit 9a8b202

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

sound/soc/soc-compress.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -385,11 +385,15 @@ static int soc_compr_set_params_fe(struct snd_compr_stream *cstream,
385385

386386
fe->dpcm[stream].runtime_update = SND_SOC_DPCM_UPDATE_FE;
387387

388+
snd_soc_dpcm_mutex_lock(fe);
388389
ret = dpcm_be_dai_hw_params(fe, stream);
390+
snd_soc_dpcm_mutex_unlock(fe);
389391
if (ret < 0)
390392
goto out;
391393

394+
snd_soc_dpcm_mutex_lock(fe);
392395
ret = dpcm_be_dai_prepare(fe, stream);
396+
snd_soc_dpcm_mutex_unlock(fe);
393397
if (ret < 0)
394398
goto out;
395399

0 commit comments

Comments
 (0)