diff options
Diffstat (limited to 'sound')
-rw-r--r-- | sound/soc/codecs/wm5110.c | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/sound/soc/codecs/wm5110.c b/sound/soc/codecs/wm5110.c index 9eabfb62fcfa..83177aa83625 100644 --- a/sound/soc/codecs/wm5110.c +++ b/sound/soc/codecs/wm5110.c | |||
@@ -313,6 +313,26 @@ ARIZONA_MIXER_ENUMS(ASRC1R, ARIZONA_ASRC1RMIX_INPUT_1_SOURCE); | |||
313 | ARIZONA_MIXER_ENUMS(ASRC2L, ARIZONA_ASRC2LMIX_INPUT_1_SOURCE); | 313 | ARIZONA_MIXER_ENUMS(ASRC2L, ARIZONA_ASRC2LMIX_INPUT_1_SOURCE); |
314 | ARIZONA_MIXER_ENUMS(ASRC2R, ARIZONA_ASRC2RMIX_INPUT_1_SOURCE); | 314 | ARIZONA_MIXER_ENUMS(ASRC2R, ARIZONA_ASRC2RMIX_INPUT_1_SOURCE); |
315 | 315 | ||
316 | static const char *wm5110_aec_loopback_texts[] = { | ||
317 | "HPOUT1L", "HPOUT1R", "HPOUT2L", "HPOUT2R", "HPOUT3L", "HPOUT3R", | ||
318 | "SPKOUTL", "SPKOUTR", "SPKDAT1L", "SPKDAT1R", "SPKDAT2L", "SPKDAT2R", | ||
319 | }; | ||
320 | |||
321 | static const unsigned int wm5110_aec_loopback_values[] = { | ||
322 | 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, | ||
323 | }; | ||
324 | |||
325 | static const struct soc_enum wm5110_aec_loopback = | ||
326 | SOC_VALUE_ENUM_SINGLE(ARIZONA_DAC_AEC_CONTROL_1, | ||
327 | ARIZONA_AEC_LOOPBACK_SRC_SHIFT, | ||
328 | ARIZONA_AEC_LOOPBACK_SRC_MASK, | ||
329 | ARRAY_SIZE(wm5110_aec_loopback_texts), | ||
330 | wm5110_aec_loopback_texts, | ||
331 | wm5110_aec_loopback_values); | ||
332 | |||
333 | static const struct snd_kcontrol_new wm5110_aec_loopback_mux = | ||
334 | SOC_DAPM_VALUE_ENUM("AEC Loopback", wm5110_aec_loopback); | ||
335 | |||
316 | static const struct snd_soc_dapm_widget wm5110_dapm_widgets[] = { | 336 | static const struct snd_soc_dapm_widget wm5110_dapm_widgets[] = { |
317 | SND_SOC_DAPM_SUPPLY("SYSCLK", ARIZONA_SYSTEM_CLOCK_1, ARIZONA_SYSCLK_ENA_SHIFT, | 337 | SND_SOC_DAPM_SUPPLY("SYSCLK", ARIZONA_SYSTEM_CLOCK_1, ARIZONA_SYSCLK_ENA_SHIFT, |
318 | 0, NULL, 0), | 338 | 0, NULL, 0), |
@@ -422,6 +442,9 @@ SND_SOC_DAPM_PGA("ASRC2L", ARIZONA_ASRC_ENABLE, ARIZONA_ASRC2L_ENA_SHIFT, 0, | |||
422 | SND_SOC_DAPM_PGA("ASRC2R", ARIZONA_ASRC_ENABLE, ARIZONA_ASRC2R_ENA_SHIFT, 0, | 442 | SND_SOC_DAPM_PGA("ASRC2R", ARIZONA_ASRC_ENABLE, ARIZONA_ASRC2R_ENA_SHIFT, 0, |
423 | NULL, 0), | 443 | NULL, 0), |
424 | 444 | ||
445 | SND_SOC_DAPM_VALUE_MUX("AEC Loopback", ARIZONA_DAC_AEC_CONTROL_1, | ||
446 | ARIZONA_AEC_LOOPBACK_ENA, 0, &wm5110_aec_loopback_mux), | ||
447 | |||
425 | SND_SOC_DAPM_AIF_OUT("AIF1TX1", NULL, 0, | 448 | SND_SOC_DAPM_AIF_OUT("AIF1TX1", NULL, 0, |
426 | ARIZONA_AIF1_TX_ENABLES, ARIZONA_AIF1TX1_ENA_SHIFT, 0), | 449 | ARIZONA_AIF1_TX_ENABLES, ARIZONA_AIF1TX1_ENA_SHIFT, 0), |
427 | SND_SOC_DAPM_AIF_OUT("AIF1TX2", NULL, 0, | 450 | SND_SOC_DAPM_AIF_OUT("AIF1TX2", NULL, 0, |
@@ -584,6 +607,7 @@ SND_SOC_DAPM_OUTPUT("SPKDAT2R"), | |||
584 | { name, "Noise Generator", "Noise Generator" }, \ | 607 | { name, "Noise Generator", "Noise Generator" }, \ |
585 | { name, "Tone Generator 1", "Tone Generator 1" }, \ | 608 | { name, "Tone Generator 1", "Tone Generator 1" }, \ |
586 | { name, "Tone Generator 2", "Tone Generator 2" }, \ | 609 | { name, "Tone Generator 2", "Tone Generator 2" }, \ |
610 | { name, "AEC", "AEC Loopback" }, \ | ||
587 | { name, "IN1L", "IN1L PGA" }, \ | 611 | { name, "IN1L", "IN1L PGA" }, \ |
588 | { name, "IN1R", "IN1R PGA" }, \ | 612 | { name, "IN1R", "IN1R PGA" }, \ |
589 | { name, "IN2L", "IN2L PGA" }, \ | 613 | { name, "IN2L", "IN2L PGA" }, \ |