summaryrefslogtreecommitdiffstats
path: root/sound
diff options
context:
space:
mode:
authorMark Brown <broonie@opensource.wolfsonmicro.com>2012-03-12 10:33:34 +0000
committerMark Brown <broonie@opensource.wolfsonmicro.com>2012-03-12 10:37:23 +0000
commit80f48143ffde97c48c5e550e2fcd2c9f8e77e554 (patch)
tree1e12757fca9f28a65b2df6e3aaa6c97742b79d61 /sound
parentaeb87073f00524dbc4017aba1de5469948d134d4 (diff)
downloadop-kernel-dev-80f48143ffde97c48c5e550e2fcd2c9f8e77e554.zip
op-kernel-dev-80f48143ffde97c48c5e550e2fcd2c9f8e77e554.tar.gz
ASoC: Revert widget I/O locking for 3.4
The widget locking depends on some of the other locking changes which are queued up for 3.5 not 3.4 so revert the locking changes and reapply them in 3.5. This reverts commit 66bf93212f19548f5ed221356b2d70189cc18254 and 96acc357bedad69fbc94d1b923a960af5a411c6f. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Acked-by: Liam Girdwood <lrg@ti.com>
Diffstat (limited to 'sound')
-rw-r--r--sound/soc/soc-dapm.c34
1 files changed, 6 insertions, 28 deletions
diff --git a/sound/soc/soc-dapm.c b/sound/soc/soc-dapm.c
index 1ba2a71..dcd1160 100644
--- a/sound/soc/soc-dapm.c
+++ b/sound/soc/soc-dapm.c
@@ -206,23 +206,7 @@ static int soc_widget_write(struct snd_soc_dapm_widget *w, int reg, int val)
return -1;
}
-static inline void soc_widget_lock(struct snd_soc_dapm_widget *w)
-{
- if (w->codec && !w->codec->using_regmap)
- mutex_lock(&w->codec->mutex);
- else if (w->platform)
- mutex_lock(&w->platform->mutex);
-}
-
-static inline void soc_widget_unlock(struct snd_soc_dapm_widget *w)
-{
- if (w->codec && !w->codec->using_regmap)
- mutex_unlock(&w->codec->mutex);
- else if (w->platform)
- mutex_unlock(&w->platform->mutex);
-}
-
-static int soc_widget_update_bits_locked(struct snd_soc_dapm_widget *w,
+static int soc_widget_update_bits(struct snd_soc_dapm_widget *w,
unsigned short reg, unsigned int mask, unsigned int value)
{
bool change;
@@ -235,24 +219,18 @@ static int soc_widget_update_bits_locked(struct snd_soc_dapm_widget *w,
if (ret != 0)
return ret;
} else {
- soc_widget_lock(w);
ret = soc_widget_read(w, reg);
- if (ret < 0) {
- soc_widget_unlock(w);
+ if (ret < 0)
return ret;
- }
old = ret;
new = (old & ~mask) | (value & mask);
change = old != new;
if (change) {
ret = soc_widget_write(w, reg, new);
- if (ret < 0) {
- soc_widget_unlock(w);
+ if (ret < 0)
return ret;
- }
}
- soc_widget_unlock(w);
}
return change;
@@ -869,7 +847,7 @@ int dapm_reg_event(struct snd_soc_dapm_widget *w,
else
val = w->off_val;
- soc_widget_update_bits_locked(w, -(w->reg + 1),
+ soc_widget_update_bits(w, -(w->reg + 1),
w->mask << w->shift, val << w->shift);
return 0;
@@ -1127,7 +1105,7 @@ static void dapm_seq_run_coalesced(struct snd_soc_dapm_context *dapm,
"pop test : Applying 0x%x/0x%x to %x in %dms\n",
value, mask, reg, card->pop_time);
pop_wait(card->pop_time);
- soc_widget_update_bits_locked(w, reg, mask, value);
+ soc_widget_update_bits(w, reg, mask, value);
}
list_for_each_entry(w, pending, power_list) {
@@ -1257,7 +1235,7 @@ static void dapm_widget_update(struct snd_soc_dapm_context *dapm)
w->name, ret);
}
- ret = soc_widget_update_bits_locked(w, update->reg, update->mask,
+ ret = snd_soc_update_bits(w->codec, update->reg, update->mask,
update->val);
if (ret < 0)
pr_err("%s DAPM update failed: %d\n", w->name, ret);
OpenPOWER on IntegriCloud