diff options
-rw-r--r-- | sound/soc/codecs/wm8903.c | 23 |
1 files changed, 21 insertions, 2 deletions
diff --git a/sound/soc/codecs/wm8903.c b/sound/soc/codecs/wm8903.c index d53f206d6410..f3cab8491431 100644 --- a/sound/soc/codecs/wm8903.c +++ b/sound/soc/codecs/wm8903.c | |||
@@ -634,6 +634,13 @@ static const struct soc_enum lsidetone_enum = | |||
634 | static const struct soc_enum rsidetone_enum = | 634 | static const struct soc_enum rsidetone_enum = |
635 | SOC_ENUM_SINGLE(WM8903_DAC_DIGITAL_0, 0, 3, sidetone_text); | 635 | SOC_ENUM_SINGLE(WM8903_DAC_DIGITAL_0, 0, 3, sidetone_text); |
636 | 636 | ||
637 | static const char *adcinput_text[] = { | ||
638 | "ADC", "DMIC" | ||
639 | }; | ||
640 | |||
641 | static const struct soc_enum adcinput_enum = | ||
642 | SOC_ENUM_SINGLE(WM8903_CLOCK_RATE_TEST_4, 9, 2, adcinput_text); | ||
643 | |||
637 | static const char *aif_text[] = { | 644 | static const char *aif_text[] = { |
638 | "Left", "Right" | 645 | "Left", "Right" |
639 | }; | 646 | }; |
@@ -767,6 +774,9 @@ static const struct snd_kcontrol_new lsidetone_mux = | |||
767 | static const struct snd_kcontrol_new rsidetone_mux = | 774 | static const struct snd_kcontrol_new rsidetone_mux = |
768 | SOC_DAPM_ENUM("DACR Sidetone Mux", rsidetone_enum); | 775 | SOC_DAPM_ENUM("DACR Sidetone Mux", rsidetone_enum); |
769 | 776 | ||
777 | static const struct snd_kcontrol_new adcinput_mux = | ||
778 | SOC_DAPM_ENUM("ADC Input", adcinput_enum); | ||
779 | |||
770 | static const struct snd_kcontrol_new lcapture_mux = | 780 | static const struct snd_kcontrol_new lcapture_mux = |
771 | SOC_DAPM_ENUM("Left Capture Mux", lcapture_enum); | 781 | SOC_DAPM_ENUM("Left Capture Mux", lcapture_enum); |
772 | 782 | ||
@@ -817,6 +827,7 @@ SND_SOC_DAPM_INPUT("IN2L"), | |||
817 | SND_SOC_DAPM_INPUT("IN2R"), | 827 | SND_SOC_DAPM_INPUT("IN2R"), |
818 | SND_SOC_DAPM_INPUT("IN3L"), | 828 | SND_SOC_DAPM_INPUT("IN3L"), |
819 | SND_SOC_DAPM_INPUT("IN3R"), | 829 | SND_SOC_DAPM_INPUT("IN3R"), |
830 | SND_SOC_DAPM_INPUT("DMICDAT"), | ||
820 | 831 | ||
821 | SND_SOC_DAPM_OUTPUT("HPOUTL"), | 832 | SND_SOC_DAPM_OUTPUT("HPOUTL"), |
822 | SND_SOC_DAPM_OUTPUT("HPOUTR"), | 833 | SND_SOC_DAPM_OUTPUT("HPOUTR"), |
@@ -842,6 +853,9 @@ SND_SOC_DAPM_MUX("Right Input Mode Mux", SND_SOC_NOPM, 0, 0, &rinput_mode_mux), | |||
842 | SND_SOC_DAPM_PGA("Left Input PGA", WM8903_POWER_MANAGEMENT_0, 1, 0, NULL, 0), | 853 | SND_SOC_DAPM_PGA("Left Input PGA", WM8903_POWER_MANAGEMENT_0, 1, 0, NULL, 0), |
843 | SND_SOC_DAPM_PGA("Right Input PGA", WM8903_POWER_MANAGEMENT_0, 0, 0, NULL, 0), | 854 | SND_SOC_DAPM_PGA("Right Input PGA", WM8903_POWER_MANAGEMENT_0, 0, 0, NULL, 0), |
844 | 855 | ||
856 | SND_SOC_DAPM_MUX("Left ADC Input", SND_SOC_NOPM, 0, 0, &adcinput_mux), | ||
857 | SND_SOC_DAPM_MUX("Right ADC Input", SND_SOC_NOPM, 0, 0, &adcinput_mux), | ||
858 | |||
845 | SND_SOC_DAPM_ADC("ADCL", NULL, WM8903_POWER_MANAGEMENT_6, 1, 0), | 859 | SND_SOC_DAPM_ADC("ADCL", NULL, WM8903_POWER_MANAGEMENT_6, 1, 0), |
846 | SND_SOC_DAPM_ADC("ADCR", NULL, WM8903_POWER_MANAGEMENT_6, 0, 0), | 860 | SND_SOC_DAPM_ADC("ADCR", NULL, WM8903_POWER_MANAGEMENT_6, 0, 0), |
847 | 861 | ||
@@ -979,6 +993,11 @@ static const struct snd_soc_dapm_route wm8903_intercon[] = { | |||
979 | { "Left Input PGA", NULL, "Left Input Mode Mux" }, | 993 | { "Left Input PGA", NULL, "Left Input Mode Mux" }, |
980 | { "Right Input PGA", NULL, "Right Input Mode Mux" }, | 994 | { "Right Input PGA", NULL, "Right Input Mode Mux" }, |
981 | 995 | ||
996 | { "Left ADC Input", "ADC", "Left Input PGA" }, | ||
997 | { "Left ADC Input", "DMIC", "DMICDAT" }, | ||
998 | { "Right ADC Input", "ADC", "Right Input PGA" }, | ||
999 | { "Right ADC Input", "DMIC", "DMICDAT" }, | ||
1000 | |||
982 | { "Left Capture Mux", "Left", "ADCL" }, | 1001 | { "Left Capture Mux", "Left", "ADCL" }, |
983 | { "Left Capture Mux", "Right", "ADCR" }, | 1002 | { "Left Capture Mux", "Right", "ADCR" }, |
984 | 1003 | ||
@@ -988,9 +1007,9 @@ static const struct snd_soc_dapm_route wm8903_intercon[] = { | |||
988 | { "AIFTXL", NULL, "Left Capture Mux" }, | 1007 | { "AIFTXL", NULL, "Left Capture Mux" }, |
989 | { "AIFTXR", NULL, "Right Capture Mux" }, | 1008 | { "AIFTXR", NULL, "Right Capture Mux" }, |
990 | 1009 | ||
991 | { "ADCL", NULL, "Left Input PGA" }, | 1010 | { "ADCL", NULL, "Left ADC Input" }, |
992 | { "ADCL", NULL, "CLK_DSP" }, | 1011 | { "ADCL", NULL, "CLK_DSP" }, |
993 | { "ADCR", NULL, "Right Input PGA" }, | 1012 | { "ADCR", NULL, "Right ADC Input" }, |
994 | { "ADCR", NULL, "CLK_DSP" }, | 1013 | { "ADCR", NULL, "CLK_DSP" }, |
995 | 1014 | ||
996 | { "Left Playback Mux", "Left", "AIFRXL" }, | 1015 | { "Left Playback Mux", "Left", "AIFRXL" }, |