]>
Commit | Line | Data |
---|---|---|
98619949 GKH |
1 | From a3930ed060df4ccf2a06cf0b68738dec3e6ff89a Mon Sep 17 00:00:00 2001 |
2 | From: Chen-Yu Tsai <wens@csie.org> | |
3 | Date: Sat, 27 Aug 2016 19:28:00 +0800 | |
4 | Subject: ASoC: dapm: Fix kcontrol creation for output driver widget | |
5 | ||
6 | From: Chen-Yu Tsai <wens@csie.org> | |
7 | ||
8 | commit a3930ed060df4ccf2a06cf0b68738dec3e6ff89a upstream. | |
9 | ||
10 | Commit d88429a695a4 ("ASoC: dapm: Add output driver widget") added | |
11 | the snd_soc_dapm_out_drv ID for the output driver widget, which is | |
12 | the same as the PGA widget, with a later power sequence number. | |
13 | ||
14 | Commit 19a2557b76d6 ("ASoC: dapm: Add kcontrol support for PGAs") | |
15 | then added kcontrol support for PGA widgets, but failed to account | |
16 | for output driver widgets. Attempts to use kcontrols with output | |
17 | driver widgets result in silent failures, with the developer having | |
18 | little idea about what went on. | |
19 | ||
20 | Add snd_soc_dapm_out_drv to the switch/case block under snd_soc_dapm_pga | |
21 | in dapm_create_or_share_kcontrol, since they are essentially the same. | |
22 | ||
23 | Fixes: 19a2557b76d6 (ASoC: dapm: Add kcontrol support for PGAs) | |
24 | Signed-off-by: Chen-Yu Tsai <wens@csie.org> | |
25 | Signed-off-by: Mark Brown <broonie@kernel.org> | |
26 | Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> | |
27 | ||
28 | --- | |
29 | sound/soc/soc-dapm.c | 1 + | |
30 | 1 file changed, 1 insertion(+) | |
31 | ||
32 | --- a/sound/soc/soc-dapm.c | |
33 | +++ b/sound/soc/soc-dapm.c | |
34 | @@ -823,6 +823,7 @@ static int dapm_create_or_share_kcontrol | |
35 | case snd_soc_dapm_switch: | |
36 | case snd_soc_dapm_mixer: | |
37 | case snd_soc_dapm_pga: | |
38 | + case snd_soc_dapm_out_drv: | |
39 | wname_in_long_name = true; | |
40 | kcname_in_long_name = true; | |
41 | break; |