diff options
author | Mark Brown <broonie@opensource.wolfsonmicro.com> | 2010-10-20 17:13:20 -0700 |
---|---|---|
committer | Arve Hjønnevåg <arve@android.com> | 2011-11-17 17:51:24 -0800 |
commit | f9f8c19f218b5739cfb28edfe67d18d582e120d5 (patch) | |
tree | 6a852b1b8e8874bcc15ac30c6fbc7344569c8428 /sound | |
parent | a063da92ec77821e39f45014f54848b47d543a2b (diff) | |
download | kernel_samsung_crespo-f9f8c19f218b5739cfb28edfe67d18d582e120d5.zip kernel_samsung_crespo-f9f8c19f218b5739cfb28edfe67d18d582e120d5.tar.gz kernel_samsung_crespo-f9f8c19f218b5739cfb28edfe67d18d582e120d5.tar.bz2 |
ASoC: Remove 10ms delay in Herring record startup
Enable the high pass filter at the start of the powerup sequence to ensure
that it's enabled when we start seeing audio, and remove the 10ms delay in
the sequence which appears to have been masking the bounce by discarding
audio.
Change-Id: Ie73155339bea8450a8948ab265b2ad1d3bc83685
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Diffstat (limited to 'sound')
-rw-r--r-- | sound/soc/codecs/wm8994_herring.c | 26 |
1 files changed, 12 insertions, 14 deletions
diff --git a/sound/soc/codecs/wm8994_herring.c b/sound/soc/codecs/wm8994_herring.c index 19037d2..e9ee4c4 100644 --- a/sound/soc/codecs/wm8994_herring.c +++ b/sound/soc/codecs/wm8994_herring.c @@ -914,6 +914,12 @@ void wm8994_record_headset_mic(struct snd_soc_codec *codec) wm8994_write(codec, WM8994_ANTIPOP_2, 0x68); + /* Enable high pass filter to control bounce on startup */ + val = wm8994_read(codec, WM8994_AIF1_ADC1_FILTERS); + val &= ~(WM8994_AIF1ADC1L_HPF_MASK | WM8994_AIF1ADC1R_HPF_MASK); + val |= (WM8994_AIF1ADC1L_HPF); + wm8994_write(codec, WM8994_AIF1_ADC1_FILTERS, val); + /* Enable mic bias, vmid, bias generator */ val = wm8994_read(codec, WM8994_POWER_MANAGEMENT_1); val &= ~(WM8994_BIAS_ENA_MASK | WM8994_VMID_SEL_MASK); @@ -980,13 +986,6 @@ void wm8994_record_headset_mic(struct snd_soc_codec *codec) val |= WM8994_ADC1R_TO_AIF1ADC1R; wm8994_write(codec, WM8994_AIF1_ADC1_RIGHT_MIXER_ROUTING, val); - msleep(10); - - val = wm8994_read(codec, WM8994_AIF1_ADC1_FILTERS); - val &= ~(WM8994_AIF1ADC1L_HPF_MASK | WM8994_AIF1ADC1R_HPF_MASK); - val |= (WM8994_AIF1ADC1L_HPF); - wm8994_write(codec, WM8994_AIF1_ADC1_FILTERS, val); - val = wm8994_read(codec, WM8994_SPEAKER_MIXER); val &= ~WM8994_MIXINL_TO_SPKMIXL_MASK; wm8994_write(codec, WM8994_SPEAKER_MIXER, val); @@ -1026,6 +1025,12 @@ void wm8994_record_main_mic(struct snd_soc_codec *codec) /* Main mic volume issue fix: requested H/W */ wm8994_write(codec, WM8994_ANTIPOP_2, 0x68); + /* High pass filter to control bounce on enable */ + val = wm8994_read(codec, WM8994_AIF1_ADC1_FILTERS); + val &= ~(WM8994_AIF1ADC1L_HPF_MASK | WM8994_AIF1ADC1R_HPF_MASK); + val |= (WM8994_AIF1ADC1L_HPF); + wm8994_write(codec, WM8994_AIF1_ADC1_FILTERS, val); + val = wm8994_read(codec, WM8994_POWER_MANAGEMENT_1); val &= ~(WM8994_BIAS_ENA_MASK | WM8994_VMID_SEL_MASK); val |= (WM8994_BIAS_ENA | WM8994_VMID_SEL_NORMAL); @@ -1087,13 +1092,6 @@ void wm8994_record_main_mic(struct snd_soc_codec *codec) val |= WM8994_ADC1L_TO_AIF1ADC1L; wm8994_write(codec, WM8994_AIF1_ADC1_LEFT_MIXER_ROUTING, val); - msleep(10); - - val = wm8994_read(codec, WM8994_AIF1_ADC1_FILTERS); - val &= ~(WM8994_AIF1ADC1L_HPF_MASK | WM8994_AIF1ADC1R_HPF_MASK); - val |= (WM8994_AIF1ADC1L_HPF); - wm8994_write(codec, WM8994_AIF1_ADC1_FILTERS, val); - val = wm8994_read(codec, WM8994_SPEAKER_MIXER); val &= ~WM8994_MIXINL_TO_SPKMIXL_MASK; wm8994_write(codec, WM8994_SPEAKER_MIXER, val); |