diff options
Diffstat (limited to 'sound/soc/codecs/wm_adsp.c')
| -rw-r--r-- | sound/soc/codecs/wm_adsp.c | 21 |
1 files changed, 11 insertions, 10 deletions
diff --git a/sound/soc/codecs/wm_adsp.c b/sound/soc/codecs/wm_adsp.c index 8782c331e925..17cec79245d4 100644 --- a/sound/soc/codecs/wm_adsp.c +++ b/sound/soc/codecs/wm_adsp.c @@ -319,7 +319,7 @@ struct wm_coeff_ctl { int wm_adsp_fw_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 soc_enum *e = (struct soc_enum *)kcontrol->private_value; struct wm_adsp *dsp = snd_soc_component_get_drvdata(component); @@ -332,7 +332,7 @@ EXPORT_SYMBOL_GPL(wm_adsp_fw_get); int wm_adsp_fw_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 soc_enum *e = (struct soc_enum *)kcontrol->private_value; struct wm_adsp *dsp = snd_soc_component_get_drvdata(component); int ret = 1; @@ -936,7 +936,7 @@ EXPORT_SYMBOL_GPL(wm_adsp2_set_dspclk); int wm_adsp2_preloader_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 wm_adsp *dsps = snd_soc_component_get_drvdata(component); struct soc_mixer_control *mc = (struct soc_mixer_control *)kcontrol->private_value; @@ -951,9 +951,9 @@ EXPORT_SYMBOL_GPL(wm_adsp2_preloader_get); int wm_adsp2_preloader_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 wm_adsp *dsps = snd_soc_component_get_drvdata(component); - struct snd_soc_dapm_context *dapm = snd_soc_component_get_dapm(component); + struct snd_soc_dapm_context *dapm = snd_soc_component_to_dapm(component); struct soc_mixer_control *mc = (struct soc_mixer_control *)kcontrol->private_value; struct wm_adsp *dsp = &dsps[mc->shift - 1]; @@ -965,9 +965,9 @@ int wm_adsp2_preloader_put(struct snd_kcontrol *kcontrol, snprintf(preload, ARRAY_SIZE(preload), "%s Preload", dsp->cs_dsp.name); if (ucontrol->value.integer.value[0] || dsp->toggle_preload) - snd_soc_component_force_enable_pin(component, preload); + snd_soc_dapm_force_enable_pin(dapm, preload); else - snd_soc_component_disable_pin(component, preload); + snd_soc_dapm_disable_pin(dapm, preload); snd_soc_dapm_sync(dapm); @@ -976,7 +976,7 @@ int wm_adsp2_preloader_put(struct snd_kcontrol *kcontrol, dsp->preloaded = ucontrol->value.integer.value[0]; if (dsp->toggle_preload) { - snd_soc_component_disable_pin(component, preload); + snd_soc_dapm_disable_pin(dapm, preload); snd_soc_dapm_sync(dapm); } @@ -1121,11 +1121,12 @@ EXPORT_SYMBOL_GPL(wm_adsp_event); int wm_adsp2_component_probe(struct wm_adsp *dsp, struct snd_soc_component *component) { + struct snd_soc_dapm_context *dapm = snd_soc_component_to_dapm(component); char preload[32]; if (!dsp->cs_dsp.no_core_startstop) { snprintf(preload, ARRAY_SIZE(preload), "%s Preload", dsp->cs_dsp.name); - snd_soc_component_disable_pin(component, preload); + snd_soc_dapm_disable_pin(dapm, preload); } cs_dsp_init_debugfs(&dsp->cs_dsp, component->debugfs_root); @@ -1560,7 +1561,7 @@ static int wm_adsp_buffer_parse_coeff(struct cs_dsp_coeff_ctl *cs_ctl) for (i = 0; i < 5; ++i) { ret = cs_dsp_coeff_read_ctrl(cs_ctl, 0, &coeff_v1, - min(cs_ctl->len, sizeof(coeff_v1))); + min((size_t)cs_ctl->len, sizeof(coeff_v1))); if (ret < 0) return ret; |
