Commit 73df240a authored by Chen-Yu Tsai's avatar Chen-Yu Tsai Committed by Luis Henriques

ASoC: dapm: Fix kcontrol creation for output driver widget

BugLink: http://bugs.launchpad.net/bugs/1638267

commit a3930ed0 upstream.

Commit d88429a6 ("ASoC: dapm: Add output driver widget") added
the snd_soc_dapm_out_drv ID for the output driver widget, which is
the same as the PGA widget, with a later power sequence number.

Commit 19a2557b ("ASoC: dapm: Add kcontrol support for PGAs")
then added kcontrol support for PGA widgets, but failed to account
for output driver widgets. Attempts to use kcontrols with output
driver widgets result in silent failures, with the developer having
little idea about what went on.

Add snd_soc_dapm_out_drv to the switch/case block under snd_soc_dapm_pga
in dapm_create_or_share_kcontrol, since they are essentially the same.

Fixes: 19a2557b (ASoC: dapm: Add kcontrol support for PGAs)
Signed-off-by: default avatarChen-Yu Tsai <wens@csie.org>
Signed-off-by: default avatarMark Brown <broonie@kernel.org>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: default avatarTim Gardner <tim.gardner@canonical.com>
parent 103c7d7f
...@@ -823,6 +823,7 @@ static int dapm_create_or_share_kcontrol(struct snd_soc_dapm_widget *w, ...@@ -823,6 +823,7 @@ static int dapm_create_or_share_kcontrol(struct snd_soc_dapm_widget *w,
case snd_soc_dapm_switch: case snd_soc_dapm_switch:
case snd_soc_dapm_mixer: case snd_soc_dapm_mixer:
case snd_soc_dapm_pga: case snd_soc_dapm_pga:
case snd_soc_dapm_out_drv:
wname_in_long_name = true; wname_in_long_name = true;
kcname_in_long_name = true; kcname_in_long_name = true;
break; break;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment