alsa-devel.alsa-project.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] ASoC: dapm: Only lock CODEC for I/O if not using regmap
@ 2012-03-07  0:03 Mark Brown
  2012-03-07 11:47 ` Liam Girdwood
  0 siblings, 1 reply; 2+ messages in thread
From: Mark Brown @ 2012-03-07  0:03 UTC (permalink / raw)
  To: Liam Girdwood; +Cc: alsa-devel, patches, Mark Brown

If we do use regmap then regmap will take care of things for us. We
actually already have this check at a higher level for the current
users but this makes sure we do the right thing in the future too if
we need to.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
---
 sound/soc/soc-dapm.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/sound/soc/soc-dapm.c b/sound/soc/soc-dapm.c
index 6f4ea12b..25a395e 100644
--- a/sound/soc/soc-dapm.c
+++ b/sound/soc/soc-dapm.c
@@ -208,7 +208,7 @@ static int soc_widget_write(struct snd_soc_dapm_widget *w, int reg, int val)
 
 static inline void soc_widget_lock(struct snd_soc_dapm_widget *w)
 {
-	if (w->codec)
+	if (w->codec && !w->codec->using_regmap)
 		mutex_lock(&w->codec->mutex);
 	else if (w->platform)
 		mutex_lock(&w->platform->mutex);
@@ -216,7 +216,7 @@ static inline void soc_widget_lock(struct snd_soc_dapm_widget *w)
 
 static inline void soc_widget_unlock(struct snd_soc_dapm_widget *w)
 {
-	if (w->codec)
+	if (w->codec && !w->codec->using_regmap)
 		mutex_unlock(&w->codec->mutex);
 	else if (w->platform)
 		mutex_unlock(&w->platform->mutex);
-- 
1.7.9.1

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

* Re: [PATCH] ASoC: dapm: Only lock CODEC for I/O if not using regmap
  2012-03-07  0:03 [PATCH] ASoC: dapm: Only lock CODEC for I/O if not using regmap Mark Brown
@ 2012-03-07 11:47 ` Liam Girdwood
  0 siblings, 0 replies; 2+ messages in thread
From: Liam Girdwood @ 2012-03-07 11:47 UTC (permalink / raw)
  To: Mark Brown; +Cc: alsa-devel, patches

On Wed, 2012-03-07 at 00:03 +0000, Mark Brown wrote:
> If we do use regmap then regmap will take care of things for us. We
> actually already have this check at a higher level for the current
> users but this makes sure we do the right thing in the future too if
> we need to.
> 
> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>

Acked-by: Liam Girdwood <lrg@ti.com>

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

end of thread, other threads:[~2012-03-07 11:47 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-03-07  0:03 [PATCH] ASoC: dapm: Only lock CODEC for I/O if not using regmap Mark Brown
2012-03-07 11:47 ` Liam Girdwood

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).