diff options
Diffstat (limited to 'sound/soc/codecs/wm8904.c')
-rw-r--r-- | sound/soc/codecs/wm8904.c | 36 |
1 files changed, 18 insertions, 18 deletions
diff --git a/sound/soc/codecs/wm8904.c b/sound/soc/codecs/wm8904.c index 1ec12eff0620..9de44a4c05c0 100644 --- a/sound/soc/codecs/wm8904.c +++ b/sound/soc/codecs/wm8904.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 | #include <sound/tlv.h> | 28 | #include <sound/tlv.h> |
30 | #include <sound/wm8904.h> | 29 | #include <sound/wm8904.h> |
@@ -1427,10 +1426,11 @@ static const struct snd_soc_dapm_route wm8912_intercon[] = { | |||
1427 | static int wm8904_add_widgets(struct snd_soc_codec *codec) | 1426 | static int wm8904_add_widgets(struct snd_soc_codec *codec) |
1428 | { | 1427 | { |
1429 | struct wm8904_priv *wm8904 = snd_soc_codec_get_drvdata(codec); | 1428 | struct wm8904_priv *wm8904 = snd_soc_codec_get_drvdata(codec); |
1429 | struct snd_soc_dapm_context *dapm = &codec->dapm; | ||
1430 | 1430 | ||
1431 | snd_soc_dapm_new_controls(codec, wm8904_core_dapm_widgets, | 1431 | snd_soc_dapm_new_controls(dapm, wm8904_core_dapm_widgets, |
1432 | ARRAY_SIZE(wm8904_core_dapm_widgets)); | 1432 | ARRAY_SIZE(wm8904_core_dapm_widgets)); |
1433 | snd_soc_dapm_add_routes(codec, core_intercon, | 1433 | snd_soc_dapm_add_routes(dapm, core_intercon, |
1434 | ARRAY_SIZE(core_intercon)); | 1434 | ARRAY_SIZE(core_intercon)); |
1435 | 1435 | ||
1436 | switch (wm8904->devtype) { | 1436 | switch (wm8904->devtype) { |
@@ -1442,20 +1442,20 @@ static int wm8904_add_widgets(struct snd_soc_codec *codec) | |||
1442 | snd_soc_add_controls(codec, wm8904_snd_controls, | 1442 | snd_soc_add_controls(codec, wm8904_snd_controls, |
1443 | ARRAY_SIZE(wm8904_snd_controls)); | 1443 | ARRAY_SIZE(wm8904_snd_controls)); |
1444 | 1444 | ||
1445 | snd_soc_dapm_new_controls(codec, wm8904_adc_dapm_widgets, | 1445 | snd_soc_dapm_new_controls(dapm, wm8904_adc_dapm_widgets, |
1446 | ARRAY_SIZE(wm8904_adc_dapm_widgets)); | 1446 | ARRAY_SIZE(wm8904_adc_dapm_widgets)); |
1447 | snd_soc_dapm_new_controls(codec, wm8904_dac_dapm_widgets, | 1447 | snd_soc_dapm_new_controls(dapm, wm8904_dac_dapm_widgets, |
1448 | ARRAY_SIZE(wm8904_dac_dapm_widgets)); | 1448 | ARRAY_SIZE(wm8904_dac_dapm_widgets)); |
1449 | snd_soc_dapm_new_controls(codec, wm8904_dapm_widgets, | 1449 | snd_soc_dapm_new_controls(dapm, wm8904_dapm_widgets, |
1450 | ARRAY_SIZE(wm8904_dapm_widgets)); | 1450 | ARRAY_SIZE(wm8904_dapm_widgets)); |
1451 | 1451 | ||
1452 | snd_soc_dapm_add_routes(codec, core_intercon, | 1452 | snd_soc_dapm_add_routes(dapm, core_intercon, |
1453 | ARRAY_SIZE(core_intercon)); | 1453 | ARRAY_SIZE(core_intercon)); |
1454 | snd_soc_dapm_add_routes(codec, adc_intercon, | 1454 | snd_soc_dapm_add_routes(dapm, adc_intercon, |
1455 | ARRAY_SIZE(adc_intercon)); | 1455 | ARRAY_SIZE(adc_intercon)); |
1456 | snd_soc_dapm_add_routes(codec, dac_intercon, | 1456 | snd_soc_dapm_add_routes(dapm, dac_intercon, |
1457 | ARRAY_SIZE(dac_intercon)); | 1457 | ARRAY_SIZE(dac_intercon)); |
1458 | snd_soc_dapm_add_routes(codec, wm8904_intercon, | 1458 | snd_soc_dapm_add_routes(dapm, wm8904_intercon, |
1459 | ARRAY_SIZE(wm8904_intercon)); | 1459 | ARRAY_SIZE(wm8904_intercon)); |
1460 | break; | 1460 | break; |
1461 | 1461 | ||
@@ -1463,17 +1463,17 @@ static int wm8904_add_widgets(struct snd_soc_codec *codec) | |||
1463 | snd_soc_add_controls(codec, wm8904_dac_snd_controls, | 1463 | snd_soc_add_controls(codec, wm8904_dac_snd_controls, |
1464 | ARRAY_SIZE(wm8904_dac_snd_controls)); | 1464 | ARRAY_SIZE(wm8904_dac_snd_controls)); |
1465 | 1465 | ||
1466 | snd_soc_dapm_new_controls(codec, wm8904_dac_dapm_widgets, | 1466 | snd_soc_dapm_new_controls(dapm, wm8904_dac_dapm_widgets, |
1467 | ARRAY_SIZE(wm8904_dac_dapm_widgets)); | 1467 | ARRAY_SIZE(wm8904_dac_dapm_widgets)); |
1468 | 1468 | ||
1469 | snd_soc_dapm_add_routes(codec, dac_intercon, | 1469 | snd_soc_dapm_add_routes(dapm, dac_intercon, |
1470 | ARRAY_SIZE(dac_intercon)); | 1470 | ARRAY_SIZE(dac_intercon)); |
1471 | snd_soc_dapm_add_routes(codec, wm8912_intercon, | 1471 | snd_soc_dapm_add_routes(dapm, wm8912_intercon, |
1472 | ARRAY_SIZE(wm8912_intercon)); | 1472 | ARRAY_SIZE(wm8912_intercon)); |
1473 | break; | 1473 | break; |
1474 | } | 1474 | } |
1475 | 1475 | ||
1476 | snd_soc_dapm_new_widgets(codec); | 1476 | snd_soc_dapm_new_widgets(dapm); |
1477 | return 0; | 1477 | return 0; |
1478 | } | 1478 | } |
1479 | 1479 | ||
@@ -1589,7 +1589,7 @@ static int wm8904_hw_params(struct snd_pcm_substream *substream, | |||
1589 | - wm8904->fs); | 1589 | - wm8904->fs); |
1590 | for (i = 1; i < ARRAY_SIZE(clk_sys_rates); i++) { | 1590 | for (i = 1; i < ARRAY_SIZE(clk_sys_rates); i++) { |
1591 | cur_val = abs((wm8904->sysclk_rate / | 1591 | cur_val = abs((wm8904->sysclk_rate / |
1592 | clk_sys_rates[i].ratio) - wm8904->fs);; | 1592 | clk_sys_rates[i].ratio) - wm8904->fs); |
1593 | if (cur_val < best_val) { | 1593 | if (cur_val < best_val) { |
1594 | best = i; | 1594 | best = i; |
1595 | best_val = cur_val; | 1595 | best_val = cur_val; |
@@ -2138,7 +2138,7 @@ static int wm8904_set_bias_level(struct snd_soc_codec *codec, | |||
2138 | break; | 2138 | break; |
2139 | 2139 | ||
2140 | case SND_SOC_BIAS_STANDBY: | 2140 | case SND_SOC_BIAS_STANDBY: |
2141 | if (codec->bias_level == SND_SOC_BIAS_OFF) { | 2141 | if (codec->dapm.bias_level == SND_SOC_BIAS_OFF) { |
2142 | ret = regulator_bulk_enable(ARRAY_SIZE(wm8904->supplies), | 2142 | ret = regulator_bulk_enable(ARRAY_SIZE(wm8904->supplies), |
2143 | wm8904->supplies); | 2143 | wm8904->supplies); |
2144 | if (ret != 0) { | 2144 | if (ret != 0) { |
@@ -2197,7 +2197,7 @@ static int wm8904_set_bias_level(struct snd_soc_codec *codec, | |||
2197 | wm8904->supplies); | 2197 | wm8904->supplies); |
2198 | break; | 2198 | break; |
2199 | } | 2199 | } |
2200 | codec->bias_level = level; | 2200 | codec->dapm.bias_level = level; |
2201 | return 0; | 2201 | return 0; |
2202 | } | 2202 | } |
2203 | 2203 | ||
@@ -2373,7 +2373,7 @@ static int wm8904_probe(struct snd_soc_codec *codec) | |||
2373 | int ret, i; | 2373 | int ret, i; |
2374 | 2374 | ||
2375 | codec->cache_sync = 1; | 2375 | codec->cache_sync = 1; |
2376 | codec->idle_bias_off = 1; | 2376 | codec->dapm.idle_bias_off = 1; |
2377 | 2377 | ||
2378 | switch (wm8904->devtype) { | 2378 | switch (wm8904->devtype) { |
2379 | case WM8904: | 2379 | case WM8904: |