diff options
Diffstat (limited to 'sound/soc/codecs/ak4535.c')
-rw-r--r-- | sound/soc/codecs/ak4535.c | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/sound/soc/codecs/ak4535.c b/sound/soc/codecs/ak4535.c index cd88c8f32a38..8b38739c88f8 100644 --- a/sound/soc/codecs/ak4535.c +++ b/sound/soc/codecs/ak4535.c | |||
@@ -24,7 +24,6 @@ | |||
24 | #include <sound/pcm.h> | 24 | #include <sound/pcm.h> |
25 | #include <sound/pcm_params.h> | 25 | #include <sound/pcm_params.h> |
26 | #include <sound/soc.h> | 26 | #include <sound/soc.h> |
27 | #include <sound/soc-dapm.h> | ||
28 | #include <sound/initval.h> | 27 | #include <sound/initval.h> |
29 | 28 | ||
30 | #include "ak4535.h" | 29 | #include "ak4535.h" |
@@ -290,10 +289,11 @@ static const struct snd_soc_dapm_route audio_map[] = { | |||
290 | 289 | ||
291 | static int ak4535_add_widgets(struct snd_soc_codec *codec) | 290 | static int ak4535_add_widgets(struct snd_soc_codec *codec) |
292 | { | 291 | { |
293 | snd_soc_dapm_new_controls(codec, ak4535_dapm_widgets, | 292 | struct snd_soc_dapm_context *dapm = &codec->dapm; |
294 | ARRAY_SIZE(ak4535_dapm_widgets)); | ||
295 | 293 | ||
296 | snd_soc_dapm_add_routes(codec, audio_map, ARRAY_SIZE(audio_map)); | 294 | snd_soc_dapm_new_controls(dapm, ak4535_dapm_widgets, |
295 | ARRAY_SIZE(ak4535_dapm_widgets)); | ||
296 | snd_soc_dapm_add_routes(dapm, audio_map, ARRAY_SIZE(audio_map)); | ||
297 | 297 | ||
298 | return 0; | 298 | return 0; |
299 | } | 299 | } |
@@ -366,9 +366,9 @@ static int ak4535_set_dai_fmt(struct snd_soc_dai *codec_dai, | |||
366 | static int ak4535_mute(struct snd_soc_dai *dai, int mute) | 366 | static int ak4535_mute(struct snd_soc_dai *dai, int mute) |
367 | { | 367 | { |
368 | struct snd_soc_codec *codec = dai->codec; | 368 | struct snd_soc_codec *codec = dai->codec; |
369 | u16 mute_reg = ak4535_read_reg_cache(codec, AK4535_DAC) & 0xffdf; | 369 | u16 mute_reg = ak4535_read_reg_cache(codec, AK4535_DAC); |
370 | if (!mute) | 370 | if (!mute) |
371 | ak4535_write(codec, AK4535_DAC, mute_reg); | 371 | ak4535_write(codec, AK4535_DAC, mute_reg & ~0x20); |
372 | else | 372 | else |
373 | ak4535_write(codec, AK4535_DAC, mute_reg | 0x20); | 373 | ak4535_write(codec, AK4535_DAC, mute_reg | 0x20); |
374 | return 0; | 374 | return 0; |
@@ -381,11 +381,11 @@ static int ak4535_set_bias_level(struct snd_soc_codec *codec, | |||
381 | 381 | ||
382 | switch (level) { | 382 | switch (level) { |
383 | case SND_SOC_BIAS_ON: | 383 | case SND_SOC_BIAS_ON: |
384 | mute_reg = ak4535_read_reg_cache(codec, AK4535_DAC) & 0xffdf; | 384 | mute_reg = ak4535_read_reg_cache(codec, AK4535_DAC); |
385 | ak4535_write(codec, AK4535_DAC, mute_reg); | 385 | ak4535_write(codec, AK4535_DAC, mute_reg & ~0x20); |
386 | break; | 386 | break; |
387 | case SND_SOC_BIAS_PREPARE: | 387 | case SND_SOC_BIAS_PREPARE: |
388 | mute_reg = ak4535_read_reg_cache(codec, AK4535_DAC) & 0xffdf; | 388 | mute_reg = ak4535_read_reg_cache(codec, AK4535_DAC); |
389 | ak4535_write(codec, AK4535_DAC, mute_reg | 0x20); | 389 | ak4535_write(codec, AK4535_DAC, mute_reg | 0x20); |
390 | break; | 390 | break; |
391 | case SND_SOC_BIAS_STANDBY: | 391 | case SND_SOC_BIAS_STANDBY: |
@@ -399,7 +399,7 @@ static int ak4535_set_bias_level(struct snd_soc_codec *codec, | |||
399 | ak4535_write(codec, AK4535_PM1, i & (~0x80)); | 399 | ak4535_write(codec, AK4535_PM1, i & (~0x80)); |
400 | break; | 400 | break; |
401 | } | 401 | } |
402 | codec->bias_level = level; | 402 | codec->dapm.bias_level = level; |
403 | return 0; | 403 | return 0; |
404 | } | 404 | } |
405 | 405 | ||