Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

ASoC: Handle edge case on SDCA jack control naming

Charles Keepax <ckeepax@opensource.cirrus.com> says:

Normally the SDCA jack detection controls will be named after the GE
widget that represents the grouping of everything in the topology
controlled by the jack selection. However, in the case that the jack
selection only controls a single widget the control will be named after
the SU widget that implements that. It is rather confusing to have the
jack detection controls change naming scheme between devices. Add a new
widget type, similar to mixer widgets, to force use of the control name
rather than falling back to the widget names.

+13 -1
+1
include/sound/soc-dapm.h
··· 424 424 snd_soc_dapm_input = 0, /* input pin */ 425 425 snd_soc_dapm_output, /* output pin */ 426 426 snd_soc_dapm_mux, /* selects 1 analog signal from many inputs */ 427 + snd_soc_dapm_mux_named_ctl, /* mux with named controls */ 427 428 snd_soc_dapm_demux, /* connects the input to one of multiple outputs */ 428 429 snd_soc_dapm_mixer, /* mixes several analog signals together */ 429 430 snd_soc_dapm_mixer_named_ctl, /* mixer with named controls */
+1 -1
sound/soc/sdca/sdca_asoc.c
··· 487 487 if (!range) 488 488 return -EINVAL; 489 489 490 - (*widget)->id = snd_soc_dapm_mux; 490 + (*widget)->id = snd_soc_dapm_mux_named_ctl; 491 491 (*widget)->kcontrol_news = entity->group->ge.kctl; 492 492 (*widget)->num_kcontrols = 1; 493 493 (*widget)++;
+11
sound/soc/soc-dapm.c
··· 89 89 [snd_soc_dapm_input] = 6, 90 90 [snd_soc_dapm_output] = 6, 91 91 [snd_soc_dapm_mux] = 7, 92 + [snd_soc_dapm_mux_named_ctl] = 7, 92 93 [snd_soc_dapm_demux] = 7, 93 94 [snd_soc_dapm_dac] = 8, 94 95 [snd_soc_dapm_switch] = 9, ··· 141 140 [snd_soc_dapm_micbias] = 10, 142 141 [snd_soc_dapm_vmid] = 10, 143 142 [snd_soc_dapm_mux] = 11, 143 + [snd_soc_dapm_mux_named_ctl] = 11, 144 144 [snd_soc_dapm_demux] = 11, 145 145 [snd_soc_dapm_aif_in] = 12, 146 146 [snd_soc_dapm_aif_out] = 12, ··· 579 577 580 578 switch (sink->id) { 581 579 case snd_soc_dapm_mux: 580 + case snd_soc_dapm_mux_named_ctl: 582 581 case snd_soc_dapm_switch: 583 582 case snd_soc_dapm_mixer: 584 583 case snd_soc_dapm_mixer_named_ctl: ··· 671 668 672 669 switch (wsink->id) { 673 670 case snd_soc_dapm_mux: 671 + case snd_soc_dapm_mux_named_ctl: 674 672 ret = dapm_connect_mux(dapm, path, control, wsink); 675 673 if (ret != 0) 676 674 goto err; ··· 770 766 break; 771 767 case snd_soc_dapm_demux: 772 768 case snd_soc_dapm_mux: 769 + case snd_soc_dapm_mux_named_ctl: 773 770 e = (struct soc_enum *)kcontrol->private_value; 774 771 775 772 if (e->autodisable) { ··· 920 915 break; 921 916 case snd_soc_dapm_demux: 922 917 case snd_soc_dapm_mux: 918 + case snd_soc_dapm_mux_named_ctl: 923 919 data->widget->on_val = value >> data->widget->shift; 924 920 break; 925 921 default: ··· 1204 1198 wname_in_long_name = true; 1205 1199 kcname_in_long_name = true; 1206 1200 break; 1201 + case snd_soc_dapm_mux_named_ctl: 1207 1202 case snd_soc_dapm_mixer_named_ctl: 1208 1203 wname_in_long_name = false; 1209 1204 kcname_in_long_name = true; ··· 1324 1317 1325 1318 switch (w->id) { 1326 1319 case snd_soc_dapm_mux: 1320 + case snd_soc_dapm_mux_named_ctl: 1327 1321 dir = SND_SOC_DAPM_DIR_OUT; 1328 1322 type = "mux"; 1329 1323 break; ··· 2407 2399 [snd_soc_dapm_input] = "input", 2408 2400 [snd_soc_dapm_output] = "output", 2409 2401 [snd_soc_dapm_mux] = "mux", 2402 + [snd_soc_dapm_mux_named_ctl] = "mux_named_ctl", 2410 2403 [snd_soc_dapm_demux] = "demux", 2411 2404 [snd_soc_dapm_mixer] = "mixer", 2412 2405 [snd_soc_dapm_mixer_named_ctl] = "mixer_named_ctl", ··· 3356 3347 dapm_new_mixer(w); 3357 3348 break; 3358 3349 case snd_soc_dapm_mux: 3350 + case snd_soc_dapm_mux_named_ctl: 3359 3351 case snd_soc_dapm_demux: 3360 3352 dapm_new_mux(w); 3361 3353 break; ··· 3844 3834 break; 3845 3835 3846 3836 case snd_soc_dapm_mux: 3837 + case snd_soc_dapm_mux_named_ctl: 3847 3838 case snd_soc_dapm_demux: 3848 3839 case snd_soc_dapm_switch: 3849 3840 case snd_soc_dapm_mixer: