diff options
author | Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> | 2018-02-13 02:03:12 +0000 |
---|---|---|
committer | Mark Brown <broonie@kernel.org> | 2018-02-14 10:44:19 +0000 |
commit | 0fe1daa6663ae9437c7168b81fe23c9ed50f55df (patch) | |
tree | f31a7178b5fd5cf2b0157ae67cd70bc0690bd677 /sound/soc/codecs/wm_adsp.c | |
parent | 03a0ddeda7ebafea8e99078581a50d856e3587a4 (diff) |
ASoC: arizona: replace codec to component
Now we can replace Codec to Component. Let's do it.
Because there are many drivers which are using arizona,
we need to update these all related drivers in same time.
Otherwise compile error/warning happen
Note:
cs47l24
xxx_codec_xxx() -> xxx_component_xxx()
.idle_bias_off = 1 -> .idle_bias_on = 0
.ignore_pmdown_time = 0 -> .use_pmdown_time = 1
- -> .endianness = 1
- -> .non_legacy_dai_naming = 1
wm5102
xxx_codec_xxx() -> xxx_component_xxx()
.idle_bias_off = 1 -> .idle_bias_on = 0
.ignore_pmdown_time = 0 -> .use_pmdown_time = 1
- -> .endianness = 1
- -> .non_legacy_dai_naming = 1
wm5110
xxx_codec_xxx() -> xxx_component_xxx()
.idle_bias_off = 1 -> .idle_bias_on = 0
.ignore_pmdown_time = 0 -> .use_pmdown_time = 1
- -> .endianness = 1
- -> .non_legacy_dai_naming = 1
wm8997
xxx_codec_xxx() -> xxx_component_xxx()
.idle_bias_off = 1 -> .idle_bias_on = 0
.ignore_pmdown_time = 0 -> .use_pmdown_time = 1
- -> .endianness = 1
- -> .non_legacy_dai_naming = 1
wm8998
xxx_codec_xxx() -> xxx_component_xxx()
.idle_bias_off = 1 -> .idle_bias_on = 0
.ignore_pmdown_time = 0 -> .use_pmdown_time = 1
- -> .endianness = 1
- -> .non_legacy_dai_naming = 1
Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Tested-by: Charles Keepax <ckeepax@opensource.cirrus.com>
Acked-by: Charles Keepax <ckeepax@opensource.cirrus.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'sound/soc/codecs/wm_adsp.c')
-rw-r--r-- | sound/soc/codecs/wm_adsp.c | 58 |
1 files changed, 29 insertions, 29 deletions
diff --git a/sound/soc/codecs/wm_adsp.c b/sound/soc/codecs/wm_adsp.c index 66e32f5d2917..4847e947410b 100644 --- a/sound/soc/codecs/wm_adsp.c +++ b/sound/soc/codecs/wm_adsp.c @@ -605,13 +605,13 @@ static const struct { }; static void wm_adsp2_init_debugfs(struct wm_adsp *dsp, - struct snd_soc_codec *codec) + struct snd_soc_component *component) { struct dentry *root = NULL; char *root_name; int i; - if (!codec->component.debugfs_root) { + if (!component->debugfs_root) { adsp_err(dsp, "No codec debugfs root\n"); goto err; } @@ -621,7 +621,7 @@ static void wm_adsp2_init_debugfs(struct wm_adsp *dsp, goto err; snprintf(root_name, PAGE_SIZE, "dsp%d", dsp->num); - root = debugfs_create_dir(root_name, codec->component.debugfs_root); + root = debugfs_create_dir(root_name, component->debugfs_root); kfree(root_name); if (!root) @@ -662,7 +662,7 @@ static void wm_adsp2_cleanup_debugfs(struct wm_adsp *dsp) } #else static inline void wm_adsp2_init_debugfs(struct wm_adsp *dsp, - struct snd_soc_codec *codec) + struct snd_soc_component *component) { } @@ -688,9 +688,9 @@ static inline void wm_adsp_debugfs_clear(struct wm_adsp *dsp) static int wm_adsp_fw_get(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol) { - struct snd_soc_codec *codec = snd_soc_kcontrol_codec(kcontrol); + struct snd_soc_component *component = snd_soc_kcontrol_component(kcontrol); struct soc_enum *e = (struct soc_enum *)kcontrol->private_value; - struct wm_adsp *dsp = snd_soc_codec_get_drvdata(codec); + struct wm_adsp *dsp = snd_soc_component_get_drvdata(component); ucontrol->value.enumerated.item[0] = dsp[e->shift_l].fw; @@ -700,9 +700,9 @@ static int wm_adsp_fw_get(struct snd_kcontrol *kcontrol, static int wm_adsp_fw_put(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol) { - struct snd_soc_codec *codec = snd_soc_kcontrol_codec(kcontrol); + struct snd_soc_component *component = snd_soc_kcontrol_component(kcontrol); struct soc_enum *e = (struct soc_enum *)kcontrol->private_value; - struct wm_adsp *dsp = snd_soc_codec_get_drvdata(codec); + struct wm_adsp *dsp = snd_soc_component_get_drvdata(component); int ret = 0; if (ucontrol->value.enumerated.item[0] == dsp[e->shift_l].fw) @@ -1213,7 +1213,7 @@ static int wmfw_add_ctl(struct wm_adsp *dsp, struct wm_coeff_ctl *ctl) break; } - ret = snd_soc_add_codec_controls(dsp->codec, kcontrol, 1); + ret = snd_soc_add_component_controls(dsp->component, kcontrol, 1); if (ret < 0) goto err_kcontrol; @@ -2396,14 +2396,14 @@ int wm_adsp1_event(struct snd_soc_dapm_widget *w, struct snd_kcontrol *kcontrol, int event) { - struct snd_soc_codec *codec = snd_soc_dapm_to_codec(w->dapm); - struct wm_adsp *dsps = snd_soc_codec_get_drvdata(codec); + struct snd_soc_component *component = snd_soc_dapm_to_component(w->dapm); + struct wm_adsp *dsps = snd_soc_component_get_drvdata(component); struct wm_adsp *dsp = &dsps[w->shift]; struct wm_coeff_ctl *ctl; int ret; unsigned int val; - dsp->codec = codec; + dsp->component = component; mutex_lock(&dsp->pwr_lock); @@ -2633,8 +2633,8 @@ static void wm_adsp2_set_dspclk(struct wm_adsp *dsp, unsigned int freq) int wm_adsp2_preloader_get(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol) { - struct snd_soc_codec *codec = snd_soc_kcontrol_codec(kcontrol); - struct wm_adsp *dsp = snd_soc_codec_get_drvdata(codec); + struct snd_soc_component *component = snd_soc_kcontrol_component(kcontrol); + struct wm_adsp *dsp = snd_soc_component_get_drvdata(component); ucontrol->value.integer.value[0] = dsp->preloaded; @@ -2645,9 +2645,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_codec *codec = snd_soc_kcontrol_codec(kcontrol); - struct wm_adsp *dsp = snd_soc_codec_get_drvdata(codec); - struct snd_soc_dapm_context *dapm = snd_soc_codec_get_dapm(codec); + struct snd_soc_component *component = snd_soc_kcontrol_component(kcontrol); + struct wm_adsp *dsp = snd_soc_component_get_drvdata(component); + struct snd_soc_dapm_context *dapm = snd_soc_component_get_dapm(component); struct soc_mixer_control *mc = (struct soc_mixer_control *)kcontrol->private_value; char preload[32]; @@ -2683,8 +2683,8 @@ int wm_adsp2_early_event(struct snd_soc_dapm_widget *w, struct snd_kcontrol *kcontrol, int event, unsigned int freq) { - struct snd_soc_codec *codec = snd_soc_dapm_to_codec(w->dapm); - struct wm_adsp *dsps = snd_soc_codec_get_drvdata(codec); + struct snd_soc_component *component = snd_soc_dapm_to_component(w->dapm); + struct wm_adsp *dsps = snd_soc_component_get_drvdata(component); struct wm_adsp *dsp = &dsps[w->shift]; struct wm_coeff_ctl *ctl; @@ -2726,8 +2726,8 @@ EXPORT_SYMBOL_GPL(wm_adsp2_early_event); int wm_adsp2_event(struct snd_soc_dapm_widget *w, struct snd_kcontrol *kcontrol, int event) { - struct snd_soc_codec *codec = snd_soc_dapm_to_codec(w->dapm); - struct wm_adsp *dsps = snd_soc_codec_get_drvdata(codec); + struct snd_soc_component *component = snd_soc_dapm_to_component(w->dapm); + struct wm_adsp *dsps = snd_soc_component_get_drvdata(component); struct wm_adsp *dsp = &dsps[w->shift]; int ret; @@ -2841,31 +2841,31 @@ err: } EXPORT_SYMBOL_GPL(wm_adsp2_event); -int wm_adsp2_codec_probe(struct wm_adsp *dsp, struct snd_soc_codec *codec) +int wm_adsp2_component_probe(struct wm_adsp *dsp, struct snd_soc_component *component) { - struct snd_soc_dapm_context *dapm = snd_soc_codec_get_dapm(codec); + struct snd_soc_dapm_context *dapm = snd_soc_component_get_dapm(component); char preload[32]; snprintf(preload, ARRAY_SIZE(preload), "DSP%d Preload", dsp->num); snd_soc_dapm_disable_pin(dapm, preload); - wm_adsp2_init_debugfs(dsp, codec); + wm_adsp2_init_debugfs(dsp, component); - dsp->codec = codec; + dsp->component = component; - return snd_soc_add_codec_controls(codec, + return snd_soc_add_component_controls(component, &wm_adsp_fw_controls[dsp->num - 1], 1); } -EXPORT_SYMBOL_GPL(wm_adsp2_codec_probe); +EXPORT_SYMBOL_GPL(wm_adsp2_component_probe); -int wm_adsp2_codec_remove(struct wm_adsp *dsp, struct snd_soc_codec *codec) +int wm_adsp2_component_remove(struct wm_adsp *dsp, struct snd_soc_component *component) { wm_adsp2_cleanup_debugfs(dsp); return 0; } -EXPORT_SYMBOL_GPL(wm_adsp2_codec_remove); +EXPORT_SYMBOL_GPL(wm_adsp2_component_remove); int wm_adsp2_init(struct wm_adsp *dsp) { |