diff options
author | Mark Brown <broonie@opensource.wolfsonmicro.com> | 2010-12-09 07:07:44 -0500 |
---|---|---|
committer | Mark Brown <broonie@opensource.wolfsonmicro.com> | 2010-12-10 12:39:54 -0500 |
commit | 154b26aa9ec4aaeaa7258fe85a036613f3713a59 (patch) | |
tree | 0d1873c130cfc56e3ef8cd5d83703ab3a7aebf0e /sound/soc/codecs/wm8994.c | |
parent | 249c5156b8a743e3df5386c5cb7ae3df1d754e50 (diff) |
ASoC: Implement WM8994/58 DAC and ADC oversampling control
The oversampling rate of the DAC and ADC can be controlled to optimise
for either low power consumption or maximum performance.
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
Diffstat (limited to 'sound/soc/codecs/wm8994.c')
-rw-r--r-- | sound/soc/codecs/wm8994.c | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/sound/soc/codecs/wm8994.c b/sound/soc/codecs/wm8994.c index da48802340fc..e59691a7b342 100644 --- a/sound/soc/codecs/wm8994.c +++ b/sound/soc/codecs/wm8994.c | |||
@@ -558,6 +558,16 @@ static const struct soc_enum aif2dacl_src = | |||
558 | static const struct soc_enum aif2dacr_src = | 558 | static const struct soc_enum aif2dacr_src = |
559 | SOC_ENUM_SINGLE(WM8994_AIF2_CONTROL_2, 14, 2, aif_chan_src_text); | 559 | SOC_ENUM_SINGLE(WM8994_AIF2_CONTROL_2, 14, 2, aif_chan_src_text); |
560 | 560 | ||
561 | static const char *osr_text[] = { | ||
562 | "Low Power", "High Performance", | ||
563 | }; | ||
564 | |||
565 | static const struct soc_enum dac_osr = | ||
566 | SOC_ENUM_SINGLE(WM8994_OVERSAMPLING, 0, 2, osr_text); | ||
567 | |||
568 | static const struct soc_enum adc_osr = | ||
569 | SOC_ENUM_SINGLE(WM8994_OVERSAMPLING, 1, 2, osr_text); | ||
570 | |||
561 | static void wm8958_mbc_apply(struct snd_soc_codec *codec, int mbc, int start) | 571 | static void wm8958_mbc_apply(struct snd_soc_codec *codec, int mbc, int start) |
562 | { | 572 | { |
563 | struct wm8994_priv *wm8994 = snd_soc_codec_get_drvdata(codec); | 573 | struct wm8994_priv *wm8994 = snd_soc_codec_get_drvdata(codec); |
@@ -834,6 +844,9 @@ SOC_DOUBLE("AIF1ADC2 HPF Switch", WM8994_AIF1_ADC2_FILTERS, 12, 11, 1, 0), | |||
834 | SOC_ENUM("AIF2ADC HPF Mode", aif2adc_hpf), | 844 | SOC_ENUM("AIF2ADC HPF Mode", aif2adc_hpf), |
835 | SOC_DOUBLE("AIF2ADC HPF Switch", WM8994_AIF2_ADC_FILTERS, 12, 11, 1, 0), | 845 | SOC_DOUBLE("AIF2ADC HPF Switch", WM8994_AIF2_ADC_FILTERS, 12, 11, 1, 0), |
836 | 846 | ||
847 | SOC_ENUM("ADC OSR", adc_osr), | ||
848 | SOC_ENUM("DAC OSR", dac_osr), | ||
849 | |||
837 | SOC_DOUBLE_R_TLV("DAC1 Volume", WM8994_DAC1_LEFT_VOLUME, | 850 | SOC_DOUBLE_R_TLV("DAC1 Volume", WM8994_DAC1_LEFT_VOLUME, |
838 | WM8994_DAC1_RIGHT_VOLUME, 1, 96, 0, digital_tlv), | 851 | WM8994_DAC1_RIGHT_VOLUME, 1, 96, 0, digital_tlv), |
839 | SOC_DOUBLE_R("DAC1 Switch", WM8994_DAC1_LEFT_VOLUME, | 852 | SOC_DOUBLE_R("DAC1 Switch", WM8994_DAC1_LEFT_VOLUME, |