All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 00/17 v2] Update locking for snd_soc_dapm_xxxx_pin functions
@ 2014-02-18 15:22 ` Charles Keepax
  0 siblings, 0 replies; 47+ messages in thread
From: Charles Keepax @ 2014-02-18 15:22 UTC (permalink / raw)
  To: broonie
  Cc: myungjoo.ham, cw00.choi, dmitry.torokhov, lgirdwood, lars,
	peter.ujfalusi, jarkko.nikula, eric.y.miao, haojian.zhuang,
	linux-kernel, patches, alsa-devel, linux

This patchset updates the locking around the
snd_soc_dapm_xxxx_pin functions. First we add an unlocked
version of the functions and add locking to the standard
call, this also requires us to remove the few places where
these functions are externally locked. Then we patch usages
of the functions that look like they are expecting to do an
atomic update to do so, using external locking.

Thanks,
Charles

Updates since v1:
 - Added helper functions to lock/unlock the dapm mutex
 - Added an unlocked version of snd_soc_dapm_sync, so it can
   be called under the same mutex lock as the pin functions,
   this is not required just saves a mutex lock

Charles Keepax (17):
  Input - arizona-haptics: Fix double lock of dapm_mutex
  ASoC: dapm: Add helpers to lock/unlock DAPM mutex
  ASoC: dapm: Add locking to snd_soc_dapm_xxxx_pin functions
  ASoC: dapm: Add unlocked version of snd_soc_dapm_sync
  ASoC: adav80x: Update locking around use of DAPM pin API
  ASoC: wm5100: Update locking around use of DAPM pin API
  ASoC: wm8962: Update locking around use of DAPM pin API
  ASoC: wm8994: Update locking around use of DAPM pin API
  ASoC: wm8996: Update locking around use of DAPM pin API
  ASoC: mfld_machine: Update locking around use of DAPM pin API
  ASoC: ams-delta: Update locking around use of DAPM pin API
  ASoC: omap: n810: Update locking around use of DAPM pin API
  ASoC: omap: rx51: Update locking around use of DAPM pin API
  ASoC: pxa: corgi: Update locking around use of DAPM pin API
  ASoC: pxa: magician: Update locking around use of DAPM pin API
  ASoC: pxa: spitz: Update locking around use of DAPM pin API
  ASoC: pxa: tosa: Update locking around use of DAPM pin API

 drivers/extcon/extcon-arizona.c      |   12 ---
 drivers/input/misc/arizona-haptics.c |   19 ----
 include/sound/soc-dapm.h             |    9 ++
 include/sound/soc.h                  |    9 ++
 sound/soc/codecs/adav80x.c           |   17 +++--
 sound/soc/codecs/wm5100.c            |   12 ++-
 sound/soc/codecs/wm8962.c            |   13 ++-
 sound/soc/codecs/wm8994.c            |   45 ++++++----
 sound/soc/codecs/wm8996.c            |    9 ++-
 sound/soc/intel/mfld_machine.c       |   65 +++++++++-----
 sound/soc/omap/ams-delta.c           |   45 ++++++----
 sound/soc/omap/n810.c                |   22 +++--
 sound/soc/omap/rx51.c                |   22 +++--
 sound/soc/pxa/corgi.c                |   42 +++++----
 sound/soc/pxa/magician.c             |   22 +++--
 sound/soc/pxa/spitz.c                |   51 ++++++-----
 sound/soc/pxa/tosa.c                 |   28 ++++---
 sound/soc/soc-dapm.c                 |  160 ++++++++++++++++++++++++++++++---
 18 files changed, 399 insertions(+), 203 deletions(-)

-- 
1.7.2.5


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

* [PATCH 00/17 v2] Update locking for snd_soc_dapm_xxxx_pin functions
@ 2014-02-18 15:22 ` Charles Keepax
  0 siblings, 0 replies; 47+ messages in thread
From: Charles Keepax @ 2014-02-18 15:22 UTC (permalink / raw)
  To: broonie
  Cc: alsa-devel, lars, eric.y.miao, dmitry.torokhov, lgirdwood,
	haojian.zhuang, linux-kernel, peter.ujfalusi, cw00.choi,
	myungjoo.ham, patches, linux, jarkko.nikula

This patchset updates the locking around the
snd_soc_dapm_xxxx_pin functions. First we add an unlocked
version of the functions and add locking to the standard
call, this also requires us to remove the few places where
these functions are externally locked. Then we patch usages
of the functions that look like they are expecting to do an
atomic update to do so, using external locking.

Thanks,
Charles

Updates since v1:
 - Added helper functions to lock/unlock the dapm mutex
 - Added an unlocked version of snd_soc_dapm_sync, so it can
   be called under the same mutex lock as the pin functions,
   this is not required just saves a mutex lock

Charles Keepax (17):
  Input - arizona-haptics: Fix double lock of dapm_mutex
  ASoC: dapm: Add helpers to lock/unlock DAPM mutex
  ASoC: dapm: Add locking to snd_soc_dapm_xxxx_pin functions
  ASoC: dapm: Add unlocked version of snd_soc_dapm_sync
  ASoC: adav80x: Update locking around use of DAPM pin API
  ASoC: wm5100: Update locking around use of DAPM pin API
  ASoC: wm8962: Update locking around use of DAPM pin API
  ASoC: wm8994: Update locking around use of DAPM pin API
  ASoC: wm8996: Update locking around use of DAPM pin API
  ASoC: mfld_machine: Update locking around use of DAPM pin API
  ASoC: ams-delta: Update locking around use of DAPM pin API
  ASoC: omap: n810: Update locking around use of DAPM pin API
  ASoC: omap: rx51: Update locking around use of DAPM pin API
  ASoC: pxa: corgi: Update locking around use of DAPM pin API
  ASoC: pxa: magician: Update locking around use of DAPM pin API
  ASoC: pxa: spitz: Update locking around use of DAPM pin API
  ASoC: pxa: tosa: Update locking around use of DAPM pin API

 drivers/extcon/extcon-arizona.c      |   12 ---
 drivers/input/misc/arizona-haptics.c |   19 ----
 include/sound/soc-dapm.h             |    9 ++
 include/sound/soc.h                  |    9 ++
 sound/soc/codecs/adav80x.c           |   17 +++--
 sound/soc/codecs/wm5100.c            |   12 ++-
 sound/soc/codecs/wm8962.c            |   13 ++-
 sound/soc/codecs/wm8994.c            |   45 ++++++----
 sound/soc/codecs/wm8996.c            |    9 ++-
 sound/soc/intel/mfld_machine.c       |   65 +++++++++-----
 sound/soc/omap/ams-delta.c           |   45 ++++++----
 sound/soc/omap/n810.c                |   22 +++--
 sound/soc/omap/rx51.c                |   22 +++--
 sound/soc/pxa/corgi.c                |   42 +++++----
 sound/soc/pxa/magician.c             |   22 +++--
 sound/soc/pxa/spitz.c                |   51 ++++++-----
 sound/soc/pxa/tosa.c                 |   28 ++++---
 sound/soc/soc-dapm.c                 |  160 ++++++++++++++++++++++++++++++---
 18 files changed, 399 insertions(+), 203 deletions(-)

-- 
1.7.2.5

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

* [PATCH 01/17 v2] Input - arizona-haptics: Fix double lock of dapm_mutex
  2014-02-18 15:22 ` Charles Keepax
  (?)
@ 2014-02-18 15:22 ` Charles Keepax
  2014-02-20  3:54   ` Mark Brown
  2014-02-20  9:12   ` Mark Brown
  -1 siblings, 2 replies; 47+ messages in thread
From: Charles Keepax @ 2014-02-18 15:22 UTC (permalink / raw)
  To: broonie
  Cc: myungjoo.ham, cw00.choi, dmitry.torokhov, lgirdwood, lars,
	peter.ujfalusi, jarkko.nikula, eric.y.miao, haojian.zhuang,
	linux-kernel, patches, alsa-devel, linux

snd_soc_dapm_sync takes the dapm_mutex internally, but we currently take
it externally as well. This patch fixes this.

Signed-off-by: Charles Keepax <ckeepax@opensource.wolfsonmicro.com>
---
 drivers/input/misc/arizona-haptics.c |   11 ++++-------
 1 files changed, 4 insertions(+), 7 deletions(-)

diff --git a/drivers/input/misc/arizona-haptics.c b/drivers/input/misc/arizona-haptics.c
index 7a04f54..e7e12a5 100644
--- a/drivers/input/misc/arizona-haptics.c
+++ b/drivers/input/misc/arizona-haptics.c
@@ -77,16 +77,14 @@ static void arizona_haptics_work(struct work_struct *work)
 			return;
 		}
 
+		mutex_unlock(dapm_mutex);
+
 		ret = snd_soc_dapm_sync(arizona->dapm);
 		if (ret != 0) {
 			dev_err(arizona->dev, "Failed to sync DAPM: %d\n",
 				ret);
-			mutex_unlock(dapm_mutex);
 			return;
 		}
-
-		mutex_unlock(dapm_mutex);
-
 	} else {
 		/* This disable sequence will be a noop if already enabled */
 		mutex_lock_nested(dapm_mutex, SND_SOC_DAPM_CLASS_RUNTIME);
@@ -99,16 +97,15 @@ static void arizona_haptics_work(struct work_struct *work)
 			return;
 		}
 
+		mutex_unlock(dapm_mutex);
+
 		ret = snd_soc_dapm_sync(arizona->dapm);
 		if (ret != 0) {
 			dev_err(arizona->dev, "Failed to sync DAPM: %d\n",
 				ret);
-			mutex_unlock(dapm_mutex);
 			return;
 		}
 
-		mutex_unlock(dapm_mutex);
-
 		ret = regmap_update_bits(arizona->regmap,
 					 ARIZONA_HAPTICS_CONTROL_1,
 					 ARIZONA_HAP_CTRL_MASK,
-- 
1.7.2.5


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

* [PATCH 02/17 v2] ASoC: dapm: Add helpers to lock/unlock DAPM mutex
  2014-02-18 15:22 ` Charles Keepax
@ 2014-02-18 15:22   ` Charles Keepax
  -1 siblings, 0 replies; 47+ messages in thread
From: Charles Keepax @ 2014-02-18 15:22 UTC (permalink / raw)
  To: broonie
  Cc: myungjoo.ham, cw00.choi, dmitry.torokhov, lgirdwood, lars,
	peter.ujfalusi, jarkko.nikula, eric.y.miao, haojian.zhuang,
	linux-kernel, patches, alsa-devel, linux

Acquiring the DAPM mutex is necessary before using several DAPM
functions and dereference is quite ugly. This patch provides a helper
function to simplify this.

Signed-off-by: Charles Keepax <ckeepax@opensource.wolfsonmicro.com>
---
 include/sound/soc.h |   11 +++++++++++
 1 files changed, 11 insertions(+), 0 deletions(-)

diff --git a/include/sound/soc.h b/include/sound/soc.h
index 21038e0..dc46623 100644
--- a/include/sound/soc.h
+++ b/include/sound/soc.h
@@ -1204,4 +1204,15 @@ extern struct dentry *snd_soc_debugfs_root;
 
 extern const struct dev_pm_ops snd_soc_pm_ops;
 
+/* Helper functions */
+static inline void snd_soc_dapm_mutex_lock(struct snd_soc_dapm_context *dapm)
+{
+	mutex_lock(&dapm->card->dapm_mutex);
+}
+
+static inline void snd_soc_dapm_mutex_unlock(struct snd_soc_dapm_context *dapm)
+{
+	mutex_unlock(&dapm->card->dapm_mutex);
+}
+
 #endif
-- 
1.7.2.5


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

* [PATCH 02/17 v2] ASoC: dapm: Add helpers to lock/unlock DAPM mutex
@ 2014-02-18 15:22   ` Charles Keepax
  0 siblings, 0 replies; 47+ messages in thread
From: Charles Keepax @ 2014-02-18 15:22 UTC (permalink / raw)
  To: broonie
  Cc: alsa-devel, lars, eric.y.miao, dmitry.torokhov, lgirdwood,
	haojian.zhuang, linux-kernel, peter.ujfalusi, cw00.choi,
	myungjoo.ham, patches, linux, jarkko.nikula

Acquiring the DAPM mutex is necessary before using several DAPM
functions and dereference is quite ugly. This patch provides a helper
function to simplify this.

Signed-off-by: Charles Keepax <ckeepax@opensource.wolfsonmicro.com>
---
 include/sound/soc.h |   11 +++++++++++
 1 files changed, 11 insertions(+), 0 deletions(-)

diff --git a/include/sound/soc.h b/include/sound/soc.h
index 21038e0..dc46623 100644
--- a/include/sound/soc.h
+++ b/include/sound/soc.h
@@ -1204,4 +1204,15 @@ extern struct dentry *snd_soc_debugfs_root;
 
 extern const struct dev_pm_ops snd_soc_pm_ops;
 
+/* Helper functions */
+static inline void snd_soc_dapm_mutex_lock(struct snd_soc_dapm_context *dapm)
+{
+	mutex_lock(&dapm->card->dapm_mutex);
+}
+
+static inline void snd_soc_dapm_mutex_unlock(struct snd_soc_dapm_context *dapm)
+{
+	mutex_unlock(&dapm->card->dapm_mutex);
+}
+
 #endif
-- 
1.7.2.5

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

* [PATCH 03/17 v2] ASoC: dapm: Add locking to snd_soc_dapm_xxxx_pin functions
  2014-02-18 15:22 ` Charles Keepax
@ 2014-02-18 15:22   ` Charles Keepax
  -1 siblings, 0 replies; 47+ messages in thread
From: Charles Keepax @ 2014-02-18 15:22 UTC (permalink / raw)
  To: broonie
  Cc: myungjoo.ham, cw00.choi, dmitry.torokhov, lgirdwood, lars,
	peter.ujfalusi, jarkko.nikula, eric.y.miao, haojian.zhuang,
	linux-kernel, patches, alsa-devel, linux

The snd_soc_dapm_xxxx_pin all require the dapm_mutex to be held when
they are called as they edit the dirty list, however very few of the
callers do so.

This patch adds unlocked versions of all the functions replacing the
existing implementations with one that holds the lock internally. We
also fix up the places where the lock was actually held on the caller
side.

Signed-off-by: Charles Keepax <ckeepax@opensource.wolfsonmicro.com>
---
 drivers/extcon/extcon-arizona.c      |   12 ---
 drivers/input/misc/arizona-haptics.c |   16 ----
 include/sound/soc-dapm.h             |    8 ++
 sound/soc/soc-dapm.c                 |  133 +++++++++++++++++++++++++++++++---
 4 files changed, 131 insertions(+), 38 deletions(-)

diff --git a/drivers/extcon/extcon-arizona.c b/drivers/extcon/extcon-arizona.c
index c20602f..98a14f6 100644
--- a/drivers/extcon/extcon-arizona.c
+++ b/drivers/extcon/extcon-arizona.c
@@ -222,27 +222,19 @@ static void arizona_extcon_pulse_micbias(struct arizona_extcon_info *info)
 	struct snd_soc_dapm_context *dapm = arizona->dapm;
 	int ret;
 
-	mutex_lock(&dapm->card->dapm_mutex);
-
 	ret = snd_soc_dapm_force_enable_pin(dapm, widget);
 	if (ret != 0)
 		dev_warn(arizona->dev, "Failed to enable %s: %d\n",
 			 widget, ret);
 
-	mutex_unlock(&dapm->card->dapm_mutex);
-
 	snd_soc_dapm_sync(dapm);
 
 	if (!arizona->pdata.micd_force_micbias) {
-		mutex_lock(&dapm->card->dapm_mutex);
-
 		ret = snd_soc_dapm_disable_pin(arizona->dapm, widget);
 		if (ret != 0)
 			dev_warn(arizona->dev, "Failed to disable %s: %d\n",
 				 widget, ret);
 
-		mutex_unlock(&dapm->card->dapm_mutex);
-
 		snd_soc_dapm_sync(dapm);
 	}
 }
@@ -304,16 +296,12 @@ static void arizona_stop_mic(struct arizona_extcon_info *info)
 				 ARIZONA_MICD_ENA, 0,
 				 &change);
 
-	mutex_lock(&dapm->card->dapm_mutex);
-
 	ret = snd_soc_dapm_disable_pin(dapm, widget);
 	if (ret != 0)
 		dev_warn(arizona->dev,
 			 "Failed to disable %s: %d\n",
 			 widget, ret);
 
-	mutex_unlock(&dapm->card->dapm_mutex);
-
 	snd_soc_dapm_sync(dapm);
 
 	if (info->micd_reva) {
diff --git a/drivers/input/misc/arizona-haptics.c b/drivers/input/misc/arizona-haptics.c
index e7e12a5..ef2e281 100644
--- a/drivers/input/misc/arizona-haptics.c
+++ b/drivers/input/misc/arizona-haptics.c
@@ -37,7 +37,6 @@ static void arizona_haptics_work(struct work_struct *work)
 						       struct arizona_haptics,
 						       work);
 	struct arizona *arizona = haptics->arizona;
-	struct mutex *dapm_mutex = &arizona->dapm->card->dapm_mutex;
 	int ret;
 
 	if (!haptics->arizona->dapm) {
@@ -67,18 +66,13 @@ static void arizona_haptics_work(struct work_struct *work)
 			return;
 		}
 
-		mutex_lock_nested(dapm_mutex, SND_SOC_DAPM_CLASS_RUNTIME);
-
 		ret = snd_soc_dapm_enable_pin(arizona->dapm, "HAPTICS");
 		if (ret != 0) {
 			dev_err(arizona->dev, "Failed to start HAPTICS: %d\n",
 				ret);
-			mutex_unlock(dapm_mutex);
 			return;
 		}
 
-		mutex_unlock(dapm_mutex);
-
 		ret = snd_soc_dapm_sync(arizona->dapm);
 		if (ret != 0) {
 			dev_err(arizona->dev, "Failed to sync DAPM: %d\n",
@@ -87,18 +81,13 @@ static void arizona_haptics_work(struct work_struct *work)
 		}
 	} else {
 		/* This disable sequence will be a noop if already enabled */
-		mutex_lock_nested(dapm_mutex, SND_SOC_DAPM_CLASS_RUNTIME);
-
 		ret = snd_soc_dapm_disable_pin(arizona->dapm, "HAPTICS");
 		if (ret != 0) {
 			dev_err(arizona->dev, "Failed to disable HAPTICS: %d\n",
 				ret);
-			mutex_unlock(dapm_mutex);
 			return;
 		}
 
-		mutex_unlock(dapm_mutex);
-
 		ret = snd_soc_dapm_sync(arizona->dapm);
 		if (ret != 0) {
 			dev_err(arizona->dev, "Failed to sync DAPM: %d\n",
@@ -152,16 +141,11 @@ static int arizona_haptics_play(struct input_dev *input, void *data,
 static void arizona_haptics_close(struct input_dev *input)
 {
 	struct arizona_haptics *haptics = input_get_drvdata(input);
-	struct mutex *dapm_mutex = &haptics->arizona->dapm->card->dapm_mutex;
 
 	cancel_work_sync(&haptics->work);
 
-	mutex_lock_nested(dapm_mutex, SND_SOC_DAPM_CLASS_RUNTIME);
-
 	if (haptics->arizona->dapm)
 		snd_soc_dapm_disable_pin(haptics->arizona->dapm, "HAPTICS");
-
-	mutex_unlock(dapm_mutex);
 }
 
 static int arizona_haptics_probe(struct platform_device *pdev)
diff --git a/include/sound/soc-dapm.h b/include/sound/soc-dapm.h
index 68d92e3..6e89ef6 100644
--- a/include/sound/soc-dapm.h
+++ b/include/sound/soc-dapm.h
@@ -449,14 +449,22 @@ void snd_soc_dapm_debugfs_init(struct snd_soc_dapm_context *dapm,
 /* dapm audio pin control and status */
 int snd_soc_dapm_enable_pin(struct snd_soc_dapm_context *dapm,
 			    const char *pin);
+int snd_soc_dapm_enable_pin_unlocked(struct snd_soc_dapm_context *dapm,
+				     const char *pin);
 int snd_soc_dapm_disable_pin(struct snd_soc_dapm_context *dapm,
 			     const char *pin);
+int snd_soc_dapm_disable_pin_unlocked(struct snd_soc_dapm_context *dapm,
+				      const char *pin);
 int snd_soc_dapm_nc_pin(struct snd_soc_dapm_context *dapm, const char *pin);
+int snd_soc_dapm_nc_pin_unlocked(struct snd_soc_dapm_context *dapm,
+				 const char *pin);
 int snd_soc_dapm_get_pin_status(struct snd_soc_dapm_context *dapm,
 				const char *pin);
 int snd_soc_dapm_sync(struct snd_soc_dapm_context *dapm);
 int snd_soc_dapm_force_enable_pin(struct snd_soc_dapm_context *dapm,
 				  const char *pin);
+int snd_soc_dapm_force_enable_pin_unlocked(struct snd_soc_dapm_context *dapm,
+					   const char *pin);
 int snd_soc_dapm_ignore_suspend(struct snd_soc_dapm_context *dapm,
 				const char *pin);
 void snd_soc_dapm_auto_nc_codec_pins(struct snd_soc_codec *codec);
diff --git a/sound/soc/soc-dapm.c b/sound/soc/soc-dapm.c
index 2c2d751..1a3fe85 100644
--- a/sound/soc/soc-dapm.c
+++ b/sound/soc/soc-dapm.c
@@ -3211,15 +3211,11 @@ int snd_soc_dapm_put_pin_switch(struct snd_kcontrol *kcontrol,
 	struct snd_soc_card *card = snd_kcontrol_chip(kcontrol);
 	const char *pin = (const char *)kcontrol->private_value;
 
-	mutex_lock_nested(&card->dapm_mutex, SND_SOC_DAPM_CLASS_RUNTIME);
-
 	if (ucontrol->value.integer.value[0])
 		snd_soc_dapm_enable_pin(&card->dapm, pin);
 	else
 		snd_soc_dapm_disable_pin(&card->dapm, pin);
 
-	mutex_unlock(&card->dapm_mutex);
-
 	snd_soc_dapm_sync(&card->dapm);
 	return 0;
 }
@@ -3768,23 +3764,52 @@ void snd_soc_dapm_stream_event(struct snd_soc_pcm_runtime *rtd, int stream,
 }
 
 /**
+ * snd_soc_dapm_enable_pin_unlocked - enable pin.
+ * @dapm: DAPM context
+ * @pin: pin name
+ *
+ * Enables input/output pin and its parents or children widgets iff there is
+ * a valid audio route and active audio stream.
+ *
+ * Requires external locking.
+ *
+ * NOTE: snd_soc_dapm_sync() needs to be called after this for DAPM to
+ * do any widget power switching.
+ */
+int snd_soc_dapm_enable_pin_unlocked(struct snd_soc_dapm_context *dapm,
+				   const char *pin)
+{
+	return snd_soc_dapm_set_pin(dapm, pin, 1);
+}
+EXPORT_SYMBOL_GPL(snd_soc_dapm_enable_pin_unlocked);
+
+/**
  * snd_soc_dapm_enable_pin - enable pin.
  * @dapm: DAPM context
  * @pin: pin name
  *
  * Enables input/output pin and its parents or children widgets iff there is
  * a valid audio route and active audio stream.
+ *
  * NOTE: snd_soc_dapm_sync() needs to be called after this for DAPM to
  * do any widget power switching.
  */
 int snd_soc_dapm_enable_pin(struct snd_soc_dapm_context *dapm, const char *pin)
 {
-	return snd_soc_dapm_set_pin(dapm, pin, 1);
+	int ret;
+
+	mutex_lock_nested(&dapm->card->dapm_mutex, SND_SOC_DAPM_CLASS_RUNTIME);
+
+	ret = snd_soc_dapm_set_pin(dapm, pin, 1);
+
+	mutex_unlock(&dapm->card->dapm_mutex);
+
+	return ret;
 }
 EXPORT_SYMBOL_GPL(snd_soc_dapm_enable_pin);
 
 /**
- * snd_soc_dapm_force_enable_pin - force a pin to be enabled
+ * snd_soc_dapm_force_enable_pin_unlocked - force a pin to be enabled
  * @dapm: DAPM context
  * @pin: pin name
  *
@@ -3792,11 +3817,13 @@ EXPORT_SYMBOL_GPL(snd_soc_dapm_enable_pin);
  * intended for use with microphone bias supplies used in microphone
  * jack detection.
  *
+ * Requires external locking.
+ *
  * NOTE: snd_soc_dapm_sync() needs to be called after this for DAPM to
  * do any widget power switching.
  */
-int snd_soc_dapm_force_enable_pin(struct snd_soc_dapm_context *dapm,
-				  const char *pin)
+int snd_soc_dapm_force_enable_pin_unlocked(struct snd_soc_dapm_context *dapm,
+					 const char *pin)
 {
 	struct snd_soc_dapm_widget *w = dapm_find_widget(dapm, pin, true);
 
@@ -3812,25 +3839,103 @@ int snd_soc_dapm_force_enable_pin(struct snd_soc_dapm_context *dapm,
 
 	return 0;
 }
+EXPORT_SYMBOL_GPL(snd_soc_dapm_force_enable_pin_unlocked);
+
+/**
+ * snd_soc_dapm_force_enable_pin - force a pin to be enabled
+ * @dapm: DAPM context
+ * @pin: pin name
+ *
+ * Enables input/output pin regardless of any other state.  This is
+ * intended for use with microphone bias supplies used in microphone
+ * jack detection.
+ *
+ * NOTE: snd_soc_dapm_sync() needs to be called after this for DAPM to
+ * do any widget power switching.
+ */
+int snd_soc_dapm_force_enable_pin(struct snd_soc_dapm_context *dapm,
+				  const char *pin)
+{
+	int ret;
+
+	mutex_lock_nested(&dapm->card->dapm_mutex, SND_SOC_DAPM_CLASS_RUNTIME);
+
+	ret = snd_soc_dapm_force_enable_pin_unlocked(dapm, pin);
+
+	mutex_unlock(&dapm->card->dapm_mutex);
+
+	return ret;
+}
 EXPORT_SYMBOL_GPL(snd_soc_dapm_force_enable_pin);
 
 /**
+ * snd_soc_dapm_disable_pin_unlocked - disable pin.
+ * @dapm: DAPM context
+ * @pin: pin name
+ *
+ * Disables input/output pin and its parents or children widgets.
+ *
+ * Requires external locking.
+ *
+ * NOTE: snd_soc_dapm_sync() needs to be called after this for DAPM to
+ * do any widget power switching.
+ */
+int snd_soc_dapm_disable_pin_unlocked(struct snd_soc_dapm_context *dapm,
+				    const char *pin)
+{
+	return snd_soc_dapm_set_pin(dapm, pin, 0);
+}
+EXPORT_SYMBOL_GPL(snd_soc_dapm_disable_pin_unlocked);
+
+/**
  * snd_soc_dapm_disable_pin - disable pin.
  * @dapm: DAPM context
  * @pin: pin name
  *
  * Disables input/output pin and its parents or children widgets.
+ *
  * NOTE: snd_soc_dapm_sync() needs to be called after this for DAPM to
  * do any widget power switching.
  */
 int snd_soc_dapm_disable_pin(struct snd_soc_dapm_context *dapm,
 			     const char *pin)
 {
-	return snd_soc_dapm_set_pin(dapm, pin, 0);
+	int ret;
+
+	mutex_lock_nested(&dapm->card->dapm_mutex, SND_SOC_DAPM_CLASS_RUNTIME);
+
+	ret = snd_soc_dapm_set_pin(dapm, pin, 0);
+
+	mutex_unlock(&dapm->card->dapm_mutex);
+
+	return ret;
 }
 EXPORT_SYMBOL_GPL(snd_soc_dapm_disable_pin);
 
 /**
+ * snd_soc_dapm_nc_pin_unlocked - permanently disable pin.
+ * @dapm: DAPM context
+ * @pin: pin name
+ *
+ * Marks the specified pin as being not connected, disabling it along
+ * any parent or child widgets.  At present this is identical to
+ * snd_soc_dapm_disable_pin() but in future it will be extended to do
+ * additional things such as disabling controls which only affect
+ * paths through the pin.
+ *
+ * Requires external locking.
+ *
+ * NOTE: snd_soc_dapm_sync() needs to be called after this for DAPM to
+ * do any widget power switching.
+ */
+int snd_soc_dapm_nc_pin_unlocked(struct snd_soc_dapm_context *dapm,
+			       const char *pin)
+{
+	return snd_soc_dapm_set_pin(dapm, pin, 0);
+}
+EXPORT_SYMBOL_GPL(snd_soc_dapm_nc_pin_unlocked);
+
+/**
  * snd_soc_dapm_nc_pin - permanently disable pin.
  * @dapm: DAPM context
  * @pin: pin name
@@ -3846,7 +3951,15 @@ EXPORT_SYMBOL_GPL(snd_soc_dapm_disable_pin);
  */
 int snd_soc_dapm_nc_pin(struct snd_soc_dapm_context *dapm, const char *pin)
 {
-	return snd_soc_dapm_set_pin(dapm, pin, 0);
+	int ret;
+
+	mutex_lock_nested(&dapm->card->dapm_mutex, SND_SOC_DAPM_CLASS_RUNTIME);
+
+	ret = snd_soc_dapm_set_pin(dapm, pin, 0);
+
+	mutex_unlock(&dapm->card->dapm_mutex);
+
+	return ret;
 }
 EXPORT_SYMBOL_GPL(snd_soc_dapm_nc_pin);
 
-- 
1.7.2.5


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

* [PATCH 03/17 v2] ASoC: dapm: Add locking to snd_soc_dapm_xxxx_pin functions
@ 2014-02-18 15:22   ` Charles Keepax
  0 siblings, 0 replies; 47+ messages in thread
From: Charles Keepax @ 2014-02-18 15:22 UTC (permalink / raw)
  To: broonie
  Cc: alsa-devel, lars, eric.y.miao, dmitry.torokhov, lgirdwood,
	haojian.zhuang, linux-kernel, peter.ujfalusi, cw00.choi,
	myungjoo.ham, patches, linux, jarkko.nikula

The snd_soc_dapm_xxxx_pin all require the dapm_mutex to be held when
they are called as they edit the dirty list, however very few of the
callers do so.

This patch adds unlocked versions of all the functions replacing the
existing implementations with one that holds the lock internally. We
also fix up the places where the lock was actually held on the caller
side.

Signed-off-by: Charles Keepax <ckeepax@opensource.wolfsonmicro.com>
---
 drivers/extcon/extcon-arizona.c      |   12 ---
 drivers/input/misc/arizona-haptics.c |   16 ----
 include/sound/soc-dapm.h             |    8 ++
 sound/soc/soc-dapm.c                 |  133 +++++++++++++++++++++++++++++++---
 4 files changed, 131 insertions(+), 38 deletions(-)

diff --git a/drivers/extcon/extcon-arizona.c b/drivers/extcon/extcon-arizona.c
index c20602f..98a14f6 100644
--- a/drivers/extcon/extcon-arizona.c
+++ b/drivers/extcon/extcon-arizona.c
@@ -222,27 +222,19 @@ static void arizona_extcon_pulse_micbias(struct arizona_extcon_info *info)
 	struct snd_soc_dapm_context *dapm = arizona->dapm;
 	int ret;
 
-	mutex_lock(&dapm->card->dapm_mutex);
-
 	ret = snd_soc_dapm_force_enable_pin(dapm, widget);
 	if (ret != 0)
 		dev_warn(arizona->dev, "Failed to enable %s: %d\n",
 			 widget, ret);
 
-	mutex_unlock(&dapm->card->dapm_mutex);
-
 	snd_soc_dapm_sync(dapm);
 
 	if (!arizona->pdata.micd_force_micbias) {
-		mutex_lock(&dapm->card->dapm_mutex);
-
 		ret = snd_soc_dapm_disable_pin(arizona->dapm, widget);
 		if (ret != 0)
 			dev_warn(arizona->dev, "Failed to disable %s: %d\n",
 				 widget, ret);
 
-		mutex_unlock(&dapm->card->dapm_mutex);
-
 		snd_soc_dapm_sync(dapm);
 	}
 }
@@ -304,16 +296,12 @@ static void arizona_stop_mic(struct arizona_extcon_info *info)
 				 ARIZONA_MICD_ENA, 0,
 				 &change);
 
-	mutex_lock(&dapm->card->dapm_mutex);
-
 	ret = snd_soc_dapm_disable_pin(dapm, widget);
 	if (ret != 0)
 		dev_warn(arizona->dev,
 			 "Failed to disable %s: %d\n",
 			 widget, ret);
 
-	mutex_unlock(&dapm->card->dapm_mutex);
-
 	snd_soc_dapm_sync(dapm);
 
 	if (info->micd_reva) {
diff --git a/drivers/input/misc/arizona-haptics.c b/drivers/input/misc/arizona-haptics.c
index e7e12a5..ef2e281 100644
--- a/drivers/input/misc/arizona-haptics.c
+++ b/drivers/input/misc/arizona-haptics.c
@@ -37,7 +37,6 @@ static void arizona_haptics_work(struct work_struct *work)
 						       struct arizona_haptics,
 						       work);
 	struct arizona *arizona = haptics->arizona;
-	struct mutex *dapm_mutex = &arizona->dapm->card->dapm_mutex;
 	int ret;
 
 	if (!haptics->arizona->dapm) {
@@ -67,18 +66,13 @@ static void arizona_haptics_work(struct work_struct *work)
 			return;
 		}
 
-		mutex_lock_nested(dapm_mutex, SND_SOC_DAPM_CLASS_RUNTIME);
-
 		ret = snd_soc_dapm_enable_pin(arizona->dapm, "HAPTICS");
 		if (ret != 0) {
 			dev_err(arizona->dev, "Failed to start HAPTICS: %d\n",
 				ret);
-			mutex_unlock(dapm_mutex);
 			return;
 		}
 
-		mutex_unlock(dapm_mutex);
-
 		ret = snd_soc_dapm_sync(arizona->dapm);
 		if (ret != 0) {
 			dev_err(arizona->dev, "Failed to sync DAPM: %d\n",
@@ -87,18 +81,13 @@ static void arizona_haptics_work(struct work_struct *work)
 		}
 	} else {
 		/* This disable sequence will be a noop if already enabled */
-		mutex_lock_nested(dapm_mutex, SND_SOC_DAPM_CLASS_RUNTIME);
-
 		ret = snd_soc_dapm_disable_pin(arizona->dapm, "HAPTICS");
 		if (ret != 0) {
 			dev_err(arizona->dev, "Failed to disable HAPTICS: %d\n",
 				ret);
-			mutex_unlock(dapm_mutex);
 			return;
 		}
 
-		mutex_unlock(dapm_mutex);
-
 		ret = snd_soc_dapm_sync(arizona->dapm);
 		if (ret != 0) {
 			dev_err(arizona->dev, "Failed to sync DAPM: %d\n",
@@ -152,16 +141,11 @@ static int arizona_haptics_play(struct input_dev *input, void *data,
 static void arizona_haptics_close(struct input_dev *input)
 {
 	struct arizona_haptics *haptics = input_get_drvdata(input);
-	struct mutex *dapm_mutex = &haptics->arizona->dapm->card->dapm_mutex;
 
 	cancel_work_sync(&haptics->work);
 
-	mutex_lock_nested(dapm_mutex, SND_SOC_DAPM_CLASS_RUNTIME);
-
 	if (haptics->arizona->dapm)
 		snd_soc_dapm_disable_pin(haptics->arizona->dapm, "HAPTICS");
-
-	mutex_unlock(dapm_mutex);
 }
 
 static int arizona_haptics_probe(struct platform_device *pdev)
diff --git a/include/sound/soc-dapm.h b/include/sound/soc-dapm.h
index 68d92e3..6e89ef6 100644
--- a/include/sound/soc-dapm.h
+++ b/include/sound/soc-dapm.h
@@ -449,14 +449,22 @@ void snd_soc_dapm_debugfs_init(struct snd_soc_dapm_context *dapm,
 /* dapm audio pin control and status */
 int snd_soc_dapm_enable_pin(struct snd_soc_dapm_context *dapm,
 			    const char *pin);
+int snd_soc_dapm_enable_pin_unlocked(struct snd_soc_dapm_context *dapm,
+				     const char *pin);
 int snd_soc_dapm_disable_pin(struct snd_soc_dapm_context *dapm,
 			     const char *pin);
+int snd_soc_dapm_disable_pin_unlocked(struct snd_soc_dapm_context *dapm,
+				      const char *pin);
 int snd_soc_dapm_nc_pin(struct snd_soc_dapm_context *dapm, const char *pin);
+int snd_soc_dapm_nc_pin_unlocked(struct snd_soc_dapm_context *dapm,
+				 const char *pin);
 int snd_soc_dapm_get_pin_status(struct snd_soc_dapm_context *dapm,
 				const char *pin);
 int snd_soc_dapm_sync(struct snd_soc_dapm_context *dapm);
 int snd_soc_dapm_force_enable_pin(struct snd_soc_dapm_context *dapm,
 				  const char *pin);
+int snd_soc_dapm_force_enable_pin_unlocked(struct snd_soc_dapm_context *dapm,
+					   const char *pin);
 int snd_soc_dapm_ignore_suspend(struct snd_soc_dapm_context *dapm,
 				const char *pin);
 void snd_soc_dapm_auto_nc_codec_pins(struct snd_soc_codec *codec);
diff --git a/sound/soc/soc-dapm.c b/sound/soc/soc-dapm.c
index 2c2d751..1a3fe85 100644
--- a/sound/soc/soc-dapm.c
+++ b/sound/soc/soc-dapm.c
@@ -3211,15 +3211,11 @@ int snd_soc_dapm_put_pin_switch(struct snd_kcontrol *kcontrol,
 	struct snd_soc_card *card = snd_kcontrol_chip(kcontrol);
 	const char *pin = (const char *)kcontrol->private_value;
 
-	mutex_lock_nested(&card->dapm_mutex, SND_SOC_DAPM_CLASS_RUNTIME);
-
 	if (ucontrol->value.integer.value[0])
 		snd_soc_dapm_enable_pin(&card->dapm, pin);
 	else
 		snd_soc_dapm_disable_pin(&card->dapm, pin);
 
-	mutex_unlock(&card->dapm_mutex);
-
 	snd_soc_dapm_sync(&card->dapm);
 	return 0;
 }
@@ -3768,23 +3764,52 @@ void snd_soc_dapm_stream_event(struct snd_soc_pcm_runtime *rtd, int stream,
 }
 
 /**
+ * snd_soc_dapm_enable_pin_unlocked - enable pin.
+ * @dapm: DAPM context
+ * @pin: pin name
+ *
+ * Enables input/output pin and its parents or children widgets iff there is
+ * a valid audio route and active audio stream.
+ *
+ * Requires external locking.
+ *
+ * NOTE: snd_soc_dapm_sync() needs to be called after this for DAPM to
+ * do any widget power switching.
+ */
+int snd_soc_dapm_enable_pin_unlocked(struct snd_soc_dapm_context *dapm,
+				   const char *pin)
+{
+	return snd_soc_dapm_set_pin(dapm, pin, 1);
+}
+EXPORT_SYMBOL_GPL(snd_soc_dapm_enable_pin_unlocked);
+
+/**
  * snd_soc_dapm_enable_pin - enable pin.
  * @dapm: DAPM context
  * @pin: pin name
  *
  * Enables input/output pin and its parents or children widgets iff there is
  * a valid audio route and active audio stream.
+ *
  * NOTE: snd_soc_dapm_sync() needs to be called after this for DAPM to
  * do any widget power switching.
  */
 int snd_soc_dapm_enable_pin(struct snd_soc_dapm_context *dapm, const char *pin)
 {
-	return snd_soc_dapm_set_pin(dapm, pin, 1);
+	int ret;
+
+	mutex_lock_nested(&dapm->card->dapm_mutex, SND_SOC_DAPM_CLASS_RUNTIME);
+
+	ret = snd_soc_dapm_set_pin(dapm, pin, 1);
+
+	mutex_unlock(&dapm->card->dapm_mutex);
+
+	return ret;
 }
 EXPORT_SYMBOL_GPL(snd_soc_dapm_enable_pin);
 
 /**
- * snd_soc_dapm_force_enable_pin - force a pin to be enabled
+ * snd_soc_dapm_force_enable_pin_unlocked - force a pin to be enabled
  * @dapm: DAPM context
  * @pin: pin name
  *
@@ -3792,11 +3817,13 @@ EXPORT_SYMBOL_GPL(snd_soc_dapm_enable_pin);
  * intended for use with microphone bias supplies used in microphone
  * jack detection.
  *
+ * Requires external locking.
+ *
  * NOTE: snd_soc_dapm_sync() needs to be called after this for DAPM to
  * do any widget power switching.
  */
-int snd_soc_dapm_force_enable_pin(struct snd_soc_dapm_context *dapm,
-				  const char *pin)
+int snd_soc_dapm_force_enable_pin_unlocked(struct snd_soc_dapm_context *dapm,
+					 const char *pin)
 {
 	struct snd_soc_dapm_widget *w = dapm_find_widget(dapm, pin, true);
 
@@ -3812,25 +3839,103 @@ int snd_soc_dapm_force_enable_pin(struct snd_soc_dapm_context *dapm,
 
 	return 0;
 }
+EXPORT_SYMBOL_GPL(snd_soc_dapm_force_enable_pin_unlocked);
+
+/**
+ * snd_soc_dapm_force_enable_pin - force a pin to be enabled
+ * @dapm: DAPM context
+ * @pin: pin name
+ *
+ * Enables input/output pin regardless of any other state.  This is
+ * intended for use with microphone bias supplies used in microphone
+ * jack detection.
+ *
+ * NOTE: snd_soc_dapm_sync() needs to be called after this for DAPM to
+ * do any widget power switching.
+ */
+int snd_soc_dapm_force_enable_pin(struct snd_soc_dapm_context *dapm,
+				  const char *pin)
+{
+	int ret;
+
+	mutex_lock_nested(&dapm->card->dapm_mutex, SND_SOC_DAPM_CLASS_RUNTIME);
+
+	ret = snd_soc_dapm_force_enable_pin_unlocked(dapm, pin);
+
+	mutex_unlock(&dapm->card->dapm_mutex);
+
+	return ret;
+}
 EXPORT_SYMBOL_GPL(snd_soc_dapm_force_enable_pin);
 
 /**
+ * snd_soc_dapm_disable_pin_unlocked - disable pin.
+ * @dapm: DAPM context
+ * @pin: pin name
+ *
+ * Disables input/output pin and its parents or children widgets.
+ *
+ * Requires external locking.
+ *
+ * NOTE: snd_soc_dapm_sync() needs to be called after this for DAPM to
+ * do any widget power switching.
+ */
+int snd_soc_dapm_disable_pin_unlocked(struct snd_soc_dapm_context *dapm,
+				    const char *pin)
+{
+	return snd_soc_dapm_set_pin(dapm, pin, 0);
+}
+EXPORT_SYMBOL_GPL(snd_soc_dapm_disable_pin_unlocked);
+
+/**
  * snd_soc_dapm_disable_pin - disable pin.
  * @dapm: DAPM context
  * @pin: pin name
  *
  * Disables input/output pin and its parents or children widgets.
+ *
  * NOTE: snd_soc_dapm_sync() needs to be called after this for DAPM to
  * do any widget power switching.
  */
 int snd_soc_dapm_disable_pin(struct snd_soc_dapm_context *dapm,
 			     const char *pin)
 {
-	return snd_soc_dapm_set_pin(dapm, pin, 0);
+	int ret;
+
+	mutex_lock_nested(&dapm->card->dapm_mutex, SND_SOC_DAPM_CLASS_RUNTIME);
+
+	ret = snd_soc_dapm_set_pin(dapm, pin, 0);
+
+	mutex_unlock(&dapm->card->dapm_mutex);
+
+	return ret;
 }
 EXPORT_SYMBOL_GPL(snd_soc_dapm_disable_pin);
 
 /**
+ * snd_soc_dapm_nc_pin_unlocked - permanently disable pin.
+ * @dapm: DAPM context
+ * @pin: pin name
+ *
+ * Marks the specified pin as being not connected, disabling it along
+ * any parent or child widgets.  At present this is identical to
+ * snd_soc_dapm_disable_pin() but in future it will be extended to do
+ * additional things such as disabling controls which only affect
+ * paths through the pin.
+ *
+ * Requires external locking.
+ *
+ * NOTE: snd_soc_dapm_sync() needs to be called after this for DAPM to
+ * do any widget power switching.
+ */
+int snd_soc_dapm_nc_pin_unlocked(struct snd_soc_dapm_context *dapm,
+			       const char *pin)
+{
+	return snd_soc_dapm_set_pin(dapm, pin, 0);
+}
+EXPORT_SYMBOL_GPL(snd_soc_dapm_nc_pin_unlocked);
+
+/**
  * snd_soc_dapm_nc_pin - permanently disable pin.
  * @dapm: DAPM context
  * @pin: pin name
@@ -3846,7 +3951,15 @@ EXPORT_SYMBOL_GPL(snd_soc_dapm_disable_pin);
  */
 int snd_soc_dapm_nc_pin(struct snd_soc_dapm_context *dapm, const char *pin)
 {
-	return snd_soc_dapm_set_pin(dapm, pin, 0);
+	int ret;
+
+	mutex_lock_nested(&dapm->card->dapm_mutex, SND_SOC_DAPM_CLASS_RUNTIME);
+
+	ret = snd_soc_dapm_set_pin(dapm, pin, 0);
+
+	mutex_unlock(&dapm->card->dapm_mutex);
+
+	return ret;
 }
 EXPORT_SYMBOL_GPL(snd_soc_dapm_nc_pin);
 
-- 
1.7.2.5

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

* [PATCH 04/17 v2] ASoC: dapm: Add unlocked version of snd_soc_dapm_sync
  2014-02-18 15:22 ` Charles Keepax
@ 2014-02-18 15:22   ` Charles Keepax
  -1 siblings, 0 replies; 47+ messages in thread
From: Charles Keepax @ 2014-02-18 15:22 UTC (permalink / raw)
  To: broonie
  Cc: myungjoo.ham, cw00.choi, dmitry.torokhov, lgirdwood, lars,
	peter.ujfalusi, jarkko.nikula, eric.y.miao, haojian.zhuang,
	linux-kernel, patches, alsa-devel, linux

We will often call sync after several functions that require the DAPM
mutex to be held. Rather than release and immediately relock the mutex
provide an unlocked function for this situation.

Signed-off-by: Charles Keepax <ckeepax@opensource.wolfsonmicro.com>
---
 include/sound/soc-dapm.h |    1 +
 sound/soc/soc-dapm.c     |   27 ++++++++++++++++++++++-----
 2 files changed, 23 insertions(+), 5 deletions(-)

diff --git a/include/sound/soc-dapm.h b/include/sound/soc-dapm.h
index 6e89ef6..3b99176 100644
--- a/include/sound/soc-dapm.h
+++ b/include/sound/soc-dapm.h
@@ -461,6 +461,7 @@ int snd_soc_dapm_nc_pin_unlocked(struct snd_soc_dapm_context *dapm,
 int snd_soc_dapm_get_pin_status(struct snd_soc_dapm_context *dapm,
 				const char *pin);
 int snd_soc_dapm_sync(struct snd_soc_dapm_context *dapm);
+int snd_soc_dapm_sync_unlocked(struct snd_soc_dapm_context *dapm);
 int snd_soc_dapm_force_enable_pin(struct snd_soc_dapm_context *dapm,
 				  const char *pin);
 int snd_soc_dapm_force_enable_pin_unlocked(struct snd_soc_dapm_context *dapm,
diff --git a/sound/soc/soc-dapm.c b/sound/soc/soc-dapm.c
index 1a3fe85..cf8ba48 100644
--- a/sound/soc/soc-dapm.c
+++ b/sound/soc/soc-dapm.c
@@ -2342,18 +2342,18 @@ static int snd_soc_dapm_set_pin(struct snd_soc_dapm_context *dapm,
 }
 
 /**
- * snd_soc_dapm_sync - scan and power dapm paths
+ * snd_soc_dapm_sync_unlocked - scan and power dapm paths
  * @dapm: DAPM context
  *
  * Walks all dapm audio paths and powers widgets according to their
  * stream or path usage.
  *
+ * Requires external locking.
+ *
  * Returns 0 for success.
  */
-int snd_soc_dapm_sync(struct snd_soc_dapm_context *dapm)
+int snd_soc_dapm_sync_unlocked(struct snd_soc_dapm_context *dapm)
 {
-	int ret;
-
 	/*
 	 * Suppress early reports (eg, jacks syncing their state) to avoid
 	 * silly DAPM runs during card startup.
@@ -2361,8 +2361,25 @@ int snd_soc_dapm_sync(struct snd_soc_dapm_context *dapm)
 	if (!dapm->card || !dapm->card->instantiated)
 		return 0;
 
+	return dapm_power_widgets(dapm->card, SND_SOC_DAPM_STREAM_NOP);
+}
+EXPORT_SYMBOL_GPL(snd_soc_dapm_sync_unlocked);
+
+/**
+ * snd_soc_dapm_sync - scan and power dapm paths
+ * @dapm: DAPM context
+ *
+ * Walks all dapm audio paths and powers widgets according to their
+ * stream or path usage.
+ *
+ * Returns 0 for success.
+ */
+int snd_soc_dapm_sync(struct snd_soc_dapm_context *dapm)
+{
+	int ret;
+
 	mutex_lock_nested(&dapm->card->dapm_mutex, SND_SOC_DAPM_CLASS_RUNTIME);
-	ret = dapm_power_widgets(dapm->card, SND_SOC_DAPM_STREAM_NOP);
+	ret = snd_soc_dapm_sync_unlocked(dapm);
 	mutex_unlock(&dapm->card->dapm_mutex);
 	return ret;
 }
-- 
1.7.2.5


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

* [PATCH 04/17 v2] ASoC: dapm: Add unlocked version of snd_soc_dapm_sync
@ 2014-02-18 15:22   ` Charles Keepax
  0 siblings, 0 replies; 47+ messages in thread
From: Charles Keepax @ 2014-02-18 15:22 UTC (permalink / raw)
  To: broonie
  Cc: alsa-devel, lars, eric.y.miao, dmitry.torokhov, lgirdwood,
	haojian.zhuang, linux-kernel, peter.ujfalusi, cw00.choi,
	myungjoo.ham, patches, linux, jarkko.nikula

We will often call sync after several functions that require the DAPM
mutex to be held. Rather than release and immediately relock the mutex
provide an unlocked function for this situation.

Signed-off-by: Charles Keepax <ckeepax@opensource.wolfsonmicro.com>
---
 include/sound/soc-dapm.h |    1 +
 sound/soc/soc-dapm.c     |   27 ++++++++++++++++++++++-----
 2 files changed, 23 insertions(+), 5 deletions(-)

diff --git a/include/sound/soc-dapm.h b/include/sound/soc-dapm.h
index 6e89ef6..3b99176 100644
--- a/include/sound/soc-dapm.h
+++ b/include/sound/soc-dapm.h
@@ -461,6 +461,7 @@ int snd_soc_dapm_nc_pin_unlocked(struct snd_soc_dapm_context *dapm,
 int snd_soc_dapm_get_pin_status(struct snd_soc_dapm_context *dapm,
 				const char *pin);
 int snd_soc_dapm_sync(struct snd_soc_dapm_context *dapm);
+int snd_soc_dapm_sync_unlocked(struct snd_soc_dapm_context *dapm);
 int snd_soc_dapm_force_enable_pin(struct snd_soc_dapm_context *dapm,
 				  const char *pin);
 int snd_soc_dapm_force_enable_pin_unlocked(struct snd_soc_dapm_context *dapm,
diff --git a/sound/soc/soc-dapm.c b/sound/soc/soc-dapm.c
index 1a3fe85..cf8ba48 100644
--- a/sound/soc/soc-dapm.c
+++ b/sound/soc/soc-dapm.c
@@ -2342,18 +2342,18 @@ static int snd_soc_dapm_set_pin(struct snd_soc_dapm_context *dapm,
 }
 
 /**
- * snd_soc_dapm_sync - scan and power dapm paths
+ * snd_soc_dapm_sync_unlocked - scan and power dapm paths
  * @dapm: DAPM context
  *
  * Walks all dapm audio paths and powers widgets according to their
  * stream or path usage.
  *
+ * Requires external locking.
+ *
  * Returns 0 for success.
  */
-int snd_soc_dapm_sync(struct snd_soc_dapm_context *dapm)
+int snd_soc_dapm_sync_unlocked(struct snd_soc_dapm_context *dapm)
 {
-	int ret;
-
 	/*
 	 * Suppress early reports (eg, jacks syncing their state) to avoid
 	 * silly DAPM runs during card startup.
@@ -2361,8 +2361,25 @@ int snd_soc_dapm_sync(struct snd_soc_dapm_context *dapm)
 	if (!dapm->card || !dapm->card->instantiated)
 		return 0;
 
+	return dapm_power_widgets(dapm->card, SND_SOC_DAPM_STREAM_NOP);
+}
+EXPORT_SYMBOL_GPL(snd_soc_dapm_sync_unlocked);
+
+/**
+ * snd_soc_dapm_sync - scan and power dapm paths
+ * @dapm: DAPM context
+ *
+ * Walks all dapm audio paths and powers widgets according to their
+ * stream or path usage.
+ *
+ * Returns 0 for success.
+ */
+int snd_soc_dapm_sync(struct snd_soc_dapm_context *dapm)
+{
+	int ret;
+
 	mutex_lock_nested(&dapm->card->dapm_mutex, SND_SOC_DAPM_CLASS_RUNTIME);
-	ret = dapm_power_widgets(dapm->card, SND_SOC_DAPM_STREAM_NOP);
+	ret = snd_soc_dapm_sync_unlocked(dapm);
 	mutex_unlock(&dapm->card->dapm_mutex);
 	return ret;
 }
-- 
1.7.2.5

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

* [PATCH 05/17 v2] ASoC: adav80x: Update locking around use of DAPM pin API
  2014-02-18 15:22 ` Charles Keepax
                   ` (4 preceding siblings ...)
  (?)
@ 2014-02-18 15:22 ` Charles Keepax
  2014-02-18 16:12   ` Lars-Peter Clausen
  2014-02-20 10:25   ` Mark Brown
  -1 siblings, 2 replies; 47+ messages in thread
From: Charles Keepax @ 2014-02-18 15:22 UTC (permalink / raw)
  To: broonie
  Cc: myungjoo.ham, cw00.choi, dmitry.torokhov, lgirdwood, lars,
	peter.ujfalusi, jarkko.nikula, eric.y.miao, haojian.zhuang,
	linux-kernel, patches, alsa-devel, linux

The pin updates in this driver look like they are intended to be done
atomically, update to do so.

Signed-off-by: Charles Keepax <ckeepax@opensource.wolfsonmicro.com>
---
 sound/soc/codecs/adav80x.c |   17 +++++++++++------
 1 files changed, 11 insertions(+), 6 deletions(-)

diff --git a/sound/soc/codecs/adav80x.c b/sound/soc/codecs/adav80x.c
index 09d5609..9eb53c8 100644
--- a/sound/soc/codecs/adav80x.c
+++ b/sound/soc/codecs/adav80x.c
@@ -539,6 +539,7 @@ static int adav80x_set_sysclk(struct snd_soc_codec *codec,
 			      unsigned int freq, int dir)
 {
 	struct adav80x *adav80x = snd_soc_codec_get_drvdata(codec);
+	struct snd_soc_dapm_context *dapm = &codec->dapm;
 
 	if (dir == SND_SOC_CLOCK_IN) {
 		switch (clk_id) {
@@ -571,7 +572,7 @@ static int adav80x_set_sysclk(struct snd_soc_codec *codec,
 			regmap_write(adav80x->regmap, ADAV80X_ICLK_CTRL2,
 				iclk_ctrl2);
 
-			snd_soc_dapm_sync(&codec->dapm);
+			snd_soc_dapm_sync(dapm);
 		}
 	} else {
 		unsigned int mask;
@@ -598,17 +599,21 @@ static int adav80x_set_sysclk(struct snd_soc_codec *codec,
 			adav80x->sysclk_pd[clk_id] = false;
 		}
 
+		snd_soc_dapm_mutex_lock(dapm);
+
 		if (adav80x->sysclk_pd[0])
-			snd_soc_dapm_disable_pin(&codec->dapm, "PLL1");
+			snd_soc_dapm_disable_pin_unlocked(dapm, "PLL1");
 		else
-			snd_soc_dapm_force_enable_pin(&codec->dapm, "PLL1");
+			snd_soc_dapm_force_enable_pin_unlocked(dapm, "PLL1");
 
 		if (adav80x->sysclk_pd[1] || adav80x->sysclk_pd[2])
-			snd_soc_dapm_disable_pin(&codec->dapm, "PLL2");
+			snd_soc_dapm_disable_pin_unlocked(dapm, "PLL2");
 		else
-			snd_soc_dapm_force_enable_pin(&codec->dapm, "PLL2");
+			snd_soc_dapm_force_enable_pin_unlocked(dapm, "PLL2");
 
-		snd_soc_dapm_sync(&codec->dapm);
+		snd_soc_dapm_sync_unlocked(dapm);
+
+		snd_soc_dapm_mutex_unlock(dapm);
 	}
 
 	return 0;
-- 
1.7.2.5


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

* [PATCH 06/17 v2] ASoC: wm5100: Update locking around use of DAPM pin API
  2014-02-18 15:22 ` Charles Keepax
@ 2014-02-18 15:22   ` Charles Keepax
  -1 siblings, 0 replies; 47+ messages in thread
From: Charles Keepax @ 2014-02-18 15:22 UTC (permalink / raw)
  To: broonie
  Cc: myungjoo.ham, cw00.choi, dmitry.torokhov, lgirdwood, lars,
	peter.ujfalusi, jarkko.nikula, eric.y.miao, haojian.zhuang,
	linux-kernel, patches, alsa-devel, linux

The pin updates in this driver look like they are intended to be done
atomically, update to do so.

Signed-off-by: Charles Keepax <ckeepax@opensource.wolfsonmicro.com>
---
 sound/soc/codecs/wm5100.c |   12 +++++++++---
 1 files changed, 9 insertions(+), 3 deletions(-)

diff --git a/sound/soc/codecs/wm5100.c b/sound/soc/codecs/wm5100.c
index 4e3e31a..492fe84 100644
--- a/sound/soc/codecs/wm5100.c
+++ b/sound/soc/codecs/wm5100.c
@@ -2100,6 +2100,7 @@ static void wm5100_micd_irq(struct wm5100_priv *wm5100)
 int wm5100_detect(struct snd_soc_codec *codec, struct snd_soc_jack *jack)
 {
 	struct wm5100_priv *wm5100 = snd_soc_codec_get_drvdata(codec);
+	struct snd_soc_dapm_context *dapm = &codec->dapm;
 
 	if (jack) {
 		wm5100->jack = jack;
@@ -2117,9 +2118,14 @@ int wm5100_detect(struct snd_soc_codec *codec, struct snd_soc_jack *jack)
 				    WM5100_ACCDET_RATE_MASK);
 
 		/* We need the charge pump to power MICBIAS */
-		snd_soc_dapm_force_enable_pin(&codec->dapm, "CP2");
-		snd_soc_dapm_force_enable_pin(&codec->dapm, "SYSCLK");
-		snd_soc_dapm_sync(&codec->dapm);
+		snd_soc_dapm_mutex_lock(dapm);
+
+		snd_soc_dapm_force_enable_pin_unlocked(dapm, "CP2");
+		snd_soc_dapm_force_enable_pin_unlocked(dapm, "SYSCLK");
+
+		snd_soc_dapm_sync_unlocked(dapm);
+
+		snd_soc_dapm_mutex_unlock(dapm);
 
 		/* We start off just enabling microphone detection - even a
 		 * plain headphone will trigger detection.
-- 
1.7.2.5


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

* [PATCH 06/17 v2] ASoC: wm5100: Update locking around use of DAPM pin API
@ 2014-02-18 15:22   ` Charles Keepax
  0 siblings, 0 replies; 47+ messages in thread
From: Charles Keepax @ 2014-02-18 15:22 UTC (permalink / raw)
  To: broonie
  Cc: alsa-devel, lars, eric.y.miao, dmitry.torokhov, lgirdwood,
	haojian.zhuang, linux-kernel, peter.ujfalusi, cw00.choi,
	myungjoo.ham, patches, linux, jarkko.nikula

The pin updates in this driver look like they are intended to be done
atomically, update to do so.

Signed-off-by: Charles Keepax <ckeepax@opensource.wolfsonmicro.com>
---
 sound/soc/codecs/wm5100.c |   12 +++++++++---
 1 files changed, 9 insertions(+), 3 deletions(-)

diff --git a/sound/soc/codecs/wm5100.c b/sound/soc/codecs/wm5100.c
index 4e3e31a..492fe84 100644
--- a/sound/soc/codecs/wm5100.c
+++ b/sound/soc/codecs/wm5100.c
@@ -2100,6 +2100,7 @@ static void wm5100_micd_irq(struct wm5100_priv *wm5100)
 int wm5100_detect(struct snd_soc_codec *codec, struct snd_soc_jack *jack)
 {
 	struct wm5100_priv *wm5100 = snd_soc_codec_get_drvdata(codec);
+	struct snd_soc_dapm_context *dapm = &codec->dapm;
 
 	if (jack) {
 		wm5100->jack = jack;
@@ -2117,9 +2118,14 @@ int wm5100_detect(struct snd_soc_codec *codec, struct snd_soc_jack *jack)
 				    WM5100_ACCDET_RATE_MASK);
 
 		/* We need the charge pump to power MICBIAS */
-		snd_soc_dapm_force_enable_pin(&codec->dapm, "CP2");
-		snd_soc_dapm_force_enable_pin(&codec->dapm, "SYSCLK");
-		snd_soc_dapm_sync(&codec->dapm);
+		snd_soc_dapm_mutex_lock(dapm);
+
+		snd_soc_dapm_force_enable_pin_unlocked(dapm, "CP2");
+		snd_soc_dapm_force_enable_pin_unlocked(dapm, "SYSCLK");
+
+		snd_soc_dapm_sync_unlocked(dapm);
+
+		snd_soc_dapm_mutex_unlock(dapm);
 
 		/* We start off just enabling microphone detection - even a
 		 * plain headphone will trigger detection.
-- 
1.7.2.5

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

* [PATCH 07/17 v2] ASoC: wm8962: Update locking around use of DAPM pin API
  2014-02-18 15:22 ` Charles Keepax
                   ` (6 preceding siblings ...)
  (?)
@ 2014-02-18 15:22 ` Charles Keepax
  2014-02-20 10:26   ` Mark Brown
  -1 siblings, 1 reply; 47+ messages in thread
From: Charles Keepax @ 2014-02-18 15:22 UTC (permalink / raw)
  To: broonie
  Cc: myungjoo.ham, cw00.choi, dmitry.torokhov, lgirdwood, lars,
	peter.ujfalusi, jarkko.nikula, eric.y.miao, haojian.zhuang,
	linux-kernel, patches, alsa-devel, linux

The pin updates in this driver look like they are intended to be done
atomically, update to do so.

Signed-off-by: Charles Keepax <ckeepax@opensource.wolfsonmicro.com>
---
 sound/soc/codecs/wm8962.c |   13 +++++++++----
 1 files changed, 9 insertions(+), 4 deletions(-)

diff --git a/sound/soc/codecs/wm8962.c b/sound/soc/codecs/wm8962.c
index c06bb50..3be4633 100644
--- a/sound/soc/codecs/wm8962.c
+++ b/sound/soc/codecs/wm8962.c
@@ -3106,6 +3106,7 @@ static irqreturn_t wm8962_irq(int irq, void *data)
 int wm8962_mic_detect(struct snd_soc_codec *codec, struct snd_soc_jack *jack)
 {
 	struct wm8962_priv *wm8962 = snd_soc_codec_get_drvdata(codec);
+	struct snd_soc_dapm_context *dapm = &codec->dapm;
 	int irq_mask, enable;
 
 	wm8962->jack = jack;
@@ -3126,14 +3127,18 @@ int wm8962_mic_detect(struct snd_soc_codec *codec, struct snd_soc_jack *jack)
 	snd_soc_jack_report(wm8962->jack, 0,
 			    SND_JACK_MICROPHONE | SND_JACK_BTN_0);
 
+	snd_soc_dapm_mutex_lock(dapm);
+
 	if (jack) {
-		snd_soc_dapm_force_enable_pin(&codec->dapm, "SYSCLK");
-		snd_soc_dapm_force_enable_pin(&codec->dapm, "MICBIAS");
+		snd_soc_dapm_force_enable_pin_unlocked(dapm, "SYSCLK");
+		snd_soc_dapm_force_enable_pin_unlocked(dapm, "MICBIAS");
 	} else {
-		snd_soc_dapm_disable_pin(&codec->dapm, "SYSCLK");
-		snd_soc_dapm_disable_pin(&codec->dapm, "MICBIAS");
+		snd_soc_dapm_disable_pin_unlocked(dapm, "SYSCLK");
+		snd_soc_dapm_disable_pin_unlocked(dapm, "MICBIAS");
 	}
 
+	snd_soc_dapm_mutex_unlock(dapm);
+
 	return 0;
 }
 EXPORT_SYMBOL_GPL(wm8962_mic_detect);
-- 
1.7.2.5


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

* [PATCH 08/17 v2] ASoC: wm8994: Update locking around use of DAPM pin API
  2014-02-18 15:22 ` Charles Keepax
                   ` (7 preceding siblings ...)
  (?)
@ 2014-02-18 15:22 ` Charles Keepax
  2014-02-20 10:26   ` Mark Brown
  -1 siblings, 1 reply; 47+ messages in thread
From: Charles Keepax @ 2014-02-18 15:22 UTC (permalink / raw)
  To: broonie
  Cc: myungjoo.ham, cw00.choi, dmitry.torokhov, lgirdwood, lars,
	peter.ujfalusi, jarkko.nikula, eric.y.miao, haojian.zhuang,
	linux-kernel, patches, alsa-devel, linux

The pin updates in this driver look like they are intended to be done
atomically, update to do so.

Signed-off-by: Charles Keepax <ckeepax@opensource.wolfsonmicro.com>
---
 sound/soc/codecs/wm8994.c |   45 +++++++++++++++++++++++++++------------------
 1 files changed, 27 insertions(+), 18 deletions(-)

diff --git a/sound/soc/codecs/wm8994.c b/sound/soc/codecs/wm8994.c
index b9be9cb..e8daf55 100644
--- a/sound/soc/codecs/wm8994.c
+++ b/sound/soc/codecs/wm8994.c
@@ -2549,43 +2549,52 @@ static int wm8994_set_bias_level(struct snd_soc_codec *codec,
 int wm8994_vmid_mode(struct snd_soc_codec *codec, enum wm8994_vmid_mode mode)
 {
 	struct wm8994_priv *wm8994 = snd_soc_codec_get_drvdata(codec);
+	struct snd_soc_dapm_context *dapm = &codec->dapm;
 
 	switch (mode) {
 	case WM8994_VMID_NORMAL:
+		snd_soc_dapm_mutex_lock(dapm);
+
 		if (wm8994->hubs.lineout1_se) {
-			snd_soc_dapm_disable_pin(&codec->dapm,
-						 "LINEOUT1N Driver");
-			snd_soc_dapm_disable_pin(&codec->dapm,
-						 "LINEOUT1P Driver");
+			snd_soc_dapm_disable_pin_unlocked(dapm,
+							  "LINEOUT1N Driver");
+			snd_soc_dapm_disable_pin_unlocked(dapm,
+							  "LINEOUT1P Driver");
 		}
 		if (wm8994->hubs.lineout2_se) {
-			snd_soc_dapm_disable_pin(&codec->dapm,
-						 "LINEOUT2N Driver");
-			snd_soc_dapm_disable_pin(&codec->dapm,
-						 "LINEOUT2P Driver");
+			snd_soc_dapm_disable_pin_unlocked(dapm,
+							  "LINEOUT2N Driver");
+			snd_soc_dapm_disable_pin_unlocked(dapm,
+							  "LINEOUT2P Driver");
 		}
 
 		/* Do the sync with the old mode to allow it to clean up */
-		snd_soc_dapm_sync(&codec->dapm);
+		snd_soc_dapm_sync_unlocked(dapm);
 		wm8994->vmid_mode = mode;
+
+		snd_soc_dapm_mutex_unlock(dapm);
 		break;
 
 	case WM8994_VMID_FORCE:
+		snd_soc_dapm_mutex_lock(dapm);
+
 		if (wm8994->hubs.lineout1_se) {
-			snd_soc_dapm_force_enable_pin(&codec->dapm,
-						      "LINEOUT1N Driver");
-			snd_soc_dapm_force_enable_pin(&codec->dapm,
-						      "LINEOUT1P Driver");
+			snd_soc_dapm_force_enable_pin_unlocked(dapm,
+							       "LINEOUT1N Driver");
+			snd_soc_dapm_force_enable_pin_unlocked(dapm,
+							       "LINEOUT1P Driver");
 		}
 		if (wm8994->hubs.lineout2_se) {
-			snd_soc_dapm_force_enable_pin(&codec->dapm,
-						      "LINEOUT2N Driver");
-			snd_soc_dapm_force_enable_pin(&codec->dapm,
-						      "LINEOUT2P Driver");
+			snd_soc_dapm_force_enable_pin_unlocked(dapm,
+							       "LINEOUT2N Driver");
+			snd_soc_dapm_force_enable_pin_unlocked(dapm,
+							       "LINEOUT2P Driver");
 		}
 
 		wm8994->vmid_mode = mode;
-		snd_soc_dapm_sync(&codec->dapm);
+		snd_soc_dapm_sync_unlocked(dapm);
+
+		snd_soc_dapm_mutex_unlock(dapm);
 		break;
 
 	default:
-- 
1.7.2.5


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

* [PATCH 09/17 v2] ASoC: wm8996: Update locking around use of DAPM pin API
  2014-02-18 15:22 ` Charles Keepax
                   ` (8 preceding siblings ...)
  (?)
@ 2014-02-18 15:22 ` Charles Keepax
  2014-02-20 10:27   ` Mark Brown
  -1 siblings, 1 reply; 47+ messages in thread
From: Charles Keepax @ 2014-02-18 15:22 UTC (permalink / raw)
  To: broonie
  Cc: myungjoo.ham, cw00.choi, dmitry.torokhov, lgirdwood, lars,
	peter.ujfalusi, jarkko.nikula, eric.y.miao, haojian.zhuang,
	linux-kernel, patches, alsa-devel, linux

The pin updates in this driver look like they are intended to be done
atomically, update to do so.

Signed-off-by: Charles Keepax <ckeepax@opensource.wolfsonmicro.com>
---
 sound/soc/codecs/wm8996.c |    9 +++++++--
 1 files changed, 7 insertions(+), 2 deletions(-)

diff --git a/sound/soc/codecs/wm8996.c b/sound/soc/codecs/wm8996.c
index 1a7655b..d565d0a 100644
--- a/sound/soc/codecs/wm8996.c
+++ b/sound/soc/codecs/wm8996.c
@@ -2251,6 +2251,7 @@ int wm8996_detect(struct snd_soc_codec *codec, struct snd_soc_jack *jack,
 		  wm8996_polarity_fn polarity_cb)
 {
 	struct wm8996_priv *wm8996 = snd_soc_codec_get_drvdata(codec);
+	struct snd_soc_dapm_context *dapm = &codec->dapm;
 
 	wm8996->jack = jack;
 	wm8996->detecting = true;
@@ -2267,8 +2268,12 @@ int wm8996_detect(struct snd_soc_codec *codec, struct snd_soc_jack *jack,
 			    WM8996_MICB2_DISCH, 0);
 
 	/* LDO2 powers the microphones, SYSCLK clocks detection */
-	snd_soc_dapm_force_enable_pin(&codec->dapm, "LDO2");
-	snd_soc_dapm_force_enable_pin(&codec->dapm, "SYSCLK");
+	snd_soc_dapm_mutex_lock(dapm);
+
+	snd_soc_dapm_force_enable_pin_unlocked(dapm, "LDO2");
+	snd_soc_dapm_force_enable_pin_unlocked(dapm, "SYSCLK");
+
+	snd_soc_dapm_mutex_unlock(dapm);
 
 	/* We start off just enabling microphone detection - even a
 	 * plain headphone will trigger detection.
-- 
1.7.2.5


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

* [PATCH 10/17 v2] ASoC: mfld_machine: Update locking around use of DAPM pin API
  2014-02-18 15:22 ` Charles Keepax
                   ` (9 preceding siblings ...)
  (?)
@ 2014-02-18 15:22 ` Charles Keepax
  2014-02-20 10:27   ` Mark Brown
  -1 siblings, 1 reply; 47+ messages in thread
From: Charles Keepax @ 2014-02-18 15:22 UTC (permalink / raw)
  To: broonie
  Cc: myungjoo.ham, cw00.choi, dmitry.torokhov, lgirdwood, lars,
	peter.ujfalusi, jarkko.nikula, eric.y.miao, haojian.zhuang,
	linux-kernel, patches, alsa-devel, linux

The pin updates in this driver look like they are intended to be done
atomically, update to do so.

Signed-off-by: Charles Keepax <ckeepax@opensource.wolfsonmicro.com>
---
 sound/soc/intel/mfld_machine.c |   65 +++++++++++++++++++++++++---------------
 1 files changed, 41 insertions(+), 24 deletions(-)

diff --git a/sound/soc/intel/mfld_machine.c b/sound/soc/intel/mfld_machine.c
index d3d4c32..0cef32e 100644
--- a/sound/soc/intel/mfld_machine.c
+++ b/sound/soc/intel/mfld_machine.c
@@ -101,20 +101,27 @@ static int headset_set_switch(struct snd_kcontrol *kcontrol,
 	struct snd_ctl_elem_value *ucontrol)
 {
 	struct snd_soc_codec *codec =  snd_kcontrol_chip(kcontrol);
+	struct snd_soc_dapm_context *dapm = &codec->dapm;
 
 	if (ucontrol->value.integer.value[0] == hs_switch)
 		return 0;
 
+	snd_soc_dapm_mutex_lock(dapm);
+
 	if (ucontrol->value.integer.value[0]) {
 		pr_debug("hs_set HS path\n");
-		snd_soc_dapm_enable_pin(&codec->dapm, "Headphones");
-		snd_soc_dapm_disable_pin(&codec->dapm, "EPOUT");
+		snd_soc_dapm_enable_pin_unlocked(dapm, "Headphones");
+		snd_soc_dapm_disable_pin_unlocked(dapm, "EPOUT");
 	} else {
 		pr_debug("hs_set EP path\n");
-		snd_soc_dapm_disable_pin(&codec->dapm, "Headphones");
-		snd_soc_dapm_enable_pin(&codec->dapm, "EPOUT");
+		snd_soc_dapm_disable_pin_unlocked(dapm, "Headphones");
+		snd_soc_dapm_enable_pin_unlocked(dapm, "EPOUT");
 	}
-	snd_soc_dapm_sync(&codec->dapm);
+
+	snd_soc_dapm_sync_unlocked(dapm);
+
+	snd_soc_dapm_mutex_unlock(dapm);
+
 	hs_switch = ucontrol->value.integer.value[0];
 
 	return 0;
@@ -122,18 +129,20 @@ static int headset_set_switch(struct snd_kcontrol *kcontrol,
 
 static void lo_enable_out_pins(struct snd_soc_codec *codec)
 {
-	snd_soc_dapm_enable_pin(&codec->dapm, "IHFOUTL");
-	snd_soc_dapm_enable_pin(&codec->dapm, "IHFOUTR");
-	snd_soc_dapm_enable_pin(&codec->dapm, "LINEOUTL");
-	snd_soc_dapm_enable_pin(&codec->dapm, "LINEOUTR");
-	snd_soc_dapm_enable_pin(&codec->dapm, "VIB1OUT");
-	snd_soc_dapm_enable_pin(&codec->dapm, "VIB2OUT");
+	struct snd_soc_dapm_context *dapm = &codec->dapm;
+
+	snd_soc_dapm_enable_pin_unlocked(dapm, "IHFOUTL");
+	snd_soc_dapm_enable_pin_unlocked(dapm, "IHFOUTR");
+	snd_soc_dapm_enable_pin_unlocked(dapm, "LINEOUTL");
+	snd_soc_dapm_enable_pin_unlocked(dapm, "LINEOUTR");
+	snd_soc_dapm_enable_pin_unlocked(dapm, "VIB1OUT");
+	snd_soc_dapm_enable_pin_unlocked(dapm, "VIB2OUT");
 	if (hs_switch) {
-		snd_soc_dapm_enable_pin(&codec->dapm, "Headphones");
-		snd_soc_dapm_disable_pin(&codec->dapm, "EPOUT");
+		snd_soc_dapm_enable_pin_unlocked(dapm, "Headphones");
+		snd_soc_dapm_disable_pin_unlocked(dapm, "EPOUT");
 	} else {
-		snd_soc_dapm_disable_pin(&codec->dapm, "Headphones");
-		snd_soc_dapm_enable_pin(&codec->dapm, "EPOUT");
+		snd_soc_dapm_disable_pin_unlocked(dapm, "Headphones");
+		snd_soc_dapm_enable_pin_unlocked(dapm, "EPOUT");
 	}
 }
 
@@ -148,44 +157,52 @@ static int lo_set_switch(struct snd_kcontrol *kcontrol,
 	struct snd_ctl_elem_value *ucontrol)
 {
 	struct snd_soc_codec *codec =  snd_kcontrol_chip(kcontrol);
+	struct snd_soc_dapm_context *dapm = &codec->dapm;
 
 	if (ucontrol->value.integer.value[0] == lo_dac)
 		return 0;
 
+	snd_soc_dapm_mutex_lock(dapm);
+
 	/* we dont want to work with last state of lineout so just enable all
 	 * pins and then disable pins not required
 	 */
 	lo_enable_out_pins(codec);
+
 	switch (ucontrol->value.integer.value[0]) {
 	case 0:
 		pr_debug("set vibra path\n");
-		snd_soc_dapm_disable_pin(&codec->dapm, "VIB1OUT");
-		snd_soc_dapm_disable_pin(&codec->dapm, "VIB2OUT");
+		snd_soc_dapm_disable_pin_unlocked(dapm, "VIB1OUT");
+		snd_soc_dapm_disable_pin_unlocked(dapm, "VIB2OUT");
 		snd_soc_update_bits(codec, SN95031_LOCTL, 0x66, 0);
 		break;
 
 	case 1:
 		pr_debug("set hs  path\n");
-		snd_soc_dapm_disable_pin(&codec->dapm, "Headphones");
-		snd_soc_dapm_disable_pin(&codec->dapm, "EPOUT");
+		snd_soc_dapm_disable_pin_unlocked(dapm, "Headphones");
+		snd_soc_dapm_disable_pin_unlocked(dapm, "EPOUT");
 		snd_soc_update_bits(codec, SN95031_LOCTL, 0x66, 0x22);
 		break;
 
 	case 2:
 		pr_debug("set spkr path\n");
-		snd_soc_dapm_disable_pin(&codec->dapm, "IHFOUTL");
-		snd_soc_dapm_disable_pin(&codec->dapm, "IHFOUTR");
+		snd_soc_dapm_disable_pin_unlocked(dapm, "IHFOUTL");
+		snd_soc_dapm_disable_pin_unlocked(dapm, "IHFOUTR");
 		snd_soc_update_bits(codec, SN95031_LOCTL, 0x66, 0x44);
 		break;
 
 	case 3:
 		pr_debug("set null path\n");
-		snd_soc_dapm_disable_pin(&codec->dapm, "LINEOUTL");
-		snd_soc_dapm_disable_pin(&codec->dapm, "LINEOUTR");
+		snd_soc_dapm_disable_pin_unlocked(dapm, "LINEOUTL");
+		snd_soc_dapm_disable_pin_unlocked(dapm, "LINEOUTR");
 		snd_soc_update_bits(codec, SN95031_LOCTL, 0x66, 0x66);
 		break;
 	}
-	snd_soc_dapm_sync(&codec->dapm);
+
+	snd_soc_dapm_sync_unlocked(dapm);
+
+	snd_soc_dapm_mutex_unlock(dapm);
+
 	lo_dac = ucontrol->value.integer.value[0];
 	return 0;
 }
-- 
1.7.2.5


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

* [PATCH 11/17 v2] ASoC: ams-delta: Update locking around use of DAPM pin API
  2014-02-18 15:22 ` Charles Keepax
                   ` (10 preceding siblings ...)
  (?)
@ 2014-02-18 15:22 ` Charles Keepax
  2014-02-20 10:27   ` Mark Brown
  -1 siblings, 1 reply; 47+ messages in thread
From: Charles Keepax @ 2014-02-18 15:22 UTC (permalink / raw)
  To: broonie
  Cc: myungjoo.ham, cw00.choi, dmitry.torokhov, lgirdwood, lars,
	peter.ujfalusi, jarkko.nikula, eric.y.miao, haojian.zhuang,
	linux-kernel, patches, alsa-devel, linux

The pin updates in this driver look like they are intended to be done
atomically, update to do so. It looks like these were originally locked
with the CODEC mutex and not updated since the patch "ASoC: dapm: Use
DAPM mutex for DAPM ops instead of codec mutex", so remove the original
CODEC mutex locking as well.

Signed-off-by: Charles Keepax <ckeepax@opensource.wolfsonmicro.com>
---
 sound/soc/omap/ams-delta.c |   45 +++++++++++++++++++++++++------------------
 1 files changed, 26 insertions(+), 19 deletions(-)

diff --git a/sound/soc/omap/ams-delta.c b/sound/soc/omap/ams-delta.c
index 6294464..5750de1 100644
--- a/sound/soc/omap/ams-delta.c
+++ b/sound/soc/omap/ams-delta.c
@@ -106,57 +106,59 @@ static int ams_delta_set_audio_mode(struct snd_kcontrol *kcontrol,
 	if (ucontrol->value.enumerated.item[0] >= control->max)
 		return -EINVAL;
 
-	mutex_lock(&codec->mutex);
+	snd_soc_dapm_mutex_lock(dapm);
 
 	/* Translate selection to bitmap */
 	pins = ams_delta_audio_mode_pins[ucontrol->value.enumerated.item[0]];
 
 	/* Setup pins after corresponding bits if changed */
 	pin = !!(pins & (1 << AMS_DELTA_MOUTHPIECE));
+
 	if (pin != snd_soc_dapm_get_pin_status(dapm, "Mouthpiece")) {
 		changed = 1;
 		if (pin)
-			snd_soc_dapm_enable_pin(dapm, "Mouthpiece");
+			snd_soc_dapm_enable_pin_unlocked(dapm, "Mouthpiece");
 		else
-			snd_soc_dapm_disable_pin(dapm, "Mouthpiece");
+			snd_soc_dapm_disable_pin_unlocked(dapm, "Mouthpiece");
 	}
 	pin = !!(pins & (1 << AMS_DELTA_EARPIECE));
 	if (pin != snd_soc_dapm_get_pin_status(dapm, "Earpiece")) {
 		changed = 1;
 		if (pin)
-			snd_soc_dapm_enable_pin(dapm, "Earpiece");
+			snd_soc_dapm_enable_pin_unlocked(dapm, "Earpiece");
 		else
-			snd_soc_dapm_disable_pin(dapm, "Earpiece");
+			snd_soc_dapm_disable_pin_unlocked(dapm, "Earpiece");
 	}
 	pin = !!(pins & (1 << AMS_DELTA_MICROPHONE));
 	if (pin != snd_soc_dapm_get_pin_status(dapm, "Microphone")) {
 		changed = 1;
 		if (pin)
-			snd_soc_dapm_enable_pin(dapm, "Microphone");
+			snd_soc_dapm_enable_pin_unlocked(dapm, "Microphone");
 		else
-			snd_soc_dapm_disable_pin(dapm, "Microphone");
+			snd_soc_dapm_disable_pin_unlocked(dapm, "Microphone");
 	}
 	pin = !!(pins & (1 << AMS_DELTA_SPEAKER));
 	if (pin != snd_soc_dapm_get_pin_status(dapm, "Speaker")) {
 		changed = 1;
 		if (pin)
-			snd_soc_dapm_enable_pin(dapm, "Speaker");
+			snd_soc_dapm_enable_pin_unlocked(dapm, "Speaker");
 		else
-			snd_soc_dapm_disable_pin(dapm, "Speaker");
+			snd_soc_dapm_disable_pin_unlocked(dapm, "Speaker");
 	}
 	pin = !!(pins & (1 << AMS_DELTA_AGC));
 	if (pin != ams_delta_audio_agc) {
 		ams_delta_audio_agc = pin;
 		changed = 1;
 		if (pin)
-			snd_soc_dapm_enable_pin(dapm, "AGCIN");
+			snd_soc_dapm_enable_pin_unlocked(dapm, "AGCIN");
 		else
-			snd_soc_dapm_disable_pin(dapm, "AGCIN");
+			snd_soc_dapm_disable_pin_unlocked(dapm, "AGCIN");
 	}
+
 	if (changed)
-		snd_soc_dapm_sync(dapm);
+		snd_soc_dapm_sync_unlocked(dapm);
 
-	mutex_unlock(&codec->mutex);
+	snd_soc_dapm_mutex_unlock(dapm);
 
 	return changed;
 }
@@ -315,12 +317,17 @@ static void cx81801_close(struct tty_struct *tty)
 	v253_ops.close(tty);
 
 	/* Revert back to default audio input/output constellation */
-	snd_soc_dapm_disable_pin(dapm, "Mouthpiece");
-	snd_soc_dapm_enable_pin(dapm, "Earpiece");
-	snd_soc_dapm_enable_pin(dapm, "Microphone");
-	snd_soc_dapm_disable_pin(dapm, "Speaker");
-	snd_soc_dapm_disable_pin(dapm, "AGCIN");
-	snd_soc_dapm_sync(dapm);
+	snd_soc_dapm_mutex_lock(dapm);
+
+	snd_soc_dapm_disable_pin_unlocked(dapm, "Mouthpiece");
+	snd_soc_dapm_enable_pin_unlocked(dapm, "Earpiece");
+	snd_soc_dapm_enable_pin_unlocked(dapm, "Microphone");
+	snd_soc_dapm_disable_pin_unlocked(dapm, "Speaker");
+	snd_soc_dapm_disable_pin_unlocked(dapm, "AGCIN");
+
+	snd_soc_dapm_sync_unlocked(dapm);
+
+	snd_soc_dapm_mutex_unlock(codec);
 }
 
 /* Line discipline .hangup() */
-- 
1.7.2.5


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

* [PATCH 12/17 v2] ASoC: omap: n810: Update locking around use of DAPM pin API
  2014-02-18 15:22 ` Charles Keepax
                   ` (11 preceding siblings ...)
  (?)
@ 2014-02-18 15:22 ` Charles Keepax
  2014-02-20 10:28   ` Mark Brown
  -1 siblings, 1 reply; 47+ messages in thread
From: Charles Keepax @ 2014-02-18 15:22 UTC (permalink / raw)
  To: broonie
  Cc: myungjoo.ham, cw00.choi, dmitry.torokhov, lgirdwood, lars,
	peter.ujfalusi, jarkko.nikula, eric.y.miao, haojian.zhuang,
	linux-kernel, patches, alsa-devel, linux

The pin updates in this driver look like they are intended to be done
atomically, update to do so.

Signed-off-by: Charles Keepax <ckeepax@opensource.wolfsonmicro.com>
---
 sound/soc/omap/n810.c |   22 +++++++++++++---------
 1 files changed, 13 insertions(+), 9 deletions(-)

diff --git a/sound/soc/omap/n810.c b/sound/soc/omap/n810.c
index 3fde9e4..480a39c 100644
--- a/sound/soc/omap/n810.c
+++ b/sound/soc/omap/n810.c
@@ -68,26 +68,30 @@ static void n810_ext_control(struct snd_soc_dapm_context *dapm)
 		break;
 	}
 
+	snd_soc_dapm_mutex_lock(dapm);
+
 	if (n810_spk_func)
-		snd_soc_dapm_enable_pin(dapm, "Ext Spk");
+		snd_soc_dapm_enable_pin_unlocked(dapm, "Ext Spk");
 	else
-		snd_soc_dapm_disable_pin(dapm, "Ext Spk");
+		snd_soc_dapm_disable_pin_unlocked(dapm, "Ext Spk");
 
 	if (hp)
-		snd_soc_dapm_enable_pin(dapm, "Headphone Jack");
+		snd_soc_dapm_enable_pin_unlocked(dapm, "Headphone Jack");
 	else
-		snd_soc_dapm_disable_pin(dapm, "Headphone Jack");
+		snd_soc_dapm_disable_pin_unlocked(dapm, "Headphone Jack");
 	if (line1l)
-		snd_soc_dapm_enable_pin(dapm, "LINE1L");
+		snd_soc_dapm_enable_pin_unlocked(dapm, "LINE1L");
 	else
-		snd_soc_dapm_disable_pin(dapm, "LINE1L");
+		snd_soc_dapm_disable_pin_unlocked(dapm, "LINE1L");
 
 	if (n810_dmic_func)
-		snd_soc_dapm_enable_pin(dapm, "DMic");
+		snd_soc_dapm_enable_pin_unlocked(dapm, "DMic");
 	else
-		snd_soc_dapm_disable_pin(dapm, "DMic");
+		snd_soc_dapm_disable_pin_unlocked(dapm, "DMic");
+
+	snd_soc_dapm_sync_unlocked(dapm);
 
-	snd_soc_dapm_sync(dapm);
+	snd_soc_dapm_mutex_unlock(dapm);
 }
 
 static int n810_startup(struct snd_pcm_substream *substream)
-- 
1.7.2.5


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

* [PATCH 13/17 v2] ASoC: omap: rx51: Update locking around use of DAPM pin API
  2014-02-18 15:22 ` Charles Keepax
                   ` (12 preceding siblings ...)
  (?)
@ 2014-02-18 15:22 ` Charles Keepax
  2014-02-20 10:28   ` Mark Brown
  -1 siblings, 1 reply; 47+ messages in thread
From: Charles Keepax @ 2014-02-18 15:22 UTC (permalink / raw)
  To: broonie
  Cc: myungjoo.ham, cw00.choi, dmitry.torokhov, lgirdwood, lars,
	peter.ujfalusi, jarkko.nikula, eric.y.miao, haojian.zhuang,
	linux-kernel, patches, alsa-devel, linux

The pin updates in this driver look like they are intended to be done
atomically, update to do so.

Signed-off-by: Charles Keepax <ckeepax@opensource.wolfsonmicro.com>
---
 sound/soc/omap/rx51.c |   22 +++++++++++++---------
 1 files changed, 13 insertions(+), 9 deletions(-)

diff --git a/sound/soc/omap/rx51.c b/sound/soc/omap/rx51.c
index 611179c..7fb3d4b 100644
--- a/sound/soc/omap/rx51.c
+++ b/sound/soc/omap/rx51.c
@@ -74,26 +74,30 @@ static void rx51_ext_control(struct snd_soc_dapm_context *dapm)
 		break;
 	}
 
+	snd_soc_dapm_mutex_lock(dapm);
+
 	if (rx51_spk_func)
-		snd_soc_dapm_enable_pin(dapm, "Ext Spk");
+		snd_soc_dapm_enable_pin_unlocked(dapm, "Ext Spk");
 	else
-		snd_soc_dapm_disable_pin(dapm, "Ext Spk");
+		snd_soc_dapm_disable_pin_unlocked(dapm, "Ext Spk");
 	if (rx51_dmic_func)
-		snd_soc_dapm_enable_pin(dapm, "DMic");
+		snd_soc_dapm_enable_pin_unlocked(dapm, "DMic");
 	else
-		snd_soc_dapm_disable_pin(dapm, "DMic");
+		snd_soc_dapm_disable_pin_unlocked(dapm, "DMic");
 	if (hp)
-		snd_soc_dapm_enable_pin(dapm, "Headphone Jack");
+		snd_soc_dapm_enable_pin_unlocked(dapm, "Headphone Jack");
 	else
-		snd_soc_dapm_disable_pin(dapm, "Headphone Jack");
+		snd_soc_dapm_disable_pin_unlocked(dapm, "Headphone Jack");
 	if (hs)
-		snd_soc_dapm_enable_pin(dapm, "HS Mic");
+		snd_soc_dapm_enable_pin_unlocked(dapm, "HS Mic");
 	else
-		snd_soc_dapm_disable_pin(dapm, "HS Mic");
+		snd_soc_dapm_disable_pin_unlocked(dapm, "HS Mic");
 
 	gpio_set_value(RX51_TVOUT_SEL_GPIO, tvout);
 
-	snd_soc_dapm_sync(dapm);
+	snd_soc_dapm_sync_unlocked(dapm);
+
+	snd_soc_dapm_mutex_unlock(dapm);
 }
 
 static int rx51_startup(struct snd_pcm_substream *substream)
-- 
1.7.2.5


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

* [PATCH 14/17 v2] ASoC: pxa: corgi: Update locking around use of DAPM pin API
  2014-02-18 15:22 ` Charles Keepax
                   ` (13 preceding siblings ...)
  (?)
@ 2014-02-18 15:22 ` Charles Keepax
  2014-02-20 10:53   ` Mark Brown
  -1 siblings, 1 reply; 47+ messages in thread
From: Charles Keepax @ 2014-02-18 15:22 UTC (permalink / raw)
  To: broonie
  Cc: myungjoo.ham, cw00.choi, dmitry.torokhov, lgirdwood, lars,
	peter.ujfalusi, jarkko.nikula, eric.y.miao, haojian.zhuang,
	linux-kernel, patches, alsa-devel, linux

The pin updates in this driver look like they are intended to be done
atomically, update to do so.

Signed-off-by: Charles Keepax <ckeepax@opensource.wolfsonmicro.com>
---
 sound/soc/pxa/corgi.c |   42 +++++++++++++++++++++++-------------------
 1 files changed, 23 insertions(+), 19 deletions(-)

diff --git a/sound/soc/pxa/corgi.c b/sound/soc/pxa/corgi.c
index 1853d41..9d9c8ad 100644
--- a/sound/soc/pxa/corgi.c
+++ b/sound/soc/pxa/corgi.c
@@ -47,51 +47,55 @@ static int corgi_spk_func;
 
 static void corgi_ext_control(struct snd_soc_dapm_context *dapm)
 {
+	snd_soc_dapm_mutex_lock(dapm);
+
 	/* set up jack connection */
 	switch (corgi_jack_func) {
 	case CORGI_HP:
 		/* set = unmute headphone */
 		gpio_set_value(CORGI_GPIO_MUTE_L, 1);
 		gpio_set_value(CORGI_GPIO_MUTE_R, 1);
-		snd_soc_dapm_disable_pin(dapm, "Mic Jack");
-		snd_soc_dapm_disable_pin(dapm, "Line Jack");
-		snd_soc_dapm_enable_pin(dapm, "Headphone Jack");
-		snd_soc_dapm_disable_pin(dapm, "Headset Jack");
+		snd_soc_dapm_disable_pin_unlocked(dapm, "Mic Jack");
+		snd_soc_dapm_disable_pin_unlocked(dapm, "Line Jack");
+		snd_soc_dapm_enable_pin_unlocked(dapm, "Headphone Jack");
+		snd_soc_dapm_disable_pin_unlocked(dapm, "Headset Jack");
 		break;
 	case CORGI_MIC:
 		/* reset = mute headphone */
 		gpio_set_value(CORGI_GPIO_MUTE_L, 0);
 		gpio_set_value(CORGI_GPIO_MUTE_R, 0);
-		snd_soc_dapm_enable_pin(dapm, "Mic Jack");
-		snd_soc_dapm_disable_pin(dapm, "Line Jack");
-		snd_soc_dapm_disable_pin(dapm, "Headphone Jack");
-		snd_soc_dapm_disable_pin(dapm, "Headset Jack");
+		snd_soc_dapm_enable_pin_unlocked(dapm, "Mic Jack");
+		snd_soc_dapm_disable_pin_unlocked(dapm, "Line Jack");
+		snd_soc_dapm_disable_pin_unlocked(dapm, "Headphone Jack");
+		snd_soc_dapm_disable_pin_unlocked(dapm, "Headset Jack");
 		break;
 	case CORGI_LINE:
 		gpio_set_value(CORGI_GPIO_MUTE_L, 0);
 		gpio_set_value(CORGI_GPIO_MUTE_R, 0);
-		snd_soc_dapm_disable_pin(dapm, "Mic Jack");
-		snd_soc_dapm_enable_pin(dapm, "Line Jack");
-		snd_soc_dapm_disable_pin(dapm, "Headphone Jack");
-		snd_soc_dapm_disable_pin(dapm, "Headset Jack");
+		snd_soc_dapm_disable_pin_unlocked(dapm, "Mic Jack");
+		snd_soc_dapm_enable_pin_unlocked(dapm, "Line Jack");
+		snd_soc_dapm_disable_pin_unlocked(dapm, "Headphone Jack");
+		snd_soc_dapm_disable_pin_unlocked(dapm, "Headset Jack");
 		break;
 	case CORGI_HEADSET:
 		gpio_set_value(CORGI_GPIO_MUTE_L, 0);
 		gpio_set_value(CORGI_GPIO_MUTE_R, 1);
-		snd_soc_dapm_enable_pin(dapm, "Mic Jack");
-		snd_soc_dapm_disable_pin(dapm, "Line Jack");
-		snd_soc_dapm_disable_pin(dapm, "Headphone Jack");
-		snd_soc_dapm_enable_pin(dapm, "Headset Jack");
+		snd_soc_dapm_enable_pin_unlocked(dapm, "Mic Jack");
+		snd_soc_dapm_disable_pin_unlocked(dapm, "Line Jack");
+		snd_soc_dapm_disable_pin_unlocked(dapm, "Headphone Jack");
+		snd_soc_dapm_enable_pin_unlocked(dapm, "Headset Jack");
 		break;
 	}
 
 	if (corgi_spk_func == CORGI_SPK_ON)
-		snd_soc_dapm_enable_pin(dapm, "Ext Spk");
+		snd_soc_dapm_enable_pin_unlocked(dapm, "Ext Spk");
 	else
-		snd_soc_dapm_disable_pin(dapm, "Ext Spk");
+		snd_soc_dapm_disable_pin_unlocked(dapm, "Ext Spk");
 
 	/* signal a DAPM event */
-	snd_soc_dapm_sync(dapm);
+	snd_soc_dapm_sync_unlocked(dapm);
+
+	snd_soc_dapm_mutex_unlock(dapm);
 }
 
 static int corgi_startup(struct snd_pcm_substream *substream)
-- 
1.7.2.5


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

* [PATCH 15/17 v2] ASoC: pxa: magician: Update locking around use of DAPM pin API
  2014-02-18 15:22 ` Charles Keepax
                   ` (14 preceding siblings ...)
  (?)
@ 2014-02-18 15:22 ` Charles Keepax
  2014-02-20 10:54   ` Mark Brown
  -1 siblings, 1 reply; 47+ messages in thread
From: Charles Keepax @ 2014-02-18 15:22 UTC (permalink / raw)
  To: broonie
  Cc: myungjoo.ham, cw00.choi, dmitry.torokhov, lgirdwood, lars,
	peter.ujfalusi, jarkko.nikula, eric.y.miao, haojian.zhuang,
	linux-kernel, patches, alsa-devel, linux

The pin updates in this driver look like they are intended to be done
atomically, update to do so.

Signed-off-by: Charles Keepax <ckeepax@opensource.wolfsonmicro.com>
---
 sound/soc/pxa/magician.c |   22 +++++++++++++---------
 1 files changed, 13 insertions(+), 9 deletions(-)

diff --git a/sound/soc/pxa/magician.c b/sound/soc/pxa/magician.c
index aace19e..31242be 100644
--- a/sound/soc/pxa/magician.c
+++ b/sound/soc/pxa/magician.c
@@ -45,27 +45,31 @@ static void magician_ext_control(struct snd_soc_codec *codec)
 {
 	struct snd_soc_dapm_context *dapm = &codec->dapm;
 
+	snd_soc_dapm_mutex_lock(dapm);
+
 	if (magician_spk_switch)
-		snd_soc_dapm_enable_pin(dapm, "Speaker");
+		snd_soc_dapm_enable_pin_unlocked(dapm, "Speaker");
 	else
-		snd_soc_dapm_disable_pin(dapm, "Speaker");
+		snd_soc_dapm_disable_pin_unlocked(dapm, "Speaker");
 	if (magician_hp_switch)
-		snd_soc_dapm_enable_pin(dapm, "Headphone Jack");
+		snd_soc_dapm_enable_pin_unlocked(dapm, "Headphone Jack");
 	else
-		snd_soc_dapm_disable_pin(dapm, "Headphone Jack");
+		snd_soc_dapm_disable_pin_unlocked(dapm, "Headphone Jack");
 
 	switch (magician_in_sel) {
 	case MAGICIAN_MIC:
-		snd_soc_dapm_disable_pin(dapm, "Headset Mic");
-		snd_soc_dapm_enable_pin(dapm, "Call Mic");
+		snd_soc_dapm_disable_pin_unlocked(dapm, "Headset Mic");
+		snd_soc_dapm_enable_pin_unlocked(dapm, "Call Mic");
 		break;
 	case MAGICIAN_MIC_EXT:
-		snd_soc_dapm_disable_pin(dapm, "Call Mic");
-		snd_soc_dapm_enable_pin(dapm, "Headset Mic");
+		snd_soc_dapm_disable_pin_unlocked(dapm, "Call Mic");
+		snd_soc_dapm_enable_pin_unlocked(dapm, "Headset Mic");
 		break;
 	}
 
-	snd_soc_dapm_sync(dapm);
+	snd_soc_dapm_sync_unlocked(dapm);
+
+	snd_soc_dapm_mutex_unlock(dapm);
 }
 
 static int magician_startup(struct snd_pcm_substream *substream)
-- 
1.7.2.5


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

* [PATCH 16/17 v2] ASoC: pxa: spitz: Update locking around use of DAPM pin API
  2014-02-18 15:22 ` Charles Keepax
                   ` (15 preceding siblings ...)
  (?)
@ 2014-02-18 15:22 ` Charles Keepax
  2014-02-20 10:54   ` Mark Brown
  -1 siblings, 1 reply; 47+ messages in thread
From: Charles Keepax @ 2014-02-18 15:22 UTC (permalink / raw)
  To: broonie
  Cc: myungjoo.ham, cw00.choi, dmitry.torokhov, lgirdwood, lars,
	peter.ujfalusi, jarkko.nikula, eric.y.miao, haojian.zhuang,
	linux-kernel, patches, alsa-devel, linux

The pin updates in this driver look like they are intended to be done
atomically, update to do so.

Signed-off-by: Charles Keepax <ckeepax@opensource.wolfsonmicro.com>
---
 sound/soc/pxa/spitz.c |   51 ++++++++++++++++++++++++++----------------------
 1 files changed, 28 insertions(+), 23 deletions(-)

diff --git a/sound/soc/pxa/spitz.c b/sound/soc/pxa/spitz.c
index fc052d8..04dbb5a 100644
--- a/sound/soc/pxa/spitz.c
+++ b/sound/soc/pxa/spitz.c
@@ -46,61 +46,66 @@ static int spitz_mic_gpio;
 
 static void spitz_ext_control(struct snd_soc_dapm_context *dapm)
 {
+	snd_soc_dapm_mutex_lock(dapm);
+
 	if (spitz_spk_func == SPITZ_SPK_ON)
-		snd_soc_dapm_enable_pin(dapm, "Ext Spk");
+		snd_soc_dapm_enable_pin_unlocked(dapm, "Ext Spk");
 	else
-		snd_soc_dapm_disable_pin(dapm, "Ext Spk");
+		snd_soc_dapm_disable_pin_unlocked(dapm, "Ext Spk");
 
 	/* set up jack connection */
 	switch (spitz_jack_func) {
 	case SPITZ_HP:
 		/* enable and unmute hp jack, disable mic bias */
-		snd_soc_dapm_disable_pin(dapm, "Headset Jack");
-		snd_soc_dapm_disable_pin(dapm, "Mic Jack");
-		snd_soc_dapm_disable_pin(dapm, "Line Jack");
-		snd_soc_dapm_enable_pin(dapm, "Headphone Jack");
+		snd_soc_dapm_disable_pin_unlocked(dapm, "Headset Jack");
+		snd_soc_dapm_disable_pin_unlocked(dapm, "Mic Jack");
+		snd_soc_dapm_disable_pin_unlocked(dapm, "Line Jack");
+		snd_soc_dapm_enable_pin_unlocked(dapm, "Headphone Jack");
 		gpio_set_value(SPITZ_GPIO_MUTE_L, 1);
 		gpio_set_value(SPITZ_GPIO_MUTE_R, 1);
 		break;
 	case SPITZ_MIC:
 		/* enable mic jack and bias, mute hp */
-		snd_soc_dapm_disable_pin(dapm, "Headphone Jack");
-		snd_soc_dapm_disable_pin(dapm, "Headset Jack");
-		snd_soc_dapm_disable_pin(dapm, "Line Jack");
-		snd_soc_dapm_enable_pin(dapm, "Mic Jack");
+		snd_soc_dapm_disable_pin_unlocked(dapm, "Headphone Jack");
+		snd_soc_dapm_disable_pin_unlocked(dapm, "Headset Jack");
+		snd_soc_dapm_disable_pin_unlocked(dapm, "Line Jack");
+		snd_soc_dapm_enable_pin_unlocked(dapm, "Mic Jack");
 		gpio_set_value(SPITZ_GPIO_MUTE_L, 0);
 		gpio_set_value(SPITZ_GPIO_MUTE_R, 0);
 		break;
 	case SPITZ_LINE:
 		/* enable line jack, disable mic bias and mute hp */
-		snd_soc_dapm_disable_pin(dapm, "Headphone Jack");
-		snd_soc_dapm_disable_pin(dapm, "Headset Jack");
-		snd_soc_dapm_disable_pin(dapm, "Mic Jack");
-		snd_soc_dapm_enable_pin(dapm, "Line Jack");
+		snd_soc_dapm_disable_pin_unlocked(dapm, "Headphone Jack");
+		snd_soc_dapm_disable_pin_unlocked(dapm, "Headset Jack");
+		snd_soc_dapm_disable_pin_unlocked(dapm, "Mic Jack");
+		snd_soc_dapm_enable_pin_unlocked(dapm, "Line Jack");
 		gpio_set_value(SPITZ_GPIO_MUTE_L, 0);
 		gpio_set_value(SPITZ_GPIO_MUTE_R, 0);
 		break;
 	case SPITZ_HEADSET:
 		/* enable and unmute headset jack enable mic bias, mute L hp */
-		snd_soc_dapm_disable_pin(dapm, "Headphone Jack");
-		snd_soc_dapm_enable_pin(dapm, "Mic Jack");
-		snd_soc_dapm_disable_pin(dapm, "Line Jack");
-		snd_soc_dapm_enable_pin(dapm, "Headset Jack");
+		snd_soc_dapm_disable_pin_unlocked(dapm, "Headphone Jack");
+		snd_soc_dapm_enable_pin_unlocked(dapm, "Mic Jack");
+		snd_soc_dapm_disable_pin_unlocked(dapm, "Line Jack");
+		snd_soc_dapm_enable_pin_unlocked(dapm, "Headset Jack");
 		gpio_set_value(SPITZ_GPIO_MUTE_L, 0);
 		gpio_set_value(SPITZ_GPIO_MUTE_R, 1);
 		break;
 	case SPITZ_HP_OFF:
 
 		/* jack removed, everything off */
-		snd_soc_dapm_disable_pin(dapm, "Headphone Jack");
-		snd_soc_dapm_disable_pin(dapm, "Headset Jack");
-		snd_soc_dapm_disable_pin(dapm, "Mic Jack");
-		snd_soc_dapm_disable_pin(dapm, "Line Jack");
+		snd_soc_dapm_disable_pin_unlocked(dapm, "Headphone Jack");
+		snd_soc_dapm_disable_pin_unlocked(dapm, "Headset Jack");
+		snd_soc_dapm_disable_pin_unlocked(dapm, "Mic Jack");
+		snd_soc_dapm_disable_pin_unlocked(dapm, "Line Jack");
 		gpio_set_value(SPITZ_GPIO_MUTE_L, 0);
 		gpio_set_value(SPITZ_GPIO_MUTE_R, 0);
 		break;
 	}
-	snd_soc_dapm_sync(dapm);
+
+	snd_soc_dapm_sync_unlocked(dapm);
+
+	snd_soc_dapm_mutex_unlock(dapm);
 }
 
 static int spitz_startup(struct snd_pcm_substream *substream)
-- 
1.7.2.5


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

* [PATCH 17/17 v2] ASoC: pxa: tosa: Update locking around use of DAPM pin API
  2014-02-18 15:22 ` Charles Keepax
                   ` (16 preceding siblings ...)
  (?)
@ 2014-02-18 15:22 ` Charles Keepax
  2014-02-20 10:54   ` Mark Brown
  -1 siblings, 1 reply; 47+ messages in thread
From: Charles Keepax @ 2014-02-18 15:22 UTC (permalink / raw)
  To: broonie
  Cc: myungjoo.ham, cw00.choi, dmitry.torokhov, lgirdwood, lars,
	peter.ujfalusi, jarkko.nikula, eric.y.miao, haojian.zhuang,
	linux-kernel, patches, alsa-devel, linux

The pin updates in this driver look like they are intended to be done
atomically, update to do so.

Signed-off-by: Charles Keepax <ckeepax@opensource.wolfsonmicro.com>
---
 sound/soc/pxa/tosa.c |   28 ++++++++++++++++------------
 1 files changed, 16 insertions(+), 12 deletions(-)

diff --git a/sound/soc/pxa/tosa.c b/sound/soc/pxa/tosa.c
index 1d9c2ed..2a4b438 100644
--- a/sound/soc/pxa/tosa.c
+++ b/sound/soc/pxa/tosa.c
@@ -48,31 +48,35 @@ static void tosa_ext_control(struct snd_soc_codec *codec)
 {
 	struct snd_soc_dapm_context *dapm = &codec->dapm;
 
+	snd_soc_dapm_mutex_lock(dapm);
+
 	/* set up jack connection */
 	switch (tosa_jack_func) {
 	case TOSA_HP:
-		snd_soc_dapm_disable_pin(dapm, "Mic (Internal)");
-		snd_soc_dapm_enable_pin(dapm, "Headphone Jack");
-		snd_soc_dapm_disable_pin(dapm, "Headset Jack");
+		snd_soc_dapm_disable_pin_unlocked(dapm, "Mic (Internal)");
+		snd_soc_dapm_enable_pin_unlocked(dapm, "Headphone Jack");
+		snd_soc_dapm_disable_pin_unlocked(dapm, "Headset Jack");
 		break;
 	case TOSA_MIC_INT:
-		snd_soc_dapm_enable_pin(dapm, "Mic (Internal)");
-		snd_soc_dapm_disable_pin(dapm, "Headphone Jack");
-		snd_soc_dapm_disable_pin(dapm, "Headset Jack");
+		snd_soc_dapm_enable_pin_unlocked(dapm, "Mic (Internal)");
+		snd_soc_dapm_disable_pin_unlocked(dapm, "Headphone Jack");
+		snd_soc_dapm_disable_pin_unlocked(dapm, "Headset Jack");
 		break;
 	case TOSA_HEADSET:
-		snd_soc_dapm_disable_pin(dapm, "Mic (Internal)");
-		snd_soc_dapm_disable_pin(dapm, "Headphone Jack");
-		snd_soc_dapm_enable_pin(dapm, "Headset Jack");
+		snd_soc_dapm_disable_pin_unlocked(dapm, "Mic (Internal)");
+		snd_soc_dapm_disable_pin_unlocked(dapm, "Headphone Jack");
+		snd_soc_dapm_enable_pin_unlocked(dapm, "Headset Jack");
 		break;
 	}
 
 	if (tosa_spk_func == TOSA_SPK_ON)
-		snd_soc_dapm_enable_pin(dapm, "Speaker");
+		snd_soc_dapm_enable_pin_unlocked(dapm, "Speaker");
 	else
-		snd_soc_dapm_disable_pin(dapm, "Speaker");
+		snd_soc_dapm_disable_pin_unlocked(dapm, "Speaker");
+
+	snd_soc_dapm_sync_unlocked(dapm);
 
-	snd_soc_dapm_sync(dapm);
+	snd_soc_dapm_mutex_unlock(dapm);
 }
 
 static int tosa_startup(struct snd_pcm_substream *substream)
-- 
1.7.2.5


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

* Re: [PATCH 05/17 v2] ASoC: adav80x: Update locking around use of DAPM pin API
  2014-02-18 15:22 ` [PATCH 05/17 v2] ASoC: adav80x: Update locking around use of DAPM pin API Charles Keepax
@ 2014-02-18 16:12   ` Lars-Peter Clausen
  2014-02-20 10:25   ` Mark Brown
  1 sibling, 0 replies; 47+ messages in thread
From: Lars-Peter Clausen @ 2014-02-18 16:12 UTC (permalink / raw)
  To: Charles Keepax
  Cc: broonie, myungjoo.ham, cw00.choi, dmitry.torokhov, lgirdwood,
	peter.ujfalusi, jarkko.nikula, eric.y.miao, haojian.zhuang,
	linux-kernel, patches, alsa-devel, linux

On 02/18/2014 04:22 PM, Charles Keepax wrote:
> The pin updates in this driver look like they are intended to be done
> atomically, update to do so.
>
> Signed-off-by: Charles Keepax <ckeepax@opensource.wolfsonmicro.com>

Acked-by: Lars-Peter Clausen <lars@metafoo.de>

Thanks.

> ---
>   sound/soc/codecs/adav80x.c |   17 +++++++++++------
>   1 files changed, 11 insertions(+), 6 deletions(-)
>
> diff --git a/sound/soc/codecs/adav80x.c b/sound/soc/codecs/adav80x.c
> index 09d5609..9eb53c8 100644
> --- a/sound/soc/codecs/adav80x.c
> +++ b/sound/soc/codecs/adav80x.c
> @@ -539,6 +539,7 @@ static int adav80x_set_sysclk(struct snd_soc_codec *codec,
>   			      unsigned int freq, int dir)
>   {
>   	struct adav80x *adav80x = snd_soc_codec_get_drvdata(codec);
> +	struct snd_soc_dapm_context *dapm = &codec->dapm;
>
>   	if (dir == SND_SOC_CLOCK_IN) {
>   		switch (clk_id) {
> @@ -571,7 +572,7 @@ static int adav80x_set_sysclk(struct snd_soc_codec *codec,
>   			regmap_write(adav80x->regmap, ADAV80X_ICLK_CTRL2,
>   				iclk_ctrl2);
>
> -			snd_soc_dapm_sync(&codec->dapm);
> +			snd_soc_dapm_sync(dapm);
>   		}
>   	} else {
>   		unsigned int mask;
> @@ -598,17 +599,21 @@ static int adav80x_set_sysclk(struct snd_soc_codec *codec,
>   			adav80x->sysclk_pd[clk_id] = false;
>   		}
>
> +		snd_soc_dapm_mutex_lock(dapm);
> +
>   		if (adav80x->sysclk_pd[0])
> -			snd_soc_dapm_disable_pin(&codec->dapm, "PLL1");
> +			snd_soc_dapm_disable_pin_unlocked(dapm, "PLL1");
>   		else
> -			snd_soc_dapm_force_enable_pin(&codec->dapm, "PLL1");
> +			snd_soc_dapm_force_enable_pin_unlocked(dapm, "PLL1");
>
>   		if (adav80x->sysclk_pd[1] || adav80x->sysclk_pd[2])
> -			snd_soc_dapm_disable_pin(&codec->dapm, "PLL2");
> +			snd_soc_dapm_disable_pin_unlocked(dapm, "PLL2");
>   		else
> -			snd_soc_dapm_force_enable_pin(&codec->dapm, "PLL2");
> +			snd_soc_dapm_force_enable_pin_unlocked(dapm, "PLL2");
>
> -		snd_soc_dapm_sync(&codec->dapm);
> +		snd_soc_dapm_sync_unlocked(dapm);
> +
> +		snd_soc_dapm_mutex_unlock(dapm);
>   	}
>
>   	return 0;
>


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

* Re: [PATCH 04/17 v2] ASoC: dapm: Add unlocked version of snd_soc_dapm_sync
  2014-02-18 15:22   ` Charles Keepax
  (?)
@ 2014-02-18 16:14   ` Lars-Peter Clausen
  2014-02-19  3:28     ` Mark Brown
  -1 siblings, 1 reply; 47+ messages in thread
From: Lars-Peter Clausen @ 2014-02-18 16:14 UTC (permalink / raw)
  To: Charles Keepax
  Cc: broonie, myungjoo.ham, cw00.choi, dmitry.torokhov, lgirdwood,
	peter.ujfalusi, jarkko.nikula, eric.y.miao, haojian.zhuang,
	linux-kernel, patches, alsa-devel, linux

On 02/18/2014 04:22 PM, Charles Keepax wrote:
> We will often call sync after several functions that require the DAPM
> mutex to be held. Rather than release and immediately relock the mutex
> provide an unlocked function for this situation.
>
> Signed-off-by: Charles Keepax <ckeepax@opensource.wolfsonmicro.com>

We should add lockdep_assert() to the unlocked versions to catch broken 
users, but that can be done in a follow-up patch.

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

* Re: [PATCH 04/17 v2] ASoC: dapm: Add unlocked version of snd_soc_dapm_sync
  2014-02-18 16:14   ` Lars-Peter Clausen
@ 2014-02-19  3:28     ` Mark Brown
  0 siblings, 0 replies; 47+ messages in thread
From: Mark Brown @ 2014-02-19  3:28 UTC (permalink / raw)
  To: Lars-Peter Clausen
  Cc: Charles Keepax, myungjoo.ham, cw00.choi, dmitry.torokhov,
	lgirdwood, peter.ujfalusi, jarkko.nikula, eric.y.miao,
	haojian.zhuang, linux-kernel, patches, alsa-devel, linux

[-- Attachment #1: Type: text/plain, Size: 315 bytes --]

On Tue, Feb 18, 2014 at 05:14:27PM +0100, Lars-Peter Clausen wrote:

> We should add lockdep_assert() to the unlocked versions to catch
> broken users, but that can be done in a follow-up patch.

Yes, and not just in these ones either - we've got the other existing
APIs that should have annotations added as well.

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

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

* Re: [PATCH 01/17 v2] Input - arizona-haptics: Fix double lock of dapm_mutex
  2014-02-18 15:22 ` [PATCH 01/17 v2] Input - arizona-haptics: Fix double lock of dapm_mutex Charles Keepax
@ 2014-02-20  3:54   ` Mark Brown
  2014-02-20  4:20     ` Dmitry Torokhov
  2014-02-20  9:12   ` Mark Brown
  1 sibling, 1 reply; 47+ messages in thread
From: Mark Brown @ 2014-02-20  3:54 UTC (permalink / raw)
  To: Charles Keepax
  Cc: myungjoo.ham, cw00.choi, dmitry.torokhov, lgirdwood, lars,
	peter.ujfalusi, jarkko.nikula, eric.y.miao, haojian.zhuang,
	linux-kernel, patches, alsa-devel, linux

[-- Attachment #1: Type: text/plain, Size: 377 bytes --]

On Tue, Feb 18, 2014 at 03:22:12PM +0000, Charles Keepax wrote:
> snd_soc_dapm_sync takes the dapm_mutex internally, but we currently take
> it externally as well. This patch fixes this.

Dimitry, are you OK with this being merged via ASoC?  The subsequent
improvements to the infrastructure and fix this more generally build on
top of this one so they'll need to go together.

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

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

* Re: [PATCH 01/17 v2] Input - arizona-haptics: Fix double lock of dapm_mutex
  2014-02-20  3:54   ` Mark Brown
@ 2014-02-20  4:20     ` Dmitry Torokhov
  0 siblings, 0 replies; 47+ messages in thread
From: Dmitry Torokhov @ 2014-02-20  4:20 UTC (permalink / raw)
  To: Mark Brown, Charles Keepax
  Cc: myungjoo.ham, cw00.choi, lgirdwood, lars, peter.ujfalusi,
	jarkko.nikula, eric.y.miao, haojian.zhuang, linux-kernel,
	patches, alsa-devel, linux

On February 19, 2014 7:54:31 PM PST, Mark Brown <broonie@kernel.org> wrote:
>On Tue, Feb 18, 2014 at 03:22:12PM +0000, Charles Keepax wrote:
>> snd_soc_dapm_sync takes the dapm_mutex internally, but we currently
>take
>> it externally as well. This patch fixes this.
>
>Dimitry, are you OK with this being merged via ASoC?  The subsequent
>improvements to the infrastructure and fix this more generally build on
>top of this one so they'll need to go together.


Sure, please go ahead.

Thanks.

-- 
Dmitry

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

* Re: [PATCH 01/17 v2] Input - arizona-haptics: Fix double lock of dapm_mutex
  2014-02-18 15:22 ` [PATCH 01/17 v2] Input - arizona-haptics: Fix double lock of dapm_mutex Charles Keepax
  2014-02-20  3:54   ` Mark Brown
@ 2014-02-20  9:12   ` Mark Brown
  1 sibling, 0 replies; 47+ messages in thread
From: Mark Brown @ 2014-02-20  9:12 UTC (permalink / raw)
  To: Charles Keepax
  Cc: myungjoo.ham, cw00.choi, dmitry.torokhov, lgirdwood, lars,
	peter.ujfalusi, jarkko.nikula, eric.y.miao, haojian.zhuang,
	linux-kernel, patches, alsa-devel, linux

[-- Attachment #1: Type: text/plain, Size: 205 bytes --]

On Tue, Feb 18, 2014 at 03:22:12PM +0000, Charles Keepax wrote:
> snd_soc_dapm_sync takes the dapm_mutex internally, but we currently take
> it externally as well. This patch fixes this.

Applied, thanks.

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

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

* Re: [PATCH 03/17 v2] ASoC: dapm: Add locking to snd_soc_dapm_xxxx_pin functions
  2014-02-18 15:22   ` Charles Keepax
@ 2014-02-20  9:40     ` Mark Brown
  -1 siblings, 0 replies; 47+ messages in thread
From: Mark Brown @ 2014-02-20  9:40 UTC (permalink / raw)
  To: Charles Keepax
  Cc: myungjoo.ham, cw00.choi, dmitry.torokhov, lgirdwood, lars,
	peter.ujfalusi, jarkko.nikula, eric.y.miao, haojian.zhuang,
	linux-kernel, patches, alsa-devel, linux

[-- Attachment #1: Type: text/plain, Size: 241 bytes --]

On Tue, Feb 18, 2014 at 03:22:14PM +0000, Charles Keepax wrote:
> The snd_soc_dapm_xxxx_pin all require the dapm_mutex to be held when
> they are called as they edit the dirty list, however very few of the
> callers do so.

Applied, thanks.

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

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

* Re: [PATCH 03/17 v2] ASoC: dapm: Add locking to snd_soc_dapm_xxxx_pin functions
@ 2014-02-20  9:40     ` Mark Brown
  0 siblings, 0 replies; 47+ messages in thread
From: Mark Brown @ 2014-02-20  9:40 UTC (permalink / raw)
  To: Charles Keepax
  Cc: alsa-devel, lars, eric.y.miao, dmitry.torokhov, lgirdwood,
	haojian.zhuang, linux-kernel, peter.ujfalusi, cw00.choi,
	myungjoo.ham, patches, linux, jarkko.nikula


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

On Tue, Feb 18, 2014 at 03:22:14PM +0000, Charles Keepax wrote:
> The snd_soc_dapm_xxxx_pin all require the dapm_mutex to be held when
> they are called as they edit the dirty list, however very few of the
> callers do so.

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] 47+ messages in thread

* Re: [PATCH 02/17 v2] ASoC: dapm: Add helpers to lock/unlock DAPM mutex
  2014-02-18 15:22   ` Charles Keepax
@ 2014-02-20 10:23     ` Mark Brown
  -1 siblings, 0 replies; 47+ messages in thread
From: Mark Brown @ 2014-02-20 10:23 UTC (permalink / raw)
  To: Charles Keepax
  Cc: myungjoo.ham, cw00.choi, dmitry.torokhov, lgirdwood, lars,
	peter.ujfalusi, jarkko.nikula, eric.y.miao, haojian.zhuang,
	linux-kernel, patches, alsa-devel, linux

[-- Attachment #1: Type: text/plain, Size: 249 bytes --]

On Tue, Feb 18, 2014 at 03:22:13PM +0000, Charles Keepax wrote:
> Acquiring the DAPM mutex is necessary before using several DAPM
> functions and dereference is quite ugly. This patch provides a helper
> function to simplify this.

Applied, thanks.

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

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

* Re: [PATCH 02/17 v2] ASoC: dapm: Add helpers to lock/unlock DAPM mutex
@ 2014-02-20 10:23     ` Mark Brown
  0 siblings, 0 replies; 47+ messages in thread
From: Mark Brown @ 2014-02-20 10:23 UTC (permalink / raw)
  To: Charles Keepax
  Cc: alsa-devel, lars, eric.y.miao, dmitry.torokhov, lgirdwood,
	haojian.zhuang, linux-kernel, peter.ujfalusi, cw00.choi,
	myungjoo.ham, patches, linux, jarkko.nikula


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

On Tue, Feb 18, 2014 at 03:22:13PM +0000, Charles Keepax wrote:
> Acquiring the DAPM mutex is necessary before using several DAPM
> functions and dereference is quite ugly. This patch provides a helper
> function to simplify this.

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] 47+ messages in thread

* Re: [PATCH 04/17 v2] ASoC: dapm: Add unlocked version of snd_soc_dapm_sync
  2014-02-18 15:22   ` Charles Keepax
  (?)
  (?)
@ 2014-02-20 10:24   ` Mark Brown
  -1 siblings, 0 replies; 47+ messages in thread
From: Mark Brown @ 2014-02-20 10:24 UTC (permalink / raw)
  To: Charles Keepax
  Cc: myungjoo.ham, cw00.choi, dmitry.torokhov, lgirdwood, lars,
	peter.ujfalusi, jarkko.nikula, eric.y.miao, haojian.zhuang,
	linux-kernel, patches, alsa-devel, linux

[-- Attachment #1: Type: text/plain, Size: 278 bytes --]

On Tue, Feb 18, 2014 at 03:22:15PM +0000, Charles Keepax wrote:
> We will often call sync after several functions that require the DAPM
> mutex to be held. Rather than release and immediately relock the mutex
> provide an unlocked function for this situation.

Applied, thanks.

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

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

* Re: [PATCH 05/17 v2] ASoC: adav80x: Update locking around use of DAPM pin API
  2014-02-18 15:22 ` [PATCH 05/17 v2] ASoC: adav80x: Update locking around use of DAPM pin API Charles Keepax
  2014-02-18 16:12   ` Lars-Peter Clausen
@ 2014-02-20 10:25   ` Mark Brown
  1 sibling, 0 replies; 47+ messages in thread
From: Mark Brown @ 2014-02-20 10:25 UTC (permalink / raw)
  To: Charles Keepax
  Cc: myungjoo.ham, cw00.choi, dmitry.torokhov, lgirdwood, lars,
	peter.ujfalusi, jarkko.nikula, eric.y.miao, haojian.zhuang,
	linux-kernel, patches, alsa-devel, linux

[-- Attachment #1: Type: text/plain, Size: 185 bytes --]

On Tue, Feb 18, 2014 at 03:22:16PM +0000, Charles Keepax wrote:
> The pin updates in this driver look like they are intended to be done
> atomically, update to do so.

Applied, thanks.

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

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

* Re: [PATCH 06/17 v2] ASoC: wm5100: Update locking around use of DAPM pin API
  2014-02-18 15:22   ` Charles Keepax
  (?)
@ 2014-02-20 10:26   ` Mark Brown
  -1 siblings, 0 replies; 47+ messages in thread
From: Mark Brown @ 2014-02-20 10:26 UTC (permalink / raw)
  To: Charles Keepax
  Cc: myungjoo.ham, cw00.choi, dmitry.torokhov, lgirdwood, lars,
	peter.ujfalusi, jarkko.nikula, eric.y.miao, haojian.zhuang,
	linux-kernel, patches, alsa-devel, linux

[-- Attachment #1: Type: text/plain, Size: 185 bytes --]

On Tue, Feb 18, 2014 at 03:22:17PM +0000, Charles Keepax wrote:
> The pin updates in this driver look like they are intended to be done
> atomically, update to do so.

Applied, thanks.

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

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

* Re: [PATCH 07/17 v2] ASoC: wm8962: Update locking around use of DAPM pin API
  2014-02-18 15:22 ` [PATCH 07/17 v2] ASoC: wm8962: " Charles Keepax
@ 2014-02-20 10:26   ` Mark Brown
  0 siblings, 0 replies; 47+ messages in thread
From: Mark Brown @ 2014-02-20 10:26 UTC (permalink / raw)
  To: Charles Keepax
  Cc: myungjoo.ham, cw00.choi, dmitry.torokhov, lgirdwood, lars,
	peter.ujfalusi, jarkko.nikula, eric.y.miao, haojian.zhuang,
	linux-kernel, patches, alsa-devel, linux

[-- Attachment #1: Type: text/plain, Size: 185 bytes --]

On Tue, Feb 18, 2014 at 03:22:18PM +0000, Charles Keepax wrote:
> The pin updates in this driver look like they are intended to be done
> atomically, update to do so.

Applied, thanks.

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

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

* Re: [PATCH 08/17 v2] ASoC: wm8994: Update locking around use of DAPM pin API
  2014-02-18 15:22 ` [PATCH 08/17 v2] ASoC: wm8994: " Charles Keepax
@ 2014-02-20 10:26   ` Mark Brown
  0 siblings, 0 replies; 47+ messages in thread
From: Mark Brown @ 2014-02-20 10:26 UTC (permalink / raw)
  To: Charles Keepax
  Cc: myungjoo.ham, cw00.choi, dmitry.torokhov, lgirdwood, lars,
	peter.ujfalusi, jarkko.nikula, eric.y.miao, haojian.zhuang,
	linux-kernel, patches, alsa-devel, linux

[-- Attachment #1: Type: text/plain, Size: 185 bytes --]

On Tue, Feb 18, 2014 at 03:22:19PM +0000, Charles Keepax wrote:
> The pin updates in this driver look like they are intended to be done
> atomically, update to do so.

Applied, thanks.

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

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

* Re: [PATCH 09/17 v2] ASoC: wm8996: Update locking around use of DAPM pin API
  2014-02-18 15:22 ` [PATCH 09/17 v2] ASoC: wm8996: " Charles Keepax
@ 2014-02-20 10:27   ` Mark Brown
  0 siblings, 0 replies; 47+ messages in thread
From: Mark Brown @ 2014-02-20 10:27 UTC (permalink / raw)
  To: Charles Keepax
  Cc: myungjoo.ham, cw00.choi, dmitry.torokhov, lgirdwood, lars,
	peter.ujfalusi, jarkko.nikula, eric.y.miao, haojian.zhuang,
	linux-kernel, patches, alsa-devel, linux

[-- Attachment #1: Type: text/plain, Size: 185 bytes --]

On Tue, Feb 18, 2014 at 03:22:20PM +0000, Charles Keepax wrote:
> The pin updates in this driver look like they are intended to be done
> atomically, update to do so.

Applied, thanks.

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

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

* Re: [PATCH 10/17 v2] ASoC: mfld_machine: Update locking around use of DAPM pin API
  2014-02-18 15:22 ` [PATCH 10/17 v2] ASoC: mfld_machine: " Charles Keepax
@ 2014-02-20 10:27   ` Mark Brown
  0 siblings, 0 replies; 47+ messages in thread
From: Mark Brown @ 2014-02-20 10:27 UTC (permalink / raw)
  To: Charles Keepax
  Cc: myungjoo.ham, cw00.choi, dmitry.torokhov, lgirdwood, lars,
	peter.ujfalusi, jarkko.nikula, eric.y.miao, haojian.zhuang,
	linux-kernel, patches, alsa-devel, linux

[-- Attachment #1: Type: text/plain, Size: 185 bytes --]

On Tue, Feb 18, 2014 at 03:22:21PM +0000, Charles Keepax wrote:
> The pin updates in this driver look like they are intended to be done
> atomically, update to do so.

Applied, thanks.

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

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

* Re: [PATCH 11/17 v2] ASoC: ams-delta: Update locking around use of DAPM pin API
  2014-02-18 15:22 ` [PATCH 11/17 v2] ASoC: ams-delta: " Charles Keepax
@ 2014-02-20 10:27   ` Mark Brown
  0 siblings, 0 replies; 47+ messages in thread
From: Mark Brown @ 2014-02-20 10:27 UTC (permalink / raw)
  To: Charles Keepax
  Cc: myungjoo.ham, cw00.choi, dmitry.torokhov, lgirdwood, lars,
	peter.ujfalusi, jarkko.nikula, eric.y.miao, haojian.zhuang,
	linux-kernel, patches, alsa-devel, linux

[-- Attachment #1: Type: text/plain, Size: 405 bytes --]

On Tue, Feb 18, 2014 at 03:22:22PM +0000, Charles Keepax wrote:
> The pin updates in this driver look like they are intended to be done
> atomically, update to do so. It looks like these were originally locked
> with the CODEC mutex and not updated since the patch "ASoC: dapm: Use
> DAPM mutex for DAPM ops instead of codec mutex", so remove the original
> CODEC mutex locking as well.

Applied, thanks.

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

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

* Re: [PATCH 12/17 v2] ASoC: omap: n810: Update locking around use of DAPM pin API
  2014-02-18 15:22 ` [PATCH 12/17 v2] ASoC: omap: n810: " Charles Keepax
@ 2014-02-20 10:28   ` Mark Brown
  0 siblings, 0 replies; 47+ messages in thread
From: Mark Brown @ 2014-02-20 10:28 UTC (permalink / raw)
  To: Charles Keepax
  Cc: myungjoo.ham, cw00.choi, dmitry.torokhov, lgirdwood, lars,
	peter.ujfalusi, jarkko.nikula, eric.y.miao, haojian.zhuang,
	linux-kernel, patches, alsa-devel, linux

[-- Attachment #1: Type: text/plain, Size: 185 bytes --]

On Tue, Feb 18, 2014 at 03:22:23PM +0000, Charles Keepax wrote:
> The pin updates in this driver look like they are intended to be done
> atomically, update to do so.

Applied, thanks.

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

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

* Re: [PATCH 13/17 v2] ASoC: omap: rx51: Update locking around use of DAPM pin API
  2014-02-18 15:22 ` [PATCH 13/17 v2] ASoC: omap: rx51: " Charles Keepax
@ 2014-02-20 10:28   ` Mark Brown
  0 siblings, 0 replies; 47+ messages in thread
From: Mark Brown @ 2014-02-20 10:28 UTC (permalink / raw)
  To: Charles Keepax
  Cc: myungjoo.ham, cw00.choi, dmitry.torokhov, lgirdwood, lars,
	peter.ujfalusi, jarkko.nikula, eric.y.miao, haojian.zhuang,
	linux-kernel, patches, alsa-devel, linux

[-- Attachment #1: Type: text/plain, Size: 185 bytes --]

On Tue, Feb 18, 2014 at 03:22:24PM +0000, Charles Keepax wrote:
> The pin updates in this driver look like they are intended to be done
> atomically, update to do so.

Applied, thanks.

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

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

* Re: [PATCH 14/17 v2] ASoC: pxa: corgi: Update locking around use of DAPM pin API
  2014-02-18 15:22 ` [PATCH 14/17 v2] ASoC: pxa: corgi: " Charles Keepax
@ 2014-02-20 10:53   ` Mark Brown
  0 siblings, 0 replies; 47+ messages in thread
From: Mark Brown @ 2014-02-20 10:53 UTC (permalink / raw)
  To: Charles Keepax
  Cc: myungjoo.ham, cw00.choi, dmitry.torokhov, lgirdwood, lars,
	peter.ujfalusi, jarkko.nikula, eric.y.miao, haojian.zhuang,
	linux-kernel, patches, alsa-devel, linux

[-- Attachment #1: Type: text/plain, Size: 185 bytes --]

On Tue, Feb 18, 2014 at 03:22:25PM +0000, Charles Keepax wrote:
> The pin updates in this driver look like they are intended to be done
> atomically, update to do so.

Applied, thanks.

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

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

* Re: [PATCH 15/17 v2] ASoC: pxa: magician: Update locking around use of DAPM pin API
  2014-02-18 15:22 ` [PATCH 15/17 v2] ASoC: pxa: magician: " Charles Keepax
@ 2014-02-20 10:54   ` Mark Brown
  0 siblings, 0 replies; 47+ messages in thread
From: Mark Brown @ 2014-02-20 10:54 UTC (permalink / raw)
  To: Charles Keepax
  Cc: myungjoo.ham, cw00.choi, dmitry.torokhov, lgirdwood, lars,
	peter.ujfalusi, jarkko.nikula, eric.y.miao, haojian.zhuang,
	linux-kernel, patches, alsa-devel, linux

[-- Attachment #1: Type: text/plain, Size: 185 bytes --]

On Tue, Feb 18, 2014 at 03:22:26PM +0000, Charles Keepax wrote:
> The pin updates in this driver look like they are intended to be done
> atomically, update to do so.

Applied, thanks.

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

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

* Re: [PATCH 16/17 v2] ASoC: pxa: spitz: Update locking around use of DAPM pin API
  2014-02-18 15:22 ` [PATCH 16/17 v2] ASoC: pxa: spitz: " Charles Keepax
@ 2014-02-20 10:54   ` Mark Brown
  0 siblings, 0 replies; 47+ messages in thread
From: Mark Brown @ 2014-02-20 10:54 UTC (permalink / raw)
  To: Charles Keepax
  Cc: myungjoo.ham, cw00.choi, dmitry.torokhov, lgirdwood, lars,
	peter.ujfalusi, jarkko.nikula, eric.y.miao, haojian.zhuang,
	linux-kernel, patches, alsa-devel, linux

[-- Attachment #1: Type: text/plain, Size: 185 bytes --]

On Tue, Feb 18, 2014 at 03:22:27PM +0000, Charles Keepax wrote:
> The pin updates in this driver look like they are intended to be done
> atomically, update to do so.

Applied, thanks.

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

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

* Re: [PATCH 17/17 v2] ASoC: pxa: tosa: Update locking around use of DAPM pin API
  2014-02-18 15:22 ` [PATCH 17/17 v2] ASoC: pxa: tosa: " Charles Keepax
@ 2014-02-20 10:54   ` Mark Brown
  0 siblings, 0 replies; 47+ messages in thread
From: Mark Brown @ 2014-02-20 10:54 UTC (permalink / raw)
  To: Charles Keepax
  Cc: myungjoo.ham, cw00.choi, dmitry.torokhov, lgirdwood, lars,
	peter.ujfalusi, jarkko.nikula, eric.y.miao, haojian.zhuang,
	linux-kernel, patches, alsa-devel, linux

[-- Attachment #1: Type: text/plain, Size: 185 bytes --]

On Tue, Feb 18, 2014 at 03:22:28PM +0000, Charles Keepax wrote:
> The pin updates in this driver look like they are intended to be done
> atomically, update to do so.

Applied, thanks.

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

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

end of thread, other threads:[~2014-02-20 10:55 UTC | newest]

Thread overview: 47+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-02-18 15:22 [PATCH 00/17 v2] Update locking for snd_soc_dapm_xxxx_pin functions Charles Keepax
2014-02-18 15:22 ` Charles Keepax
2014-02-18 15:22 ` [PATCH 01/17 v2] Input - arizona-haptics: Fix double lock of dapm_mutex Charles Keepax
2014-02-20  3:54   ` Mark Brown
2014-02-20  4:20     ` Dmitry Torokhov
2014-02-20  9:12   ` Mark Brown
2014-02-18 15:22 ` [PATCH 02/17 v2] ASoC: dapm: Add helpers to lock/unlock DAPM mutex Charles Keepax
2014-02-18 15:22   ` Charles Keepax
2014-02-20 10:23   ` Mark Brown
2014-02-20 10:23     ` Mark Brown
2014-02-18 15:22 ` [PATCH 03/17 v2] ASoC: dapm: Add locking to snd_soc_dapm_xxxx_pin functions Charles Keepax
2014-02-18 15:22   ` Charles Keepax
2014-02-20  9:40   ` Mark Brown
2014-02-20  9:40     ` Mark Brown
2014-02-18 15:22 ` [PATCH 04/17 v2] ASoC: dapm: Add unlocked version of snd_soc_dapm_sync Charles Keepax
2014-02-18 15:22   ` Charles Keepax
2014-02-18 16:14   ` Lars-Peter Clausen
2014-02-19  3:28     ` Mark Brown
2014-02-20 10:24   ` Mark Brown
2014-02-18 15:22 ` [PATCH 05/17 v2] ASoC: adav80x: Update locking around use of DAPM pin API Charles Keepax
2014-02-18 16:12   ` Lars-Peter Clausen
2014-02-20 10:25   ` Mark Brown
2014-02-18 15:22 ` [PATCH 06/17 v2] ASoC: wm5100: " Charles Keepax
2014-02-18 15:22   ` Charles Keepax
2014-02-20 10:26   ` Mark Brown
2014-02-18 15:22 ` [PATCH 07/17 v2] ASoC: wm8962: " Charles Keepax
2014-02-20 10:26   ` Mark Brown
2014-02-18 15:22 ` [PATCH 08/17 v2] ASoC: wm8994: " Charles Keepax
2014-02-20 10:26   ` Mark Brown
2014-02-18 15:22 ` [PATCH 09/17 v2] ASoC: wm8996: " Charles Keepax
2014-02-20 10:27   ` Mark Brown
2014-02-18 15:22 ` [PATCH 10/17 v2] ASoC: mfld_machine: " Charles Keepax
2014-02-20 10:27   ` Mark Brown
2014-02-18 15:22 ` [PATCH 11/17 v2] ASoC: ams-delta: " Charles Keepax
2014-02-20 10:27   ` Mark Brown
2014-02-18 15:22 ` [PATCH 12/17 v2] ASoC: omap: n810: " Charles Keepax
2014-02-20 10:28   ` Mark Brown
2014-02-18 15:22 ` [PATCH 13/17 v2] ASoC: omap: rx51: " Charles Keepax
2014-02-20 10:28   ` Mark Brown
2014-02-18 15:22 ` [PATCH 14/17 v2] ASoC: pxa: corgi: " Charles Keepax
2014-02-20 10:53   ` Mark Brown
2014-02-18 15:22 ` [PATCH 15/17 v2] ASoC: pxa: magician: " Charles Keepax
2014-02-20 10:54   ` Mark Brown
2014-02-18 15:22 ` [PATCH 16/17 v2] ASoC: pxa: spitz: " Charles Keepax
2014-02-20 10:54   ` Mark Brown
2014-02-18 15:22 ` [PATCH 17/17 v2] ASoC: pxa: tosa: " Charles Keepax
2014-02-20 10:54   ` 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.