aboutsummaryrefslogtreecommitdiffstats
path: root/sound/soc/codecs/wm8960.c
diff options
context:
space:
mode:
Diffstat (limited to 'sound/soc/codecs/wm8960.c')
-rw-r--r--sound/soc/codecs/wm8960.c25
1 files changed, 13 insertions, 12 deletions
diff --git a/sound/soc/codecs/wm8960.c b/sound/soc/codecs/wm8960.c
index 8d5efb333c33..0ea578815003 100644
--- a/sound/soc/codecs/wm8960.c
+++ b/sound/soc/codecs/wm8960.c
@@ -388,27 +388,28 @@ static int wm8960_add_widgets(struct snd_soc_codec *codec)
388{ 388{
389 struct wm8960_data *pdata = codec->dev->platform_data; 389 struct wm8960_data *pdata = codec->dev->platform_data;
390 struct wm8960_priv *wm8960 = snd_soc_codec_get_drvdata(codec); 390 struct wm8960_priv *wm8960 = snd_soc_codec_get_drvdata(codec);
391 struct snd_soc_dapm_context *dapm = &codec->dapm;
391 struct snd_soc_dapm_widget *w; 392 struct snd_soc_dapm_widget *w;
392 393
393 snd_soc_dapm_new_controls(codec, wm8960_dapm_widgets, 394 snd_soc_dapm_new_controls(dapm, wm8960_dapm_widgets,
394 ARRAY_SIZE(wm8960_dapm_widgets)); 395 ARRAY_SIZE(wm8960_dapm_widgets));
395 396
396 snd_soc_dapm_add_routes(codec, audio_paths, ARRAY_SIZE(audio_paths)); 397 snd_soc_dapm_add_routes(dapm, audio_paths, ARRAY_SIZE(audio_paths));
397 398
398 /* In capless mode OUT3 is used to provide VMID for the 399 /* In capless mode OUT3 is used to provide VMID for the
399 * headphone outputs, otherwise it is used as a mono mixer. 400 * headphone outputs, otherwise it is used as a mono mixer.
400 */ 401 */
401 if (pdata && pdata->capless) { 402 if (pdata && pdata->capless) {
402 snd_soc_dapm_new_controls(codec, wm8960_dapm_widgets_capless, 403 snd_soc_dapm_new_controls(dapm, wm8960_dapm_widgets_capless,
403 ARRAY_SIZE(wm8960_dapm_widgets_capless)); 404 ARRAY_SIZE(wm8960_dapm_widgets_capless));
404 405
405 snd_soc_dapm_add_routes(codec, audio_paths_capless, 406 snd_soc_dapm_add_routes(dapm, audio_paths_capless,
406 ARRAY_SIZE(audio_paths_capless)); 407 ARRAY_SIZE(audio_paths_capless));
407 } else { 408 } else {
408 snd_soc_dapm_new_controls(codec, wm8960_dapm_widgets_out3, 409 snd_soc_dapm_new_controls(dapm, wm8960_dapm_widgets_out3,
409 ARRAY_SIZE(wm8960_dapm_widgets_out3)); 410 ARRAY_SIZE(wm8960_dapm_widgets_out3));
410 411
411 snd_soc_dapm_add_routes(codec, audio_paths_out3, 412 snd_soc_dapm_add_routes(dapm, audio_paths_out3,
412 ARRAY_SIZE(audio_paths_out3)); 413 ARRAY_SIZE(audio_paths_out3));
413 } 414 }
414 415
@@ -417,7 +418,7 @@ static int wm8960_add_widgets(struct snd_soc_codec *codec)
417 * list each time to find the desired power state do so now 418 * list each time to find the desired power state do so now
418 * and save the result. 419 * and save the result.
419 */ 420 */
420 list_for_each_entry(w, &codec->dapm_widgets, list) { 421 list_for_each_entry(w, &codec->dapm.widgets, list) {
421 if (strcmp(w->name, "LOUT1 PGA") == 0) 422 if (strcmp(w->name, "LOUT1 PGA") == 0)
422 wm8960->lout1 = w; 423 wm8960->lout1 = w;
423 if (strcmp(w->name, "ROUT1 PGA") == 0) 424 if (strcmp(w->name, "ROUT1 PGA") == 0)
@@ -572,7 +573,7 @@ static int wm8960_set_bias_level_out3(struct snd_soc_codec *codec,
572 break; 573 break;
573 574
574 case SND_SOC_BIAS_STANDBY: 575 case SND_SOC_BIAS_STANDBY:
575 if (codec->bias_level == SND_SOC_BIAS_OFF) { 576 if (codec->dapm.bias_level == SND_SOC_BIAS_OFF) {
576 /* Enable anti-pop features */ 577 /* Enable anti-pop features */
577 snd_soc_write(codec, WM8960_APOP1, 578 snd_soc_write(codec, WM8960_APOP1,
578 WM8960_POBCTRL | WM8960_SOFT_ST | 579 WM8960_POBCTRL | WM8960_SOFT_ST |
@@ -610,7 +611,7 @@ static int wm8960_set_bias_level_out3(struct snd_soc_codec *codec,
610 break; 611 break;
611 } 612 }
612 613
613 codec->bias_level = level; 614 codec->dapm.bias_level = level;
614 615
615 return 0; 616 return 0;
616} 617}
@@ -626,7 +627,7 @@ static int wm8960_set_bias_level_capless(struct snd_soc_codec *codec,
626 break; 627 break;
627 628
628 case SND_SOC_BIAS_PREPARE: 629 case SND_SOC_BIAS_PREPARE:
629 switch (codec->bias_level) { 630 switch (codec->dapm.bias_level) {
630 case SND_SOC_BIAS_STANDBY: 631 case SND_SOC_BIAS_STANDBY:
631 /* Enable anti pop mode */ 632 /* Enable anti pop mode */
632 snd_soc_update_bits(codec, WM8960_APOP1, 633 snd_soc_update_bits(codec, WM8960_APOP1,
@@ -681,7 +682,7 @@ static int wm8960_set_bias_level_capless(struct snd_soc_codec *codec,
681 break; 682 break;
682 683
683 case SND_SOC_BIAS_STANDBY: 684 case SND_SOC_BIAS_STANDBY:
684 switch (codec->bias_level) { 685 switch (codec->dapm.bias_level) {
685 case SND_SOC_BIAS_PREPARE: 686 case SND_SOC_BIAS_PREPARE:
686 /* Disable HP discharge */ 687 /* Disable HP discharge */
687 snd_soc_update_bits(codec, WM8960_APOP2, 688 snd_soc_update_bits(codec, WM8960_APOP2,
@@ -705,7 +706,7 @@ static int wm8960_set_bias_level_capless(struct snd_soc_codec *codec,
705 break; 706 break;
706 } 707 }
707 708
708 codec->bias_level = level; 709 codec->dapm.bias_level = level;
709 710
710 return 0; 711 return 0;
711} 712}