From: 이경택 <gt82.lee@samsung.com>
To: <lgirdwood@gmail.com>, <broonie@kernel.org>, <tiwai@suse.com>
Cc: alsa-devel@alsa-project.org
Subject: [PATCH 1/1] ASoC: soc-compress: lock pcm_mutex to resolve lockdep error
Date: Thu, 26 Mar 2020 17:46:07 +0900 [thread overview]
Message-ID: <000101d6034a$fe37c7a0$faa756e0$@samsung.com> (raw)
In-Reply-To: CGME20200326084608epcas2p32239121f201613573e7dd86c3172a29f@epcas2p3.samsung.com
snd_soc_runtime_activate() and snd_soc_runtime_deactivate()
require pcm_mutex lock.
Signed-off-by: Gyeongtaek Lee <gt82.lee@samsung.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 392a1c5b15d3..42d416ac7e9b 100644
--- a/sound/soc/soc-compress.c
+++ b/sound/soc/soc-compress.c
@@ -207,7 +207,9 @@ static int soc_compr_open_fe(struct snd_compr_stream
*cstream)
fe->dpcm[stream].state = SND_SOC_DPCM_STATE_OPEN;
fe->dpcm[stream].runtime_update = SND_SOC_DPCM_UPDATE_NO;
+ mutex_lock_nested(&fe->pcm_mutex, fe->pcm_subclass);
snd_soc_runtime_activate(fe, stream);
+ mutex_unlock(&fe->pcm_mutex);
mutex_unlock(&fe->card->mutex);
@@ -285,7 +287,9 @@ static int soc_compr_free_fe(struct snd_compr_stream
*cstream)
else
stream = SNDRV_PCM_STREAM_CAPTURE;
+ mutex_lock_nested(&fe->pcm_mutex, fe->pcm_subclass);
snd_soc_runtime_deactivate(fe, stream);
+ mutex_unlock(&fe->pcm_mutex);
fe->dpcm[stream].runtime_update = SND_SOC_DPCM_UPDATE_FE;
--
2.21.0
next parent reply other threads:[~2020-03-26 8:47 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <CGME20200326084608epcas2p32239121f201613573e7dd86c3172a29f@epcas2p3.samsung.com>
2020-03-26 8:46 ` 이경택 [this message]
2020-03-30 1:22 ` [PATCH 1/1] ASoC: soc-compress: lock pcm_mutex to resolve lockdep error 이경택
2020-03-30 10:33 ` Mark Brown
[not found] <CGME20200330110126epcas2p4525e5c6f61f7452df008696f9153770d@epcas2p4.samsung.com>
2020-03-30 11:01 ` 이경택
2020-03-30 11:47 ` Vinod Koul
2020-03-31 1:54 ` 이경택
2020-04-02 2:44 ` Gyeongtaek Lee
2020-04-03 7:55 ` Vinod Koul
2020-04-09 1:32 ` Gyeongtaek Lee
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to='000101d6034a$fe37c7a0$faa756e0$@samsung.com' \
--to=gt82.lee@samsung.com \
--cc=alsa-devel@alsa-project.org \
--cc=broonie@kernel.org \
--cc=lgirdwood@gmail.com \
--cc=tiwai@suse.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox