[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <d985beeafdd32316eb45f20811eb7926da7a796e.1709720380.git.quic_c_shalma@quicinc.com>
Date: Wed, 6 Mar 2024 16:23:20 +0530
From: Shalini Manjunatha <quic_c_shalma@...cinc.com>
To: Vinod Koul <vkoul@...nel.org>, Liam Girdwood <lgirdwood@...il.com>,
Mark Brown <broonie@...nel.org>, Jaroslav Kysela <perex@...ex.cz>,
Takashi Iwai <tiwai@...e.com>,
Raghu Bankapur <quic_rbankapu@...cinc.com>,
alsa-devel@...a-project.org, linux-sound@...r.kernel.org,
Shalini Manjunatha <quic_c_shalma@...cinc.com>,
linux-kernel@...r.kernel.org
Cc: Krishna Jha <quic_kkishorj@...cinc.com>
Subject: [PATCH V0 1/1] 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@...cinc.com>
---
sound/soc/soc-compress.c | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/sound/soc/soc-compress.c b/sound/soc/soc-compress.c
index a38fee4..e692aa3 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;
--
2.7.4
Powered by blists - more mailing lists