[alsa-devel] [PATCH] Fix power switching support for DAPM_SWITCH widgets.
Mark Brown
broonie at opensource.wolfsonmicro.com
Tue Nov 20 10:25:32 CET 2007
From: Liam Girdwood <liam at localhost.localdomain>
Signed-off-by: Milan plzik <milan.plzik at gmail.com>
Signed-off-by: Liam Girdwood <lg at opensource.wolfsonmicro.com>
---
sound/soc/soc-dapm.c | 5 +++--
1 files changed, 3 insertions(+), 2 deletions(-)
diff --git a/sound/soc/soc-dapm.c b/sound/soc/soc-dapm.c
index d5d3c17..e8d7fae 100644
--- a/sound/soc/soc-dapm.c
+++ b/sound/soc/soc-dapm.c
@@ -692,7 +692,7 @@ static int dapm_mux_update_power(struct snd_soc_dapm_widget *widget,
return 0;
}
-/* test and update the power status of a mixer widget */
+/* test and update the power status of a mixer or switch widget */
static int dapm_mixer_update_power(struct snd_soc_dapm_widget *widget,
struct snd_kcontrol *kcontrol, int reg,
int val_mask, int val, int invert)
@@ -700,7 +700,8 @@ static int dapm_mixer_update_power(struct snd_soc_dapm_widget *widget,
struct snd_soc_dapm_path *path;
int found = 0;
- if (widget->id != snd_soc_dapm_mixer)
+ if (widget->id != snd_soc_dapm_mixer &&
+ widget->id != snd_soc_dapm_switch)
return -ENODEV;
if (!snd_soc_test_bits(widget->codec, reg, val_mask, val))
--
1.5.3.5
More information about the Alsa-devel
mailing list