diff options
Diffstat (limited to 'sound/soc/codecs/wm8904.c')
-rw-r--r-- | sound/soc/codecs/wm8904.c | 33 |
1 files changed, 17 insertions, 16 deletions
diff --git a/sound/soc/codecs/wm8904.c b/sound/soc/codecs/wm8904.c index 33be84e506ea..be90399c1cb4 100644 --- a/sound/soc/codecs/wm8904.c +++ b/sound/soc/codecs/wm8904.c | |||
@@ -1428,10 +1428,11 @@ static const struct snd_soc_dapm_route wm8912_intercon[] = { | |||
1428 | static int wm8904_add_widgets(struct snd_soc_codec *codec) | 1428 | static int wm8904_add_widgets(struct snd_soc_codec *codec) |
1429 | { | 1429 | { |
1430 | struct wm8904_priv *wm8904 = snd_soc_codec_get_drvdata(codec); | 1430 | struct wm8904_priv *wm8904 = snd_soc_codec_get_drvdata(codec); |
1431 | struct snd_soc_dapm_context *dapm = &codec->dapm; | ||
1431 | 1432 | ||
1432 | snd_soc_dapm_new_controls(codec, wm8904_core_dapm_widgets, | 1433 | snd_soc_dapm_new_controls(dapm, wm8904_core_dapm_widgets, |
1433 | ARRAY_SIZE(wm8904_core_dapm_widgets)); | 1434 | ARRAY_SIZE(wm8904_core_dapm_widgets)); |
1434 | snd_soc_dapm_add_routes(codec, core_intercon, | 1435 | snd_soc_dapm_add_routes(dapm, core_intercon, |
1435 | ARRAY_SIZE(core_intercon)); | 1436 | ARRAY_SIZE(core_intercon)); |
1436 | 1437 | ||
1437 | switch (wm8904->devtype) { | 1438 | switch (wm8904->devtype) { |
@@ -1443,20 +1444,20 @@ static int wm8904_add_widgets(struct snd_soc_codec *codec) | |||
1443 | snd_soc_add_controls(codec, wm8904_snd_controls, | 1444 | snd_soc_add_controls(codec, wm8904_snd_controls, |
1444 | ARRAY_SIZE(wm8904_snd_controls)); | 1445 | ARRAY_SIZE(wm8904_snd_controls)); |
1445 | 1446 | ||
1446 | snd_soc_dapm_new_controls(codec, wm8904_adc_dapm_widgets, | 1447 | snd_soc_dapm_new_controls(dapm, wm8904_adc_dapm_widgets, |
1447 | ARRAY_SIZE(wm8904_adc_dapm_widgets)); | 1448 | ARRAY_SIZE(wm8904_adc_dapm_widgets)); |
1448 | snd_soc_dapm_new_controls(codec, wm8904_dac_dapm_widgets, | 1449 | snd_soc_dapm_new_controls(dapm, wm8904_dac_dapm_widgets, |
1449 | ARRAY_SIZE(wm8904_dac_dapm_widgets)); | 1450 | ARRAY_SIZE(wm8904_dac_dapm_widgets)); |
1450 | snd_soc_dapm_new_controls(codec, wm8904_dapm_widgets, | 1451 | snd_soc_dapm_new_controls(dapm, wm8904_dapm_widgets, |
1451 | ARRAY_SIZE(wm8904_dapm_widgets)); | 1452 | ARRAY_SIZE(wm8904_dapm_widgets)); |
1452 | 1453 | ||
1453 | snd_soc_dapm_add_routes(codec, core_intercon, | 1454 | snd_soc_dapm_add_routes(dapm, core_intercon, |
1454 | ARRAY_SIZE(core_intercon)); | 1455 | ARRAY_SIZE(core_intercon)); |
1455 | snd_soc_dapm_add_routes(codec, adc_intercon, | 1456 | snd_soc_dapm_add_routes(dapm, adc_intercon, |
1456 | ARRAY_SIZE(adc_intercon)); | 1457 | ARRAY_SIZE(adc_intercon)); |
1457 | snd_soc_dapm_add_routes(codec, dac_intercon, | 1458 | snd_soc_dapm_add_routes(dapm, dac_intercon, |
1458 | ARRAY_SIZE(dac_intercon)); | 1459 | ARRAY_SIZE(dac_intercon)); |
1459 | snd_soc_dapm_add_routes(codec, wm8904_intercon, | 1460 | snd_soc_dapm_add_routes(dapm, wm8904_intercon, |
1460 | ARRAY_SIZE(wm8904_intercon)); | 1461 | ARRAY_SIZE(wm8904_intercon)); |
1461 | break; | 1462 | break; |
1462 | 1463 | ||
@@ -1464,17 +1465,17 @@ static int wm8904_add_widgets(struct snd_soc_codec *codec) | |||
1464 | snd_soc_add_controls(codec, wm8904_dac_snd_controls, | 1465 | snd_soc_add_controls(codec, wm8904_dac_snd_controls, |
1465 | ARRAY_SIZE(wm8904_dac_snd_controls)); | 1466 | ARRAY_SIZE(wm8904_dac_snd_controls)); |
1466 | 1467 | ||
1467 | snd_soc_dapm_new_controls(codec, wm8904_dac_dapm_widgets, | 1468 | snd_soc_dapm_new_controls(dapm, wm8904_dac_dapm_widgets, |
1468 | ARRAY_SIZE(wm8904_dac_dapm_widgets)); | 1469 | ARRAY_SIZE(wm8904_dac_dapm_widgets)); |
1469 | 1470 | ||
1470 | snd_soc_dapm_add_routes(codec, dac_intercon, | 1471 | snd_soc_dapm_add_routes(dapm, dac_intercon, |
1471 | ARRAY_SIZE(dac_intercon)); | 1472 | ARRAY_SIZE(dac_intercon)); |
1472 | snd_soc_dapm_add_routes(codec, wm8912_intercon, | 1473 | snd_soc_dapm_add_routes(dapm, wm8912_intercon, |
1473 | ARRAY_SIZE(wm8912_intercon)); | 1474 | ARRAY_SIZE(wm8912_intercon)); |
1474 | break; | 1475 | break; |
1475 | } | 1476 | } |
1476 | 1477 | ||
1477 | snd_soc_dapm_new_widgets(codec); | 1478 | snd_soc_dapm_new_widgets(dapm); |
1478 | return 0; | 1479 | return 0; |
1479 | } | 1480 | } |
1480 | 1481 | ||
@@ -2139,7 +2140,7 @@ static int wm8904_set_bias_level(struct snd_soc_codec *codec, | |||
2139 | break; | 2140 | break; |
2140 | 2141 | ||
2141 | case SND_SOC_BIAS_STANDBY: | 2142 | case SND_SOC_BIAS_STANDBY: |
2142 | if (codec->bias_level == SND_SOC_BIAS_OFF) { | 2143 | if (codec->dapm.bias_level == SND_SOC_BIAS_OFF) { |
2143 | ret = regulator_bulk_enable(ARRAY_SIZE(wm8904->supplies), | 2144 | ret = regulator_bulk_enable(ARRAY_SIZE(wm8904->supplies), |
2144 | wm8904->supplies); | 2145 | wm8904->supplies); |
2145 | if (ret != 0) { | 2146 | if (ret != 0) { |
@@ -2198,7 +2199,7 @@ static int wm8904_set_bias_level(struct snd_soc_codec *codec, | |||
2198 | wm8904->supplies); | 2199 | wm8904->supplies); |
2199 | break; | 2200 | break; |
2200 | } | 2201 | } |
2201 | codec->bias_level = level; | 2202 | codec->dapm.bias_level = level; |
2202 | return 0; | 2203 | return 0; |
2203 | } | 2204 | } |
2204 | 2205 | ||
@@ -2373,7 +2374,7 @@ static int wm8904_probe(struct snd_soc_codec *codec) | |||
2373 | int ret, i; | 2374 | int ret, i; |
2374 | 2375 | ||
2375 | codec->cache_sync = 1; | 2376 | codec->cache_sync = 1; |
2376 | codec->idle_bias_off = 1; | 2377 | codec->dapm.idle_bias_off = 1; |
2377 | 2378 | ||
2378 | switch (wm8904->devtype) { | 2379 | switch (wm8904->devtype) { |
2379 | case WM8904: | 2380 | case WM8904: |