OSDN Git Service

ASoC: tlv320adcx140: Add ASI enable for channel 5-8
authorDan Murphy <dmurphy@ti.com>
Thu, 9 Jul 2020 18:51:28 +0000 (13:51 -0500)
committerMark Brown <broonie@kernel.org>
Thu, 9 Jul 2020 21:20:29 +0000 (22:20 +0100)
Add the ALSA controls to enable the ASI for channels 5-8

Signed-off-by: Dan Murphy <dmurphy@ti.com>
Link: https://lore.kernel.org/r/20200709185129.10505-1-dmurphy@ti.com
Signed-off-by: Mark Brown <broonie@kernel.org>
sound/soc/codecs/tlv320adcx140.c

index 35fe8ee..f884abd 100644 (file)
@@ -313,6 +313,14 @@ static const struct snd_kcontrol_new adcx140_dapm_ch3_en_switch =
        SOC_DAPM_SINGLE("Switch", ADCX140_ASI_OUT_CH_EN, 5, 1, 0);
 static const struct snd_kcontrol_new adcx140_dapm_ch4_en_switch =
        SOC_DAPM_SINGLE("Switch", ADCX140_ASI_OUT_CH_EN, 4, 1, 0);
+static const struct snd_kcontrol_new adcx140_dapm_ch5_en_switch =
+       SOC_DAPM_SINGLE("Switch", ADCX140_ASI_OUT_CH_EN, 3, 1, 0);
+static const struct snd_kcontrol_new adcx140_dapm_ch6_en_switch =
+       SOC_DAPM_SINGLE("Switch", ADCX140_ASI_OUT_CH_EN, 2, 1, 0);
+static const struct snd_kcontrol_new adcx140_dapm_ch7_en_switch =
+       SOC_DAPM_SINGLE("Switch", ADCX140_ASI_OUT_CH_EN, 1, 1, 0);
+static const struct snd_kcontrol_new adcx140_dapm_ch8_en_switch =
+       SOC_DAPM_SINGLE("Switch", ADCX140_ASI_OUT_CH_EN, 0, 1, 0);
 
 static const struct snd_kcontrol_new adcx140_dapm_ch1_dre_en_switch =
        SOC_DAPM_SINGLE("Switch", ADCX140_CH1_CFG0, 0, 1, 0);
@@ -406,6 +414,15 @@ static const struct snd_soc_dapm_widget adcx140_dapm_widgets[] = {
        SND_SOC_DAPM_SWITCH("CH4_ASI_EN", SND_SOC_NOPM, 0, 0,
                            &adcx140_dapm_ch4_en_switch),
 
+       SND_SOC_DAPM_SWITCH("CH5_ASI_EN", SND_SOC_NOPM, 0, 0,
+                           &adcx140_dapm_ch5_en_switch),
+       SND_SOC_DAPM_SWITCH("CH6_ASI_EN", SND_SOC_NOPM, 0, 0,
+                           &adcx140_dapm_ch6_en_switch),
+       SND_SOC_DAPM_SWITCH("CH7_ASI_EN", SND_SOC_NOPM, 0, 0,
+                           &adcx140_dapm_ch7_en_switch),
+       SND_SOC_DAPM_SWITCH("CH8_ASI_EN", SND_SOC_NOPM, 0, 0,
+                           &adcx140_dapm_ch8_en_switch),
+
        SND_SOC_DAPM_SWITCH("DRE_ENABLE", SND_SOC_NOPM, 0, 0,
                            &adcx140_dapm_dre_en_switch),
 
@@ -446,6 +463,11 @@ static const struct snd_soc_dapm_route adcx140_audio_map[] = {
        {"CH3_ASI_EN", "Switch", "CH3_ADC"},
        {"CH4_ASI_EN", "Switch", "CH4_ADC"},
 
+       {"CH5_ASI_EN", "Switch", "CH5_OUT"},
+       {"CH6_ASI_EN", "Switch", "CH6_OUT"},
+       {"CH7_ASI_EN", "Switch", "CH7_OUT"},
+       {"CH8_ASI_EN", "Switch", "CH8_OUT"},
+
        {"Decimation Filter", "Linear Phase", "DRE_ENABLE"},
        {"Decimation Filter", "Low Latency", "DRE_ENABLE"},
        {"Decimation Filter", "Ultra-low Latency", "DRE_ENABLE"},