diff options
author | Liam Girdwood <lrg@ti.com> | 2012-03-09 07:02:08 -0500 |
---|---|---|
committer | Mark Brown <broonie@opensource.wolfsonmicro.com> | 2012-04-01 06:28:22 -0400 |
commit | 3cd043436c2d5d6f8e9a5395d02ba966f0dfdf84 (patch) | |
tree | c702a6f197533f631c417eddcdbaabe649dc3eea /sound/soc/soc-dapm.c | |
parent | 6874a918de503997164e76c540eaf44776fd5296 (diff) |
ASoC: dapm: Rename dapm mutex subclass to better match usage
Rename SND_SOC_DAPM_CLASS_PCM to SND_SOC_DAPM_CLASS_RUNTIME to
better match the usage and align with card mutex too.
Signed-off-by: Liam Girdwood <lrg@ti.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Diffstat (limited to 'sound/soc/soc-dapm.c')
-rw-r--r-- | sound/soc/soc-dapm.c | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/sound/soc/soc-dapm.c b/sound/soc/soc-dapm.c index 3fcefd1060a2..de001698825d 100644 --- a/sound/soc/soc-dapm.c +++ b/sound/soc/soc-dapm.c | |||
@@ -1765,7 +1765,7 @@ int snd_soc_dapm_mux_update_power(struct snd_soc_dapm_widget *widget, | |||
1765 | struct snd_soc_card *card = widget->dapm->card; | 1765 | struct snd_soc_card *card = widget->dapm->card; |
1766 | int ret; | 1766 | int ret; |
1767 | 1767 | ||
1768 | mutex_lock_nested(&card->dapm_mutex, SND_SOC_DAPM_CLASS_PCM); | 1768 | mutex_lock_nested(&card->dapm_mutex, SND_SOC_DAPM_CLASS_RUNTIME); |
1769 | ret = soc_dapm_mux_update_power(widget, kcontrol, mux, e); | 1769 | ret = soc_dapm_mux_update_power(widget, kcontrol, mux, e); |
1770 | mutex_unlock(&card->dapm_mutex); | 1770 | mutex_unlock(&card->dapm_mutex); |
1771 | return ret; | 1771 | return ret; |
@@ -1809,7 +1809,7 @@ int snd_soc_dapm_mixer_update_power(struct snd_soc_dapm_widget *widget, | |||
1809 | struct snd_soc_card *card = widget->dapm->card; | 1809 | struct snd_soc_card *card = widget->dapm->card; |
1810 | int ret; | 1810 | int ret; |
1811 | 1811 | ||
1812 | mutex_lock_nested(&card->dapm_mutex, SND_SOC_DAPM_CLASS_PCM); | 1812 | mutex_lock_nested(&card->dapm_mutex, SND_SOC_DAPM_CLASS_RUNTIME); |
1813 | ret = soc_dapm_mixer_update_power(widget, kcontrol, connect); | 1813 | ret = soc_dapm_mixer_update_power(widget, kcontrol, connect); |
1814 | mutex_unlock(&card->dapm_mutex); | 1814 | mutex_unlock(&card->dapm_mutex); |
1815 | return ret; | 1815 | return ret; |
@@ -1982,7 +1982,7 @@ int snd_soc_dapm_sync(struct snd_soc_dapm_context *dapm) | |||
1982 | if (!dapm->card || !dapm->card->instantiated) | 1982 | if (!dapm->card || !dapm->card->instantiated) |
1983 | return 0; | 1983 | return 0; |
1984 | 1984 | ||
1985 | mutex_lock_nested(&dapm->card->dapm_mutex, SND_SOC_DAPM_CLASS_PCM); | 1985 | mutex_lock_nested(&dapm->card->dapm_mutex, SND_SOC_DAPM_CLASS_RUNTIME); |
1986 | ret = dapm_power_widgets(dapm, SND_SOC_DAPM_STREAM_NOP); | 1986 | ret = dapm_power_widgets(dapm, SND_SOC_DAPM_STREAM_NOP); |
1987 | mutex_unlock(&dapm->card->dapm_mutex); | 1987 | mutex_unlock(&dapm->card->dapm_mutex); |
1988 | return ret; | 1988 | return ret; |
@@ -2401,7 +2401,7 @@ int snd_soc_dapm_put_volsw(struct snd_kcontrol *kcontrol, | |||
2401 | /* old connection must be powered down */ | 2401 | /* old connection must be powered down */ |
2402 | connect = invert ? 1 : 0; | 2402 | connect = invert ? 1 : 0; |
2403 | 2403 | ||
2404 | mutex_lock_nested(&card->dapm_mutex, SND_SOC_DAPM_CLASS_PCM); | 2404 | mutex_lock_nested(&card->dapm_mutex, SND_SOC_DAPM_CLASS_RUNTIME); |
2405 | 2405 | ||
2406 | change = snd_soc_test_bits(widget->codec, reg, mask, val); | 2406 | change = snd_soc_test_bits(widget->codec, reg, mask, val); |
2407 | if (change) { | 2407 | if (change) { |
@@ -2493,7 +2493,7 @@ int snd_soc_dapm_put_enum_double(struct snd_kcontrol *kcontrol, | |||
2493 | mask |= (bitmask - 1) << e->shift_r; | 2493 | mask |= (bitmask - 1) << e->shift_r; |
2494 | } | 2494 | } |
2495 | 2495 | ||
2496 | mutex_lock_nested(&card->dapm_mutex, SND_SOC_DAPM_CLASS_PCM); | 2496 | mutex_lock_nested(&card->dapm_mutex, SND_SOC_DAPM_CLASS_RUNTIME); |
2497 | 2497 | ||
2498 | change = snd_soc_test_bits(widget->codec, e->reg, mask, val); | 2498 | change = snd_soc_test_bits(widget->codec, e->reg, mask, val); |
2499 | if (change) { | 2499 | if (change) { |
@@ -2562,7 +2562,7 @@ int snd_soc_dapm_put_enum_virt(struct snd_kcontrol *kcontrol, | |||
2562 | if (ucontrol->value.enumerated.item[0] >= e->max) | 2562 | if (ucontrol->value.enumerated.item[0] >= e->max) |
2563 | return -EINVAL; | 2563 | return -EINVAL; |
2564 | 2564 | ||
2565 | mutex_lock_nested(&card->dapm_mutex, SND_SOC_DAPM_CLASS_PCM); | 2565 | mutex_lock_nested(&card->dapm_mutex, SND_SOC_DAPM_CLASS_RUNTIME); |
2566 | 2566 | ||
2567 | change = widget->value != ucontrol->value.enumerated.item[0]; | 2567 | change = widget->value != ucontrol->value.enumerated.item[0]; |
2568 | if (change) { | 2568 | if (change) { |
@@ -2659,7 +2659,7 @@ int snd_soc_dapm_put_value_enum_double(struct snd_kcontrol *kcontrol, | |||
2659 | mask |= e->mask << e->shift_r; | 2659 | mask |= e->mask << e->shift_r; |
2660 | } | 2660 | } |
2661 | 2661 | ||
2662 | mutex_lock_nested(&card->dapm_mutex, SND_SOC_DAPM_CLASS_PCM); | 2662 | mutex_lock_nested(&card->dapm_mutex, SND_SOC_DAPM_CLASS_RUNTIME); |
2663 | 2663 | ||
2664 | change = snd_soc_test_bits(widget->codec, e->reg, mask, val); | 2664 | change = snd_soc_test_bits(widget->codec, e->reg, mask, val); |
2665 | if (change) { | 2665 | if (change) { |
@@ -2718,7 +2718,7 @@ int snd_soc_dapm_get_pin_switch(struct snd_kcontrol *kcontrol, | |||
2718 | struct snd_soc_card *card = snd_kcontrol_chip(kcontrol); | 2718 | struct snd_soc_card *card = snd_kcontrol_chip(kcontrol); |
2719 | const char *pin = (const char *)kcontrol->private_value; | 2719 | const char *pin = (const char *)kcontrol->private_value; |
2720 | 2720 | ||
2721 | mutex_lock_nested(&card->dapm_mutex, SND_SOC_DAPM_CLASS_PCM); | 2721 | mutex_lock_nested(&card->dapm_mutex, SND_SOC_DAPM_CLASS_RUNTIME); |
2722 | 2722 | ||
2723 | ucontrol->value.integer.value[0] = | 2723 | ucontrol->value.integer.value[0] = |
2724 | snd_soc_dapm_get_pin_status(&card->dapm, pin); | 2724 | snd_soc_dapm_get_pin_status(&card->dapm, pin); |
@@ -2741,7 +2741,7 @@ int snd_soc_dapm_put_pin_switch(struct snd_kcontrol *kcontrol, | |||
2741 | struct snd_soc_card *card = snd_kcontrol_chip(kcontrol); | 2741 | struct snd_soc_card *card = snd_kcontrol_chip(kcontrol); |
2742 | const char *pin = (const char *)kcontrol->private_value; | 2742 | const char *pin = (const char *)kcontrol->private_value; |
2743 | 2743 | ||
2744 | mutex_lock_nested(&card->dapm_mutex, SND_SOC_DAPM_CLASS_PCM); | 2744 | mutex_lock_nested(&card->dapm_mutex, SND_SOC_DAPM_CLASS_RUNTIME); |
2745 | 2745 | ||
2746 | if (ucontrol->value.integer.value[0]) | 2746 | if (ucontrol->value.integer.value[0]) |
2747 | snd_soc_dapm_enable_pin(&card->dapm, pin); | 2747 | snd_soc_dapm_enable_pin(&card->dapm, pin); |
@@ -3060,7 +3060,7 @@ void snd_soc_dapm_stream_event(struct snd_soc_pcm_runtime *rtd, int stream, | |||
3060 | { | 3060 | { |
3061 | struct snd_soc_card *card = rtd->card; | 3061 | struct snd_soc_card *card = rtd->card; |
3062 | 3062 | ||
3063 | mutex_lock_nested(&card->dapm_mutex, SND_SOC_DAPM_CLASS_PCM); | 3063 | mutex_lock_nested(&card->dapm_mutex, SND_SOC_DAPM_CLASS_RUNTIME); |
3064 | soc_dapm_stream_event(rtd, stream, event); | 3064 | soc_dapm_stream_event(rtd, stream, event); |
3065 | mutex_unlock(&card->dapm_mutex); | 3065 | mutex_unlock(&card->dapm_mutex); |
3066 | } | 3066 | } |