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

ASoC: tlv320aic3x: Add correct hw registers to Line1 cross connect muxes

Commit af46800 ("ASoC: Implement mux control sharing") revealed that
"Left Line1[L | R] Mux" and "Right Line1[L | R] Mux" widgets were pointing
to the same kcontrols and codec registers and thus soc-core falsely detected
them as shared controls. This is actually wrong since there are separate
registers in hardware that configure Line1L to RADC and Line1R to LADC cross
connects so these muxes should not be shared.

Signed-off-by: Jarkko Nikula <jhnikula@gmail.com>
Acked-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: Liam Girdwood <lrg@slimlogic.co.uk>

authored by

Jarkko Nikula and committed by
Liam Girdwood
909c2f32 5de70519

+21 -13
+21 -13
sound/soc/codecs/tlv320aic3x.c
··· 226 226 #define RDAC_ENUM 1 227 227 #define LHPCOM_ENUM 2 228 228 #define RHPCOM_ENUM 3 229 - #define LINE1L_ENUM 4 230 - #define LINE1R_ENUM 5 231 - #define LINE2L_ENUM 6 232 - #define LINE2R_ENUM 7 233 - #define ADC_HPF_ENUM 8 229 + #define LINE1L_2_L_ENUM 4 230 + #define LINE1L_2_R_ENUM 5 231 + #define LINE1R_2_L_ENUM 6 232 + #define LINE1R_2_R_ENUM 7 233 + #define LINE2L_ENUM 8 234 + #define LINE2R_ENUM 9 235 + #define ADC_HPF_ENUM 10 234 236 235 237 static const struct soc_enum aic3x_enum[] = { 236 238 SOC_ENUM_SINGLE(DAC_LINE_MUX, 6, 3, aic3x_left_dac_mux), ··· 240 238 SOC_ENUM_SINGLE(HPLCOM_CFG, 4, 3, aic3x_left_hpcom_mux), 241 239 SOC_ENUM_SINGLE(HPRCOM_CFG, 3, 5, aic3x_right_hpcom_mux), 242 240 SOC_ENUM_SINGLE(LINE1L_2_LADC_CTRL, 7, 2, aic3x_linein_mode_mux), 241 + SOC_ENUM_SINGLE(LINE1L_2_RADC_CTRL, 7, 2, aic3x_linein_mode_mux), 242 + SOC_ENUM_SINGLE(LINE1R_2_LADC_CTRL, 7, 2, aic3x_linein_mode_mux), 243 243 SOC_ENUM_SINGLE(LINE1R_2_RADC_CTRL, 7, 2, aic3x_linein_mode_mux), 244 244 SOC_ENUM_SINGLE(LINE2L_2_LADC_CTRL, 7, 2, aic3x_linein_mode_mux), 245 245 SOC_ENUM_SINGLE(LINE2R_2_RADC_CTRL, 7, 2, aic3x_linein_mode_mux), ··· 494 490 }; 495 491 496 492 /* Left Line1 Mux */ 497 - static const struct snd_kcontrol_new aic3x_left_line1_mux_controls = 498 - SOC_DAPM_ENUM("Route", aic3x_enum[LINE1L_ENUM]); 493 + static const struct snd_kcontrol_new aic3x_left_line1l_mux_controls = 494 + SOC_DAPM_ENUM("Route", aic3x_enum[LINE1L_2_L_ENUM]); 495 + static const struct snd_kcontrol_new aic3x_right_line1l_mux_controls = 496 + SOC_DAPM_ENUM("Route", aic3x_enum[LINE1L_2_R_ENUM]); 499 497 500 498 /* Right Line1 Mux */ 501 - static const struct snd_kcontrol_new aic3x_right_line1_mux_controls = 502 - SOC_DAPM_ENUM("Route", aic3x_enum[LINE1R_ENUM]); 499 + static const struct snd_kcontrol_new aic3x_right_line1r_mux_controls = 500 + SOC_DAPM_ENUM("Route", aic3x_enum[LINE1R_2_R_ENUM]); 501 + static const struct snd_kcontrol_new aic3x_left_line1r_mux_controls = 502 + SOC_DAPM_ENUM("Route", aic3x_enum[LINE1R_2_L_ENUM]); 503 503 504 504 /* Left Line2 Mux */ 505 505 static const struct snd_kcontrol_new aic3x_left_line2_mux_controls = ··· 543 535 &aic3x_left_pga_mixer_controls[0], 544 536 ARRAY_SIZE(aic3x_left_pga_mixer_controls)), 545 537 SND_SOC_DAPM_MUX("Left Line1L Mux", SND_SOC_NOPM, 0, 0, 546 - &aic3x_left_line1_mux_controls), 538 + &aic3x_left_line1l_mux_controls), 547 539 SND_SOC_DAPM_MUX("Left Line1R Mux", SND_SOC_NOPM, 0, 0, 548 - &aic3x_left_line1_mux_controls), 540 + &aic3x_left_line1r_mux_controls), 549 541 SND_SOC_DAPM_MUX("Left Line2L Mux", SND_SOC_NOPM, 0, 0, 550 542 &aic3x_left_line2_mux_controls), 551 543 ··· 556 548 &aic3x_right_pga_mixer_controls[0], 557 549 ARRAY_SIZE(aic3x_right_pga_mixer_controls)), 558 550 SND_SOC_DAPM_MUX("Right Line1L Mux", SND_SOC_NOPM, 0, 0, 559 - &aic3x_right_line1_mux_controls), 551 + &aic3x_right_line1l_mux_controls), 560 552 SND_SOC_DAPM_MUX("Right Line1R Mux", SND_SOC_NOPM, 0, 0, 561 - &aic3x_right_line1_mux_controls), 553 + &aic3x_right_line1r_mux_controls), 562 554 SND_SOC_DAPM_MUX("Right Line2R Mux", SND_SOC_NOPM, 0, 0, 563 555 &aic3x_right_line2_mux_controls), 564 556