diff options
Diffstat (limited to 'sound/soc/codecs/wcd9335.c')
| -rw-r--r-- | sound/soc/codecs/wcd9335.c | 34 |
1 files changed, 19 insertions, 15 deletions
diff --git a/sound/soc/codecs/wcd9335.c b/sound/soc/codecs/wcd9335.c index 1c050b8c19de..640e43ee1975 100644 --- a/sound/soc/codecs/wcd9335.c +++ b/sound/soc/codecs/wcd9335.c @@ -1260,8 +1260,9 @@ static const struct snd_kcontrol_new sb_tx8_mux = static int slim_rx_mux_get(struct snd_kcontrol *kc, struct snd_ctl_elem_value *ucontrol) { - struct snd_soc_dapm_widget *w = snd_soc_dapm_kcontrol_widget(kc); - struct wcd9335_codec *wcd = dev_get_drvdata(w->dapm->dev); + struct snd_soc_dapm_widget *w = snd_soc_dapm_kcontrol_to_widget(kc); + struct device *dev = snd_soc_dapm_to_dev(w->dapm); + struct wcd9335_codec *wcd = dev_get_drvdata(dev); u32 port_id = w->shift; ucontrol->value.enumerated.item[0] = wcd->rx_port_value[port_id]; @@ -1272,8 +1273,9 @@ static int slim_rx_mux_get(struct snd_kcontrol *kc, static int slim_rx_mux_put(struct snd_kcontrol *kc, struct snd_ctl_elem_value *ucontrol) { - struct snd_soc_dapm_widget *w = snd_soc_dapm_kcontrol_widget(kc); - struct wcd9335_codec *wcd = dev_get_drvdata(w->dapm->dev); + struct snd_soc_dapm_widget *w = snd_soc_dapm_kcontrol_to_widget(kc); + struct device *dev = snd_soc_dapm_to_dev(w->dapm); + struct wcd9335_codec *wcd = dev_get_drvdata(dev); struct soc_enum *e = (struct soc_enum *)kc->private_value; struct snd_soc_dapm_update *update = NULL; u32 port_id = w->shift; @@ -1323,9 +1325,10 @@ static int slim_tx_mixer_get(struct snd_kcontrol *kc, struct snd_ctl_elem_value *ucontrol) { - struct snd_soc_dapm_context *dapm = snd_soc_dapm_kcontrol_dapm(kc); - struct wcd9335_codec *wcd = dev_get_drvdata(dapm->dev); - struct snd_soc_dapm_widget *widget = snd_soc_dapm_kcontrol_widget(kc); + struct snd_soc_dapm_context *dapm = snd_soc_dapm_kcontrol_to_dapm(kc); + struct device *dev = snd_soc_dapm_to_dev(dapm); + struct wcd9335_codec *wcd = dev_get_drvdata(dev); + struct snd_soc_dapm_widget *widget = snd_soc_dapm_kcontrol_to_widget(kc); struct soc_mixer_control *mixer = (struct soc_mixer_control *)kc->private_value; int dai_id = widget->shift; @@ -1340,8 +1343,9 @@ static int slim_tx_mixer_put(struct snd_kcontrol *kc, struct snd_ctl_elem_value *ucontrol) { - struct snd_soc_dapm_widget *widget = snd_soc_dapm_kcontrol_widget(kc); - struct wcd9335_codec *wcd = dev_get_drvdata(widget->dapm->dev); + struct snd_soc_dapm_widget *widget = snd_soc_dapm_kcontrol_to_widget(kc); + struct device *dev = snd_soc_dapm_to_dev(widget->dapm); + struct wcd9335_codec *wcd = dev_get_drvdata(dev); struct snd_soc_dapm_update *update = NULL; struct soc_mixer_control *mixer = (struct soc_mixer_control *)kc->private_value; @@ -1474,7 +1478,7 @@ static const struct snd_kcontrol_new aif3_cap_mixer[] = { static int wcd9335_put_dec_enum(struct snd_kcontrol *kc, struct snd_ctl_elem_value *ucontrol) { - struct snd_soc_dapm_context *dapm = snd_soc_dapm_kcontrol_dapm(kc); + struct snd_soc_dapm_context *dapm = snd_soc_dapm_kcontrol_to_dapm(kc); struct snd_soc_component *component = snd_soc_dapm_to_component(dapm); struct soc_enum *e = (struct soc_enum *)kc->private_value; unsigned int val, reg, sel; @@ -1529,7 +1533,7 @@ static int wcd9335_int_dem_inp_mux_put(struct snd_kcontrol *kc, struct snd_soc_component *component; int reg, val; - component = snd_soc_dapm_kcontrol_component(kc); + component = snd_soc_dapm_kcontrol_to_component(kc); val = ucontrol->value.enumerated.item[0]; if (e->reg == WCD9335_CDC_RX0_RX_PATH_SEC0) @@ -2177,7 +2181,7 @@ static int wcd9335_get_compander(struct snd_kcontrol *kc, struct snd_ctl_elem_value *ucontrol) { - struct snd_soc_component *component = snd_soc_kcontrol_component(kc); + struct snd_soc_component *component = snd_kcontrol_chip(kc); int comp = ((struct soc_mixer_control *)kc->private_value)->shift; struct wcd9335_codec *wcd = dev_get_drvdata(component->dev); @@ -2188,7 +2192,7 @@ static int wcd9335_get_compander(struct snd_kcontrol *kc, static int wcd9335_set_compander(struct snd_kcontrol *kc, struct snd_ctl_elem_value *ucontrol) { - struct snd_soc_component *component = snd_soc_kcontrol_component(kc); + struct snd_soc_component *component = snd_kcontrol_chip(kc); struct wcd9335_codec *wcd = dev_get_drvdata(component->dev); int comp = ((struct soc_mixer_control *) kc->private_value)->shift; int value = ucontrol->value.integer.value[0]; @@ -2227,7 +2231,7 @@ static int wcd9335_set_compander(struct snd_kcontrol *kc, static int wcd9335_rx_hph_mode_get(struct snd_kcontrol *kc, struct snd_ctl_elem_value *ucontrol) { - struct snd_soc_component *component = snd_soc_kcontrol_component(kc); + struct snd_soc_component *component = snd_kcontrol_chip(kc); struct wcd9335_codec *wcd = dev_get_drvdata(component->dev); ucontrol->value.enumerated.item[0] = wcd->hph_mode; @@ -2238,7 +2242,7 @@ static int wcd9335_rx_hph_mode_get(struct snd_kcontrol *kc, static int wcd9335_rx_hph_mode_put(struct snd_kcontrol *kc, struct snd_ctl_elem_value *ucontrol) { - struct snd_soc_component *component = snd_soc_kcontrol_component(kc); + struct snd_soc_component *component = snd_kcontrol_chip(kc); struct wcd9335_codec *wcd = dev_get_drvdata(component->dev); u32 mode_val; |
