| Index: sound/soc/codecs/wm8955.c
|
| diff --git a/sound/soc/codecs/wm8955.c b/sound/soc/codecs/wm8955.c
|
| index 2ac35b0be86acb37faaabdb1c0f81b321a2bb741..5e0214d6293ea57672ebc54c427470e50768e4ca 100644
|
| --- a/sound/soc/codecs/wm8955.c
|
| +++ b/sound/soc/codecs/wm8955.c
|
| @@ -23,7 +23,6 @@
|
| #include <sound/pcm.h>
|
| #include <sound/pcm_params.h>
|
| #include <sound/soc.h>
|
| -#include <sound/soc-dapm.h>
|
| #include <sound/initval.h>
|
| #include <sound/tlv.h>
|
| #include <sound/wm8955.h>
|
| @@ -576,13 +575,14 @@ static const struct snd_soc_dapm_route wm8955_intercon[] = {
|
|
|
| static int wm8955_add_widgets(struct snd_soc_codec *codec)
|
| {
|
| + struct snd_soc_dapm_context *dapm = &codec->dapm;
|
| +
|
| snd_soc_add_controls(codec, wm8955_snd_controls,
|
| ARRAY_SIZE(wm8955_snd_controls));
|
|
|
| - snd_soc_dapm_new_controls(codec, wm8955_dapm_widgets,
|
| + snd_soc_dapm_new_controls(dapm, wm8955_dapm_widgets,
|
| ARRAY_SIZE(wm8955_dapm_widgets));
|
| -
|
| - snd_soc_dapm_add_routes(codec, wm8955_intercon,
|
| + snd_soc_dapm_add_routes(dapm, wm8955_intercon,
|
| ARRAY_SIZE(wm8955_intercon));
|
|
|
| return 0;
|
| @@ -786,7 +786,7 @@ static int wm8955_set_bias_level(struct snd_soc_codec *codec,
|
| break;
|
|
|
| case SND_SOC_BIAS_STANDBY:
|
| - if (codec->bias_level == SND_SOC_BIAS_OFF) {
|
| + if (codec->dapm.bias_level == SND_SOC_BIAS_OFF) {
|
| ret = regulator_bulk_enable(ARRAY_SIZE(wm8955->supplies),
|
| wm8955->supplies);
|
| if (ret != 0) {
|
| @@ -850,7 +850,7 @@ static int wm8955_set_bias_level(struct snd_soc_codec *codec,
|
| wm8955->supplies);
|
| break;
|
| }
|
| - codec->bias_level = level;
|
| + codec->dapm.bias_level = level;
|
| return 0;
|
| }
|
|
|
| @@ -934,16 +934,27 @@ static int wm8955_probe(struct snd_soc_codec *codec)
|
| }
|
|
|
| /* Change some default settings - latch VU and enable ZC */
|
| - reg_cache[WM8955_LEFT_DAC_VOLUME] |= WM8955_LDVU;
|
| - reg_cache[WM8955_RIGHT_DAC_VOLUME] |= WM8955_RDVU;
|
| - reg_cache[WM8955_LOUT1_VOLUME] |= WM8955_LO1VU | WM8955_LO1ZC;
|
| - reg_cache[WM8955_ROUT1_VOLUME] |= WM8955_RO1VU | WM8955_RO1ZC;
|
| - reg_cache[WM8955_LOUT2_VOLUME] |= WM8955_LO2VU | WM8955_LO2ZC;
|
| - reg_cache[WM8955_ROUT2_VOLUME] |= WM8955_RO2VU | WM8955_RO2ZC;
|
| - reg_cache[WM8955_MONOOUT_VOLUME] |= WM8955_MOZC;
|
| + snd_soc_update_bits(codec, WM8955_LEFT_DAC_VOLUME,
|
| + WM8955_LDVU, WM8955_LDVU);
|
| + snd_soc_update_bits(codec, WM8955_RIGHT_DAC_VOLUME,
|
| + WM8955_RDVU, WM8955_RDVU);
|
| + snd_soc_update_bits(codec, WM8955_LOUT1_VOLUME,
|
| + WM8955_LO1VU | WM8955_LO1ZC,
|
| + WM8955_LO1VU | WM8955_LO1ZC);
|
| + snd_soc_update_bits(codec, WM8955_ROUT1_VOLUME,
|
| + WM8955_RO1VU | WM8955_RO1ZC,
|
| + WM8955_RO1VU | WM8955_RO1ZC);
|
| + snd_soc_update_bits(codec, WM8955_LOUT2_VOLUME,
|
| + WM8955_LO2VU | WM8955_LO2ZC,
|
| + WM8955_LO2VU | WM8955_LO2ZC);
|
| + snd_soc_update_bits(codec, WM8955_ROUT2_VOLUME,
|
| + WM8955_RO2VU | WM8955_RO2ZC,
|
| + WM8955_RO2VU | WM8955_RO2ZC);
|
| + snd_soc_update_bits(codec, WM8955_MONOOUT_VOLUME,
|
| + WM8955_MOZC, WM8955_MOZC);
|
|
|
| /* Also enable adaptive bass boost by default */
|
| - reg_cache[WM8955_BASS_CONTROL] |= WM8955_BB;
|
| + snd_soc_update_bits(codec, WM8955_BASS_CONTROL, WM8955_BB, WM8955_BB);
|
|
|
| /* Set platform data values */
|
| if (pdata) {
|
|
|