diff options
Diffstat (limited to 'sound/soc/codecs/wm8400.c')
| -rw-r--r-- | sound/soc/codecs/wm8400.c | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/sound/soc/codecs/wm8400.c b/sound/soc/codecs/wm8400.c index 5ad6d5b63ffc..0eecc8657a38 100644 --- a/sound/soc/codecs/wm8400.c +++ b/sound/soc/codecs/wm8400.c @@ -82,7 +82,7 @@ static const DECLARE_TLV_DB_SCALE(out_sidetone_tlv, -3600, 0, 0); static int wm8400_outpga_put_volsw_vu(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol) { - struct snd_soc_component *component = snd_soc_kcontrol_component(kcontrol); + struct snd_soc_component *component = snd_kcontrol_chip(kcontrol); struct soc_mixer_control *mc = (struct soc_mixer_control *)kcontrol->private_value; int reg = mc->reg; @@ -318,6 +318,7 @@ static int outmixer_event (struct snd_soc_dapm_widget *w, struct snd_soc_component *component = snd_soc_dapm_to_component(w->dapm); struct soc_mixer_control *mc = (struct soc_mixer_control *)kcontrol->private_value; + struct wm8400_priv *wm8400 = snd_soc_component_get_drvdata(component); u32 reg_shift = mc->shift; int ret = 0; u16 reg; @@ -326,7 +327,7 @@ static int outmixer_event (struct snd_soc_dapm_widget *w, case WM8400_SPEAKER_MIXER | (WM8400_LDSPK << 8) : reg = snd_soc_component_read(component, WM8400_OUTPUT_MIXER1); if (reg & WM8400_LDLO) { - printk(KERN_WARNING + dev_warn(wm8400->wm8400->dev, "Cannot set as Output Mixer 1 LDLO Set\n"); ret = -1; } @@ -334,7 +335,7 @@ static int outmixer_event (struct snd_soc_dapm_widget *w, case WM8400_SPEAKER_MIXER | (WM8400_RDSPK << 8): reg = snd_soc_component_read(component, WM8400_OUTPUT_MIXER2); if (reg & WM8400_RDRO) { - printk(KERN_WARNING + dev_warn(wm8400->wm8400->dev, "Cannot set as Output Mixer 2 RDRO Set\n"); ret = -1; } @@ -342,7 +343,7 @@ static int outmixer_event (struct snd_soc_dapm_widget *w, case WM8400_OUTPUT_MIXER1 | (WM8400_LDLO << 8): reg = snd_soc_component_read(component, WM8400_SPEAKER_MIXER); if (reg & WM8400_LDSPK) { - printk(KERN_WARNING + dev_warn(wm8400->wm8400->dev, "Cannot set as Speaker Mixer LDSPK Set\n"); ret = -1; } @@ -350,7 +351,7 @@ static int outmixer_event (struct snd_soc_dapm_widget *w, case WM8400_OUTPUT_MIXER2 | (WM8400_RDRO << 8): reg = snd_soc_component_read(component, WM8400_SPEAKER_MIXER); if (reg & WM8400_RDSPK) { - printk(KERN_WARNING + dev_warn(wm8400->wm8400->dev, "Cannot set as Speaker Mixer RDSPK Set\n"); ret = -1; } @@ -1110,6 +1111,7 @@ static int wm8400_set_bias_level(struct snd_soc_component *component, enum snd_soc_bias_level level) { struct wm8400_priv *wm8400 = snd_soc_component_get_drvdata(component); + struct snd_soc_dapm_context *dapm = snd_soc_component_to_dapm(component); u16 val; int ret; @@ -1125,7 +1127,7 @@ static int wm8400_set_bias_level(struct snd_soc_component *component, break; case SND_SOC_BIAS_STANDBY: - if (snd_soc_component_get_bias_level(component) == SND_SOC_BIAS_OFF) { + if (snd_soc_dapm_get_bias_level(dapm) == SND_SOC_BIAS_OFF) { ret = regulator_bulk_enable(ARRAY_SIZE(power), &power[0]); if (ret != 0) { |
