aboutsummaryrefslogtreecommitdiffstats
path: root/sound
diff options
context:
space:
mode:
authorMark Brown <broonie@opensource.wolfsonmicro.com>2010-08-31 14:39:48 -0400
committerMark Brown <broonie@opensource.wolfsonmicro.com>2010-09-01 07:14:44 -0400
commitf554885f9214060911cd007b05ba562b5f2af6aa (patch)
treecdc422c2c0155c3fefaa213c26531a271f84981c /sound
parent1d6be338c11ddc1e58915ab85e19b0f6cbc10782 (diff)
ASoC: Implement WM8994 DAC data source muxes
Allow selection of the channel used for input to the AIFnDAC signals. This isn't integrated into DAPM since we treat the data as a single mono channel until just beyond this selection so it ends up having no visible effect on the routing. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
Diffstat (limited to 'sound')
-rw-r--r--sound/soc/codecs/wm8994.c21
1 files changed, 21 insertions, 0 deletions
diff --git a/sound/soc/codecs/wm8994.c b/sound/soc/codecs/wm8994.c
index e03072cade7b..c45ab0030294 100644
--- a/sound/soc/codecs/wm8994.c
+++ b/sound/soc/codecs/wm8994.c
@@ -2072,6 +2072,22 @@ static int wm8994_get_retune_mobile_enum(struct snd_kcontrol *kcontrol,
2072 return 0; 2072 return 0;
2073} 2073}
2074 2074
2075static const char *aifdac_src_text[] = {
2076 "Left", "Right"
2077};
2078
2079static const struct soc_enum aif1dacl_src =
2080 SOC_ENUM_SINGLE(WM8994_AIF1_CONTROL_2, 15, 2, aifdac_src_text);
2081
2082static const struct soc_enum aif1dacr_src =
2083 SOC_ENUM_SINGLE(WM8994_AIF1_CONTROL_2, 14, 2, aifdac_src_text);
2084
2085static const struct soc_enum aif2dacl_src =
2086 SOC_ENUM_SINGLE(WM8994_AIF2_CONTROL_2, 15, 2, aifdac_src_text);
2087
2088static const struct soc_enum aif2dacr_src =
2089 SOC_ENUM_SINGLE(WM8994_AIF2_CONTROL_2, 14, 2, aifdac_src_text);
2090
2075static const struct snd_kcontrol_new wm8994_snd_controls[] = { 2091static const struct snd_kcontrol_new wm8994_snd_controls[] = {
2076SOC_DOUBLE_R_TLV("AIF1ADC1 Volume", WM8994_AIF1_ADC1_LEFT_VOLUME, 2092SOC_DOUBLE_R_TLV("AIF1ADC1 Volume", WM8994_AIF1_ADC1_LEFT_VOLUME,
2077 WM8994_AIF1_ADC1_RIGHT_VOLUME, 2093 WM8994_AIF1_ADC1_RIGHT_VOLUME,
@@ -2083,6 +2099,11 @@ SOC_DOUBLE_R_TLV("AIF2ADC Volume", WM8994_AIF2_ADC_LEFT_VOLUME,
2083 WM8994_AIF2_ADC_RIGHT_VOLUME, 2099 WM8994_AIF2_ADC_RIGHT_VOLUME,
2084 1, 119, 0, digital_tlv), 2100 1, 119, 0, digital_tlv),
2085 2101
2102SOC_ENUM("AIF1DACL Source", aif1dacl_src),
2103SOC_ENUM("AIF1DACR Source", aif1dacr_src),
2104SOC_ENUM("AIF2DACL Source", aif1dacl_src),
2105SOC_ENUM("AIF2DACR Source", aif1dacr_src),
2106
2086SOC_DOUBLE_R_TLV("AIF1DAC1 Volume", WM8994_AIF1_DAC1_LEFT_VOLUME, 2107SOC_DOUBLE_R_TLV("AIF1DAC1 Volume", WM8994_AIF1_DAC1_LEFT_VOLUME,
2087 WM8994_AIF1_DAC1_RIGHT_VOLUME, 1, 96, 0, digital_tlv), 2108 WM8994_AIF1_DAC1_RIGHT_VOLUME, 1, 96, 0, digital_tlv),
2088SOC_DOUBLE_R_TLV("AIF1DAC2 Volume", WM8994_AIF1_DAC2_LEFT_VOLUME, 2109SOC_DOUBLE_R_TLV("AIF1DAC2 Volume", WM8994_AIF1_DAC2_LEFT_VOLUME,