All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] ASoC: pxa: Remove superfluous locking
@ 2014-02-22 17:44 Lars-Peter Clausen
  2014-02-23  1:51 ` Mark Brown
  0 siblings, 1 reply; 2+ messages in thread
From: Lars-Peter Clausen @ 2014-02-22 17:44 UTC (permalink / raw)
  To: Mark Brown, Liam Girdwood
  Cc: Russell King, alsa-devel, Lars-Peter Clausen, Eric Miao, Haojian Zhuang

The locking here was added in commit 71a295602e ("ASoC: Lock the CODEC in PXA
external jack controls") to protect the DAPM changes that are made inside of
${board}_ext_control() against concurrent updates. The ASoC core was updated in
commit a73fb2df01 ("ASoC: dapm: Use DAPM mutex for DAPM ops instead of codec
mutex") to use a card wide lock rather the CODEC mutex to protect DAPM
operations. We now have proper locking inside ${board}_ext_control() itself, so
taking the CODEC lock can be removed.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
---
 sound/soc/pxa/corgi.c    | 4 ----
 sound/soc/pxa/magician.c | 4 ----
 sound/soc/pxa/poodle.c   | 4 ----
 sound/soc/pxa/spitz.c    | 4 ----
 sound/soc/pxa/tosa.c     | 4 ----
 5 files changed, 20 deletions(-)

diff --git a/sound/soc/pxa/corgi.c b/sound/soc/pxa/corgi.c
index 9d9c8ad..b4db3b9 100644
--- a/sound/soc/pxa/corgi.c
+++ b/sound/soc/pxa/corgi.c
@@ -103,13 +103,9 @@ static int corgi_startup(struct snd_pcm_substream *substream)
 	struct snd_soc_pcm_runtime *rtd = substream->private_data;
 	struct snd_soc_codec *codec = rtd->codec;
 
-	mutex_lock(&codec->mutex);
-
 	/* check the jack status at stream startup */
 	corgi_ext_control(&codec->dapm);
 
-	mutex_unlock(&codec->mutex);
-
 	return 0;
 }
 
diff --git a/sound/soc/pxa/magician.c b/sound/soc/pxa/magician.c
index 31242be..41ab6678 100644
--- a/sound/soc/pxa/magician.c
+++ b/sound/soc/pxa/magician.c
@@ -77,13 +77,9 @@ static int magician_startup(struct snd_pcm_substream *substream)
 	struct snd_soc_pcm_runtime *rtd = substream->private_data;
 	struct snd_soc_codec *codec = rtd->codec;
 
-	mutex_lock(&codec->mutex);
-
 	/* check the jack status at stream startup */
 	magician_ext_control(codec);
 
-	mutex_unlock(&codec->mutex);
-
 	return 0;
 }
 
diff --git a/sound/soc/pxa/poodle.c b/sound/soc/pxa/poodle.c
index c93e138..27c6c03 100644
--- a/sound/soc/pxa/poodle.c
+++ b/sound/soc/pxa/poodle.c
@@ -76,13 +76,9 @@ static int poodle_startup(struct snd_pcm_substream *substream)
 	struct snd_soc_pcm_runtime *rtd = substream->private_data;
 	struct snd_soc_codec *codec = rtd->codec;
 
-	mutex_lock(&codec->mutex);
-
 	/* check the jack status at stream startup */
 	poodle_ext_control(&codec->dapm);
 
-	mutex_unlock(&codec->mutex);
-
 	return 0;
 }
 
diff --git a/sound/soc/pxa/spitz.c b/sound/soc/pxa/spitz.c
index 04dbb5a..a3a13c9 100644
--- a/sound/soc/pxa/spitz.c
+++ b/sound/soc/pxa/spitz.c
@@ -113,13 +113,9 @@ static int spitz_startup(struct snd_pcm_substream *substream)
 	struct snd_soc_pcm_runtime *rtd = substream->private_data;
 	struct snd_soc_codec *codec = rtd->codec;
 
-	mutex_lock(&codec->mutex);
-
 	/* check the jack status at stream startup */
 	spitz_ext_control(&codec->dapm);
 
-	mutex_unlock(&codec->mutex);
-
 	return 0;
 }
 
diff --git a/sound/soc/pxa/tosa.c b/sound/soc/pxa/tosa.c
index 2a4b438..cead165 100644
--- a/sound/soc/pxa/tosa.c
+++ b/sound/soc/pxa/tosa.c
@@ -84,13 +84,9 @@ static int tosa_startup(struct snd_pcm_substream *substream)
 	struct snd_soc_pcm_runtime *rtd = substream->private_data;
 	struct snd_soc_codec *codec = rtd->codec;
 
-	mutex_lock(&codec->mutex);
-
 	/* check the jack status at stream startup */
 	tosa_ext_control(codec);
 
-	mutex_unlock(&codec->mutex);
-
 	return 0;
 }
 
-- 
1.8.0

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] ASoC: pxa: Remove superfluous locking
  2014-02-22 17:44 [PATCH] ASoC: pxa: Remove superfluous locking Lars-Peter Clausen
@ 2014-02-23  1:51 ` Mark Brown
  0 siblings, 0 replies; 2+ messages in thread
From: Mark Brown @ 2014-02-23  1:51 UTC (permalink / raw)
  To: Lars-Peter Clausen
  Cc: Russell King, alsa-devel, Eric Miao, Liam Girdwood, Haojian Zhuang


[-- Attachment #1.1: Type: text/plain, Size: 327 bytes --]

On Sat, Feb 22, 2014 at 06:44:17PM +0100, Lars-Peter Clausen wrote:
> The locking here was added in commit 71a295602e ("ASoC: Lock the CODEC in PXA
> external jack controls") to protect the DAPM changes that are made inside of
> ${board}_ext_control() against concurrent updates. The ASoC core was updated in

Applied, thanks.

[-- Attachment #1.2: Digital signature --]
[-- Type: application/pgp-signature, Size: 836 bytes --]

[-- Attachment #2: Type: text/plain, Size: 0 bytes --]



^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2014-02-23  2:32 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-02-22 17:44 [PATCH] ASoC: pxa: Remove superfluous locking Lars-Peter Clausen
2014-02-23  1:51 ` Mark Brown

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.