* [PATCH V0 1/1] ASoC: soc-compress: Fix and add DPCM locking
2024-03-06 10:53 [PATCH V0 0/1] ASoC: soc-compress: Fix and add missing DPCM locking Shalini Manjunatha
@ 2024-03-06 10:53 ` Shalini Manjunatha
2024-03-06 13:03 ` [PATCH V0 0/1] ASoC: soc-compress: Fix and add missing " Mark Brown
` (2 subsequent siblings)
3 siblings, 0 replies; 6+ messages in thread
From: Shalini Manjunatha @ 2024-03-06 10:53 UTC (permalink / raw)
To: Vinod Koul, Liam Girdwood, Mark Brown, Jaroslav Kysela,
Takashi Iwai, Raghu Bankapur, alsa-devel, linux-sound,
Shalini Manjunatha, linux-kernel
Cc: Krishna Jha
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>
---
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
^ permalink raw reply [flat|nested] 6+ messages in thread* Re: [PATCH V0 0/1] ASoC: soc-compress: Fix and add missing DPCM locking
2024-03-06 10:53 [PATCH V0 0/1] ASoC: soc-compress: Fix and add missing DPCM locking Shalini Manjunatha
2024-03-06 10:53 ` [PATCH V0 1/1] ASoC: soc-compress: Fix and add " Shalini Manjunatha
@ 2024-03-06 13:03 ` Mark Brown
2024-03-06 14:26 ` Vinod Koul
2024-03-18 17:05 ` Mark Brown
3 siblings, 0 replies; 6+ messages in thread
From: Mark Brown @ 2024-03-06 13:03 UTC (permalink / raw)
To: Shalini Manjunatha
Cc: Vinod Koul, Liam Girdwood, Jaroslav Kysela, Takashi Iwai,
Raghu Bankapur, alsa-devel, linux-sound, linux-kernel,
Krishna Jha
[-- Attachment #1: Type: text/plain, Size: 789 bytes --]
On Wed, Mar 06, 2024 at 04:23:19PM +0530, Shalini Manjunatha wrote:
> 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() in above flow
> when ever we play compress offload audio playback use case.
>
> To fix this issue added DPCM lock and unlock in both places of
> above code flow mentioned.
Please don't send cover letters for single patches, if there is anything
that needs saying put it in the changelog of the patch or after the ---
if it's administrative stuff. This reduces mail volume and ensures that
any important information is recorded in the changelog rather than being
lost.
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH V0 0/1] ASoC: soc-compress: Fix and add missing DPCM locking
2024-03-06 10:53 [PATCH V0 0/1] ASoC: soc-compress: Fix and add missing DPCM locking Shalini Manjunatha
2024-03-06 10:53 ` [PATCH V0 1/1] ASoC: soc-compress: Fix and add " Shalini Manjunatha
2024-03-06 13:03 ` [PATCH V0 0/1] ASoC: soc-compress: Fix and add missing " Mark Brown
@ 2024-03-06 14:26 ` Vinod Koul
2024-03-06 16:17 ` Mark Brown
2024-03-18 17:05 ` Mark Brown
3 siblings, 1 reply; 6+ messages in thread
From: Vinod Koul @ 2024-03-06 14:26 UTC (permalink / raw)
To: Shalini Manjunatha
Cc: Liam Girdwood, Mark Brown, Jaroslav Kysela, Takashi Iwai,
Raghu Bankapur, alsa-devel, linux-sound, linux-kernel,
Krishna Jha
On 06-03-24, 16:23, Shalini Manjunatha wrote:
> 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() in above flow
> when ever we play compress offload audio playback use case.
where is the patch ?
>
> To fix this issue added DPCM lock and unlock in both places of
> above code flow mentioned.
>
> Shalini Manjunatha (1):
> ASoC: soc-compress: Fix and add DPCM locking
>
> sound/soc/soc-compress.c | 4 ++++
> 1 file changed, 4 insertions(+)
>
> --
> 2.7.4
--
~Vinod
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH V0 0/1] ASoC: soc-compress: Fix and add missing DPCM locking
2024-03-06 14:26 ` Vinod Koul
@ 2024-03-06 16:17 ` Mark Brown
0 siblings, 0 replies; 6+ messages in thread
From: Mark Brown @ 2024-03-06 16:17 UTC (permalink / raw)
To: Vinod Koul
Cc: Shalini Manjunatha, Liam Girdwood, Jaroslav Kysela, Takashi Iwai,
Raghu Bankapur, alsa-devel, linux-sound, linux-kernel,
Krishna Jha
[-- Attachment #1: Type: text/plain, Size: 641 bytes --]
On Wed, Mar 06, 2024 at 07:56:36PM +0530, Vinod Koul wrote:
> On 06-03-24, 16:23, Shalini Manjunatha wrote:
> > 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() in above flow
> > when ever we play compress offload audio playback use case.
>
> where is the patch ?
In reply to the cover letter:
https://lore.kernel.org/lkml/d985beeafdd32316eb45f20811eb7926da7a796e.1709720380.git.quic_c_shalma@quicinc.com/
You do seem to be on CC.
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH V0 0/1] ASoC: soc-compress: Fix and add missing DPCM locking
2024-03-06 10:53 [PATCH V0 0/1] ASoC: soc-compress: Fix and add missing DPCM locking Shalini Manjunatha
` (2 preceding siblings ...)
2024-03-06 14:26 ` Vinod Koul
@ 2024-03-18 17:05 ` Mark Brown
3 siblings, 0 replies; 6+ messages in thread
From: Mark Brown @ 2024-03-18 17:05 UTC (permalink / raw)
To: Vinod Koul, Liam Girdwood, Jaroslav Kysela, Takashi Iwai,
Raghu Bankapur, alsa-devel, linux-sound, linux-kernel,
Shalini Manjunatha
Cc: Krishna Jha
On Wed, 06 Mar 2024 16:23:19 +0530, Shalini Manjunatha wrote:
> 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() in above flow
> when ever we play compress offload audio playback use case.
>
> To fix this issue added DPCM lock and unlock in both places of
> above code flow mentioned.
>
> [...]
Applied to
https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git for-next
Thanks!
[1/1] ASoC: soc-compress: Fix and add DPCM locking
commit: 9a8b202f8cb7ebebc71f1f2a353a21c76d3063a8
All being well this means that it will be integrated into the linux-next
tree (usually sometime in the next 24 hours) and sent to Linus during
the next merge window (or sooner if it is a bug fix), however if
problems are discovered then the patch may be dropped or reverted.
You may get further e-mails resulting from automated or manual testing
and review of the tree, please engage with people reporting problems and
send followup patches addressing any issues that are reported if needed.
If any updates are required or you are submitting further changes they
should be sent as incremental updates against current git, existing
patches will not be replaced.
Please add any relevant lists and maintainers to the CCs when replying
to this mail.
Thanks,
Mark
^ permalink raw reply [flat|nested] 6+ messages in thread