aboutsummaryrefslogtreecommitdiffstats
path: root/sound/soc/codecs/twl4030.c
diff options
context:
space:
mode:
Diffstat (limited to 'sound/soc/codecs/twl4030.c')
-rw-r--r--sound/soc/codecs/twl4030.c37
1 files changed, 37 insertions, 0 deletions
diff --git a/sound/soc/codecs/twl4030.c b/sound/soc/codecs/twl4030.c
index 86ff5a9ffa7f..08c33e9b96ce 100644
--- a/sound/soc/codecs/twl4030.c
+++ b/sound/soc/codecs/twl4030.c
@@ -253,6 +253,30 @@ static const struct soc_enum twl4030_hsor_enum =
253static const struct snd_kcontrol_new twl4030_dapm_hsor_control = 253static const struct snd_kcontrol_new twl4030_dapm_hsor_control =
254SOC_DAPM_ENUM("Route", twl4030_hsor_enum); 254SOC_DAPM_ENUM("Route", twl4030_hsor_enum);
255 255
256/* Carkit Left */
257static const char *twl4030_carkitl_texts[] =
258 {"Off", "DACL1", "DACL2"};
259
260static const struct soc_enum twl4030_carkitl_enum =
261 SOC_ENUM_SINGLE(TWL4030_REG_PRECKL_CTL, 1,
262 ARRAY_SIZE(twl4030_carkitl_texts),
263 twl4030_carkitl_texts);
264
265static const struct snd_kcontrol_new twl4030_dapm_carkitl_control =
266SOC_DAPM_ENUM("Route", twl4030_carkitl_enum);
267
268/* Carkit Right */
269static const char *twl4030_carkitr_texts[] =
270 {"Off", "DACR1", "DACR2"};
271
272static const struct soc_enum twl4030_carkitr_enum =
273 SOC_ENUM_SINGLE(TWL4030_REG_PRECKR_CTL, 1,
274 ARRAY_SIZE(twl4030_carkitr_texts),
275 twl4030_carkitr_texts);
276
277static const struct snd_kcontrol_new twl4030_dapm_carkitr_control =
278SOC_DAPM_ENUM("Route", twl4030_carkitr_enum);
279
256static int outmixer_event(struct snd_soc_dapm_widget *w, 280static int outmixer_event(struct snd_soc_dapm_widget *w,
257 struct snd_kcontrol *kcontrol, int event) 281 struct snd_kcontrol *kcontrol, int event)
258{ 282{
@@ -751,6 +775,11 @@ static const struct snd_soc_dapm_widget twl4030_dapm_widgets[] = {
751 &twl4030_dapm_hsol_control), 775 &twl4030_dapm_hsol_control),
752 SND_SOC_DAPM_MUX("HeadsetR Mux", SND_SOC_NOPM, 0, 0, 776 SND_SOC_DAPM_MUX("HeadsetR Mux", SND_SOC_NOPM, 0, 0,
753 &twl4030_dapm_hsor_control), 777 &twl4030_dapm_hsor_control),
778 /* CarkitL/R */
779 SND_SOC_DAPM_MUX("CarkitL Mux", SND_SOC_NOPM, 0, 0,
780 &twl4030_dapm_carkitl_control),
781 SND_SOC_DAPM_MUX("CarkitR Mux", SND_SOC_NOPM, 0, 0,
782 &twl4030_dapm_carkitr_control),
754 783
755 SND_SOC_DAPM_ADC("ADCL", "Left Capture", SND_SOC_NOPM, 0, 0), 784 SND_SOC_DAPM_ADC("ADCL", "Left Capture", SND_SOC_NOPM, 0, 0),
756 SND_SOC_DAPM_ADC("ADCR", "Right Capture", SND_SOC_NOPM, 0, 0), 785 SND_SOC_DAPM_ADC("ADCR", "Right Capture", SND_SOC_NOPM, 0, 0),
@@ -781,6 +810,12 @@ static const struct snd_soc_dapm_route intercon[] = {
781 /* HeadsetR */ 810 /* HeadsetR */
782 {"HeadsetR Mux", "DACR1", "ARXR1_APGA"}, 811 {"HeadsetR Mux", "DACR1", "ARXR1_APGA"},
783 {"HeadsetR Mux", "DACR2", "ARXR2_APGA"}, 812 {"HeadsetR Mux", "DACR2", "ARXR2_APGA"},
813 /* CarkitL */
814 {"CarkitL Mux", "DACL1", "ARXL1_APGA"},
815 {"CarkitL Mux", "DACL2", "ARXL2_APGA"},
816 /* CarkitR */
817 {"CarkitR Mux", "DACR1", "ARXR1_APGA"},
818 {"CarkitR Mux", "DACR2", "ARXR2_APGA"},
784 819
785 /* outputs */ 820 /* outputs */
786 {"OUTL", NULL, "ARXL2_APGA"}, 821 {"OUTL", NULL, "ARXL2_APGA"},
@@ -790,6 +825,8 @@ static const struct snd_soc_dapm_route intercon[] = {
790 {"PREDRIVER", NULL, "PredriveR Mux"}, 825 {"PREDRIVER", NULL, "PredriveR Mux"},
791 {"HSOL", NULL, "HeadsetL Mux"}, 826 {"HSOL", NULL, "HeadsetL Mux"},
792 {"HSOR", NULL, "HeadsetR Mux"}, 827 {"HSOR", NULL, "HeadsetR Mux"},
828 {"CARKITL", NULL, "CarkitL Mux"},
829 {"CARKITR", NULL, "CarkitR Mux"},
793 830
794 /* inputs */ 831 /* inputs */
795 {"ADCL", NULL, "INL"}, 832 {"ADCL", NULL, "INL"},