提交 1b075e3f 编写于 作者: M Milan plzik 提交者: Jaroslav Kysela

[ALSA] soc - Fix power switching support for DAPM_SWITCH widgets

Signed-off-by: NMilan plzik <milan.plzik@gmail.com>
Signed-off-by: NLiam Girdwood <lg@opensource.wolfsonmicro.com>
Signed-off-by: NTakashi Iwai <tiwai@suse.de>
Signed-off-by: NJaroslav Kysela <perex@perex.cz>
上级 4ccab3e7
......@@ -691,7 +691,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)
......@@ -699,7 +699,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))
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册