aboutsummaryrefslogtreecommitdiffstats
path: root/sound/soc/codecs/wm8903.c
diff options
context:
space:
mode:
authorMark Brown <broonie@opensource.wolfsonmicro.com>2010-12-10 14:17:06 -0500
committerMark Brown <broonie@opensource.wolfsonmicro.com>2010-12-11 07:43:45 -0500
commitdcf9ada3bce67feab4482845f5e8e78fd278a176 (patch)
tree2d6887407002b4df6d2df2188811c11bc7e03224 /sound/soc/codecs/wm8903.c
parent460f4aae8f9c6e414f17bfaaf9b89942ed5984a6 (diff)
ASoC: Implement WM8903 oversampling rate controls
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
Diffstat (limited to 'sound/soc/codecs/wm8903.c')
-rw-r--r--sound/soc/codecs/wm8903.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/sound/soc/codecs/wm8903.c b/sound/soc/codecs/wm8903.c
index 797992c09342..542c7c4868ba 100644
--- a/sound/soc/codecs/wm8903.c
+++ b/sound/soc/codecs/wm8903.c
@@ -481,6 +481,16 @@ static const char *hpf_mode_text[] = {
481static const struct soc_enum hpf_mode = 481static const struct soc_enum hpf_mode =
482 SOC_ENUM_SINGLE(WM8903_ADC_DIGITAL_0, 5, 4, hpf_mode_text); 482 SOC_ENUM_SINGLE(WM8903_ADC_DIGITAL_0, 5, 4, hpf_mode_text);
483 483
484static const char *osr_text[] = {
485 "Low power", "High performance"
486};
487
488static const struct soc_enum adc_osr =
489 SOC_ENUM_SINGLE(WM8903_ANALOGUE_ADC_0, 0, 2, osr_text);
490
491static const struct soc_enum dac_osr =
492 SOC_ENUM_SINGLE(WM8903_DAC_DIGITAL_1, 0, 2, osr_text);
493
484static const char *drc_slope_text[] = { 494static const char *drc_slope_text[] = {
485 "1", "1/2", "1/4", "1/8", "1/16", "0" 495 "1", "1/2", "1/4", "1/8", "1/16", "0"
486}; 496};
@@ -619,6 +629,7 @@ SOC_SINGLE("Right Input PGA Common Mode Switch", WM8903_ANALOGUE_RIGHT_INPUT_1,
619 6, 1, 0), 629 6, 1, 0),
620 630
621/* ADCs */ 631/* ADCs */
632SOC_ENUM("ADC OSR", adc_osr),
622SOC_SINGLE("HPF Switch", WM8903_ADC_DIGITAL_0, 4, 1, 0), 633SOC_SINGLE("HPF Switch", WM8903_ADC_DIGITAL_0, 4, 1, 0),
623SOC_ENUM("HPF Mode", hpf_mode), 634SOC_ENUM("HPF Mode", hpf_mode),
624SOC_SINGLE("DRC Switch", WM8903_DRC_0, 15, 1, 0), 635SOC_SINGLE("DRC Switch", WM8903_DRC_0, 15, 1, 0),
@@ -650,6 +661,7 @@ SOC_DOUBLE_TLV("Digital Sidetone Volume", WM8903_DAC_DIGITAL_0, 4, 8,
650 12, 0, digital_sidetone_tlv), 661 12, 0, digital_sidetone_tlv),
651 662
652/* DAC */ 663/* DAC */
664SOC_ENUM("DAC OSR", dac_osr),
653SOC_DOUBLE_R_TLV("Digital Playback Volume", WM8903_DAC_DIGITAL_VOLUME_LEFT, 665SOC_DOUBLE_R_TLV("Digital Playback Volume", WM8903_DAC_DIGITAL_VOLUME_LEFT,
654 WM8903_DAC_DIGITAL_VOLUME_RIGHT, 1, 120, 0, digital_tlv), 666 WM8903_DAC_DIGITAL_VOLUME_RIGHT, 1, 120, 0, digital_tlv),
655SOC_ENUM("DAC Soft Mute Rate", soft_mute), 667SOC_ENUM("DAC Soft Mute Rate", soft_mute),