diff options
author | Mark Brown <broonie@opensource.wolfsonmicro.com> | 2012-02-11 18:09:53 -0500 |
---|---|---|
committer | Mark Brown <broonie@opensource.wolfsonmicro.com> | 2012-02-11 18:11:21 -0500 |
commit | cc6d5a8c2b8c1a04c91bac0a5be02e64307518eb (patch) | |
tree | e20f1adeff98ecb823ec9dce9a5b30f1d4cce18a /sound/soc/codecs | |
parent | d60d6c3b65fa2156ec95d96f73e34cdb0c586458 (diff) |
ASoC: wm8994: VMID management improvements
Raise the ramp time to 50ms to cover corner cases, use the startup bias
generator, explicitly reset the ramp circuit when complete and reorder
things all of which should improve performance somewhat for systems that
are sensitive to noise from VMID.
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Diffstat (limited to 'sound/soc/codecs')
-rw-r--r-- | sound/soc/codecs/wm8994.c | 20 |
1 files changed, 14 insertions, 6 deletions
diff --git a/sound/soc/codecs/wm8994.c b/sound/soc/codecs/wm8994.c index 21931a0c7cea..aa94ca1f6a9b 100644 --- a/sound/soc/codecs/wm8994.c +++ b/sound/soc/codecs/wm8994.c | |||
@@ -778,29 +778,37 @@ static void vmid_reference(struct snd_soc_codec *codec) | |||
778 | wm8994->vmid_refcount); | 778 | wm8994->vmid_refcount); |
779 | 779 | ||
780 | if (wm8994->vmid_refcount == 1) { | 780 | if (wm8994->vmid_refcount == 1) { |
781 | snd_soc_update_bits(codec, WM8994_ANTIPOP_1, | ||
782 | WM8994_LINEOUT_VMID_BUF_ENA | | ||
783 | WM8994_LINEOUT1_DISCH | | ||
784 | WM8994_LINEOUT2_DISCH, | ||
785 | WM8994_LINEOUT_VMID_BUF_ENA); | ||
786 | |||
781 | /* Startup bias, VMID ramp & buffer */ | 787 | /* Startup bias, VMID ramp & buffer */ |
782 | snd_soc_update_bits(codec, WM8994_ANTIPOP_2, | 788 | snd_soc_update_bits(codec, WM8994_ANTIPOP_2, |
789 | WM8994_BIAS_SRC | | ||
790 | WM8994_VMID_DISCH | | ||
783 | WM8994_STARTUP_BIAS_ENA | | 791 | WM8994_STARTUP_BIAS_ENA | |
784 | WM8994_VMID_BUF_ENA | | 792 | WM8994_VMID_BUF_ENA | |
785 | WM8994_VMID_RAMP_MASK, | 793 | WM8994_VMID_RAMP_MASK, |
794 | WM8994_BIAS_SRC | | ||
786 | WM8994_STARTUP_BIAS_ENA | | 795 | WM8994_STARTUP_BIAS_ENA | |
787 | WM8994_VMID_BUF_ENA | | 796 | WM8994_VMID_BUF_ENA | |
788 | (0x3 << WM8994_VMID_RAMP_SHIFT)); | 797 | (0x3 << WM8994_VMID_RAMP_SHIFT)); |
789 | 798 | ||
790 | wm_hubs_vmid_ena(codec); | 799 | wm_hubs_vmid_ena(codec); |
791 | 800 | ||
792 | /* Remove discharge for line out */ | ||
793 | snd_soc_update_bits(codec, WM8994_ANTIPOP_1, | ||
794 | WM8994_LINEOUT1_DISCH | | ||
795 | WM8994_LINEOUT2_DISCH, 0); | ||
796 | |||
797 | /* Main bias enable, VMID=2x40k */ | 801 | /* Main bias enable, VMID=2x40k */ |
798 | snd_soc_update_bits(codec, WM8994_POWER_MANAGEMENT_1, | 802 | snd_soc_update_bits(codec, WM8994_POWER_MANAGEMENT_1, |
799 | WM8994_BIAS_ENA | | 803 | WM8994_BIAS_ENA | |
800 | WM8994_VMID_SEL_MASK, | 804 | WM8994_VMID_SEL_MASK, |
801 | WM8994_BIAS_ENA | 0x2); | 805 | WM8994_BIAS_ENA | 0x2); |
802 | 806 | ||
803 | msleep(20); | 807 | msleep(50); |
808 | |||
809 | snd_soc_update_bits(codec, WM8994_ANTIPOP_2, | ||
810 | WM8994_VMID_RAMP_MASK | WM8994_BIAS_SRC, | ||
811 | 0); | ||
804 | } | 812 | } |
805 | } | 813 | } |
806 | 814 | ||