diff options
Diffstat (limited to 'sound/soc/codecs/da7218.c')
| -rw-r--r-- | sound/soc/codecs/da7218.c | 21 |
1 files changed, 11 insertions, 10 deletions
diff --git a/sound/soc/codecs/da7218.c b/sound/soc/codecs/da7218.c index a7539e1a1893..5c80839704c7 100644 --- a/sound/soc/codecs/da7218.c +++ b/sound/soc/codecs/da7218.c @@ -425,7 +425,7 @@ static void da7218_alc_calib(struct snd_soc_component *component) static int da7218_mixin_gain_put(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 da7218_priv *da7218 = snd_soc_component_get_drvdata(component); int ret; @@ -446,7 +446,7 @@ static int da7218_alc_sw_put(struct snd_kcontrol *kcontrol, { struct soc_mixer_control *mc = (struct soc_mixer_control *) kcontrol->private_value; - struct snd_soc_component *component = snd_soc_kcontrol_component(kcontrol); + struct snd_soc_component *component = snd_kcontrol_chip(kcontrol); struct da7218_priv *da7218 = snd_soc_component_get_drvdata(component); unsigned int lvalue = ucontrol->value.integer.value[0]; unsigned int rvalue = ucontrol->value.integer.value[1]; @@ -469,7 +469,7 @@ static int da7218_alc_sw_put(struct snd_kcontrol *kcontrol, static int da7218_tonegen_freq_get(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 da7218_priv *da7218 = snd_soc_component_get_drvdata(component); struct soc_mixer_control *mixer_ctrl = (struct soc_mixer_control *) kcontrol->private_value; @@ -493,7 +493,7 @@ static int da7218_tonegen_freq_get(struct snd_kcontrol *kcontrol, static int da7218_tonegen_freq_put(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 da7218_priv *da7218 = snd_soc_component_get_drvdata(component); struct soc_mixer_control *mixer_ctrl = (struct soc_mixer_control *) kcontrol->private_value; @@ -513,7 +513,7 @@ static int da7218_tonegen_freq_put(struct snd_kcontrol *kcontrol, static int da7218_mic_lvl_det_sw_put(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 da7218_priv *da7218 = snd_soc_component_get_drvdata(component); struct soc_mixer_control *mixer_ctrl = (struct soc_mixer_control *) kcontrol->private_value; @@ -540,7 +540,7 @@ static int da7218_mic_lvl_det_sw_put(struct snd_kcontrol *kcontrol, static int da7218_mic_lvl_det_sw_get(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 da7218_priv *da7218 = snd_soc_component_get_drvdata(component); struct soc_mixer_control *mixer_ctrl = (struct soc_mixer_control *) kcontrol->private_value; @@ -560,7 +560,7 @@ static int da7218_mic_lvl_det_sw_get(struct snd_kcontrol *kcontrol, static int da7218_biquad_coeff_get(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 da7218_priv *da7218 = snd_soc_component_get_drvdata(component); struct soc_bytes_ext *bytes_ext = (struct soc_bytes_ext *) kcontrol->private_value; @@ -585,7 +585,7 @@ static int da7218_biquad_coeff_get(struct snd_kcontrol *kcontrol, static int da7218_biquad_coeff_put(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 da7218_priv *da7218 = snd_soc_component_get_drvdata(component); struct soc_bytes_ext *bytes_ext = (struct soc_bytes_ext *) kcontrol->private_value; @@ -2562,6 +2562,7 @@ static int da7218_set_bias_level(struct snd_soc_component *component, enum snd_soc_bias_level level) { struct da7218_priv *da7218 = snd_soc_component_get_drvdata(component); + struct snd_soc_dapm_context *dapm = snd_soc_component_to_dapm(component); int ret; switch (level) { @@ -2569,7 +2570,7 @@ static int da7218_set_bias_level(struct snd_soc_component *component, break; case SND_SOC_BIAS_PREPARE: /* Enable MCLK for transition to ON state */ - if (snd_soc_component_get_bias_level(component) == SND_SOC_BIAS_STANDBY) { + if (snd_soc_dapm_get_bias_level(dapm) == SND_SOC_BIAS_STANDBY) { if (da7218->mclk) { ret = clk_prepare_enable(da7218->mclk); if (ret) { @@ -2581,7 +2582,7 @@ static int da7218_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) { /* Master bias */ snd_soc_component_update_bits(component, DA7218_REFERENCES, DA7218_BIAS_EN_MASK, |
