diff options
Diffstat (limited to 'sound/soc/codecs/uda1380.c')
-rw-r--r-- | sound/soc/codecs/uda1380.c | 15 |
1 files changed, 7 insertions, 8 deletions
diff --git a/sound/soc/codecs/uda1380.c b/sound/soc/codecs/uda1380.c index 0c6c725736c6..c5ca8cfea60f 100644 --- a/sound/soc/codecs/uda1380.c +++ b/sound/soc/codecs/uda1380.c | |||
@@ -27,7 +27,6 @@ | |||
27 | #include <sound/control.h> | 27 | #include <sound/control.h> |
28 | #include <sound/initval.h> | 28 | #include <sound/initval.h> |
29 | #include <sound/soc.h> | 29 | #include <sound/soc.h> |
30 | #include <sound/soc-dapm.h> | ||
31 | #include <sound/tlv.h> | 30 | #include <sound/tlv.h> |
32 | #include <sound/uda1380.h> | 31 | #include <sound/uda1380.h> |
33 | 32 | ||
@@ -36,7 +35,6 @@ | |||
36 | /* codec private data */ | 35 | /* codec private data */ |
37 | struct uda1380_priv { | 36 | struct uda1380_priv { |
38 | struct snd_soc_codec *codec; | 37 | struct snd_soc_codec *codec; |
39 | u16 reg_cache[UDA1380_CACHEREGNUM]; | ||
40 | unsigned int dac_clk; | 38 | unsigned int dac_clk; |
41 | struct work_struct work; | 39 | struct work_struct work; |
42 | void *control_data; | 40 | void *control_data; |
@@ -414,10 +412,11 @@ static const struct snd_soc_dapm_route audio_map[] = { | |||
414 | 412 | ||
415 | static int uda1380_add_widgets(struct snd_soc_codec *codec) | 413 | static int uda1380_add_widgets(struct snd_soc_codec *codec) |
416 | { | 414 | { |
417 | snd_soc_dapm_new_controls(codec, uda1380_dapm_widgets, | 415 | struct snd_soc_dapm_context *dapm = &codec->dapm; |
418 | ARRAY_SIZE(uda1380_dapm_widgets)); | ||
419 | 416 | ||
420 | snd_soc_dapm_add_routes(codec, audio_map, ARRAY_SIZE(audio_map)); | 417 | snd_soc_dapm_new_controls(dapm, uda1380_dapm_widgets, |
418 | ARRAY_SIZE(uda1380_dapm_widgets)); | ||
419 | snd_soc_dapm_add_routes(dapm, audio_map, ARRAY_SIZE(audio_map)); | ||
421 | 420 | ||
422 | return 0; | 421 | return 0; |
423 | } | 422 | } |
@@ -603,7 +602,7 @@ static int uda1380_set_bias_level(struct snd_soc_codec *codec, | |||
603 | int reg; | 602 | int reg; |
604 | struct uda1380_platform_data *pdata = codec->dev->platform_data; | 603 | struct uda1380_platform_data *pdata = codec->dev->platform_data; |
605 | 604 | ||
606 | if (codec->bias_level == level) | 605 | if (codec->dapm.bias_level == level) |
607 | return 0; | 606 | return 0; |
608 | 607 | ||
609 | switch (level) { | 608 | switch (level) { |
@@ -613,7 +612,7 @@ static int uda1380_set_bias_level(struct snd_soc_codec *codec, | |||
613 | uda1380_write(codec, UDA1380_PM, R02_PON_BIAS | pm); | 612 | uda1380_write(codec, UDA1380_PM, R02_PON_BIAS | pm); |
614 | break; | 613 | break; |
615 | case SND_SOC_BIAS_STANDBY: | 614 | case SND_SOC_BIAS_STANDBY: |
616 | if (codec->bias_level == SND_SOC_BIAS_OFF) { | 615 | if (codec->dapm.bias_level == SND_SOC_BIAS_OFF) { |
617 | if (gpio_is_valid(pdata->gpio_power)) { | 616 | if (gpio_is_valid(pdata->gpio_power)) { |
618 | gpio_set_value(pdata->gpio_power, 1); | 617 | gpio_set_value(pdata->gpio_power, 1); |
619 | mdelay(1); | 618 | mdelay(1); |
@@ -636,7 +635,7 @@ static int uda1380_set_bias_level(struct snd_soc_codec *codec, | |||
636 | for (reg = UDA1380_MVOL; reg < UDA1380_CACHEREGNUM; reg++) | 635 | for (reg = UDA1380_MVOL; reg < UDA1380_CACHEREGNUM; reg++) |
637 | set_bit(reg - 0x10, &uda1380_cache_dirty); | 636 | set_bit(reg - 0x10, &uda1380_cache_dirty); |
638 | } | 637 | } |
639 | codec->bias_level = level; | 638 | codec->dapm.bias_level = level; |
640 | return 0; | 639 | return 0; |
641 | } | 640 | } |
642 | 641 | ||