aboutsummaryrefslogtreecommitdiffstats
path: root/sound
diff options
context:
space:
mode:
authorMark Brown <broonie@opensource.wolfsonmicro.com>2012-01-21 07:11:53 -0500
committerMark Brown <broonie@opensource.wolfsonmicro.com>2012-02-22 08:57:03 -0500
commit462835e4a7f898662cc30064a33177af4823ef9d (patch)
tree0b9fec7de86ad6d9503d50efda445ce441ac582d /sound
parentabc0cceaeeab6d3101f4d9492063a4e4ae813b85 (diff)
mfd/ASoC: Convert WM8994 driver to use regmap patches
Early revisions of several of the WM8994 variants have register updates to improve performance. Move these over to using the regmap patch system instead of open coding them in the audio driver. Since the regmap init is done by the MFD the code is moved there. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Acked-by: Samuel Ortiz <sameo@linux.intel.com>
Diffstat (limited to 'sound')
-rw-r--r--sound/soc/codecs/wm8994.c25
1 files changed, 1 insertions, 24 deletions
diff --git a/sound/soc/codecs/wm8994.c b/sound/soc/codecs/wm8994.c
index ec69a6c152fe..7c686abf8bd9 100644
--- a/sound/soc/codecs/wm8994.c
+++ b/sound/soc/codecs/wm8994.c
@@ -2099,26 +2099,9 @@ static int wm8994_set_bias_level(struct snd_soc_codec *codec,
2099 case SND_SOC_BIAS_STANDBY: 2099 case SND_SOC_BIAS_STANDBY:
2100 if (codec->dapm.bias_level == SND_SOC_BIAS_OFF) { 2100 if (codec->dapm.bias_level == SND_SOC_BIAS_OFF) {
2101 switch (control->type) { 2101 switch (control->type) {
2102 case WM8994:
2103 if (wm8994->revision < 4) {
2104 /* Tweak DC servo and DSP
2105 * configuration for improved
2106 * performance. */
2107 snd_soc_write(codec, 0x102, 0x3);
2108 snd_soc_write(codec, 0x56, 0x3);
2109 snd_soc_write(codec, 0x817, 0);
2110 snd_soc_write(codec, 0x102, 0);
2111 }
2112 break;
2113
2114 case WM8958: 2102 case WM8958:
2115 if (wm8994->revision == 0) { 2103 if (wm8994->revision == 0) {
2116 /* Optimise performance for rev A */ 2104 /* Optimise performance for rev A */
2117 snd_soc_write(codec, 0x102, 0x3);
2118 snd_soc_write(codec, 0xcb, 0x81);
2119 snd_soc_write(codec, 0x817, 0);
2120 snd_soc_write(codec, 0x102, 0);
2121
2122 snd_soc_update_bits(codec, 2105 snd_soc_update_bits(codec,
2123 WM8958_CHARGE_PUMP_2, 2106 WM8958_CHARGE_PUMP_2,
2124 WM8958_CP_DISCH, 2107 WM8958_CP_DISCH,
@@ -2126,13 +2109,7 @@ static int wm8994_set_bias_level(struct snd_soc_codec *codec,
2126 } 2109 }
2127 break; 2110 break;
2128 2111
2129 case WM1811: 2112 default:
2130 if (wm8994->revision < 2) {
2131 snd_soc_write(codec, 0x102, 0x3);
2132 snd_soc_write(codec, 0x5d, 0x7e);
2133 snd_soc_write(codec, 0x5e, 0x0);
2134 snd_soc_write(codec, 0x102, 0x0);
2135 }
2136 break; 2113 break;
2137 } 2114 }
2138 2115