From: Kuninori Morimoto Date: Tue, 11 Nov 2025 00:36:25 +0000 (+0000) Subject: ASoC: soc-topology: convert to snd_soc_dapm_xxx() X-Git-Tag: v6.19-rc1~156^2~3^2~43^2~17 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=088fa2cc7c4c4ec80a293692456f48c43b4da0e7;p=thirdparty%2Fkernel%2Flinux.git ASoC: soc-topology: convert to snd_soc_dapm_xxx() This patch converts below functions. dapm->dev -> snd_soc_dapm_to_dev() dapm->card -> snd_soc_dapm_to_card() dapm->component -> snd_soc_dapm_to_component() dapm_kcontrol_get_value() -> snd_soc_dapm_kcontrol_get_value() snd_soc_component_enable_pin() -> snd_soc_dapm_enable_pin() snd_soc_component_enable_pin_unlocked() -> snd_soc_dapm_enable_pin_unlocked() snd_soc_component_disable_pin() -> snd_soc_dapm_disable_pin() snd_soc_component_disable_pin_unlocked() -> snd_soc_dapm_disable_pin_unlocked() snd_soc_component_nc_pin() -> snd_soc_dapm_nc_pin() snd_soc_component_nc_pin_unlocked() -> snd_soc_dapm_nc_pin_unlocked() snd_soc_component_get_pin_status() -> snd_soc_dapm_get_pin_status() snd_soc_component_force_enable_pin() -> snd_soc_dapm_force_enable_pin() snd_soc_component_force_enable_pin_unlocked() -> snd_soc_dapm_force_enable_pin_unlocked() snd_soc_component_force_bias_level() -> snd_soc_dapm_force_bias_level() snd_soc_component_get_bias_level() -> snd_soc_dapm_get_bias_level() snd_soc_component_init_bias_level() -> snd_soc_dapm_init_bias_level() snd_soc_component_get_dapm() -> snd_soc_component_to_dapm() snd_soc_dapm_kcontrol_component() -> snd_soc_dapm_kcontrol_to_component() snd_soc_dapm_kcontrol_widget() -> snd_soc_dapm_kcontrol_to_widget() snd_soc_dapm_kcontrol_dapm() -> snd_soc_dapm_kcontrol_to_dapm() snd_soc_dapm_np_pin() -> snd_soc_dapm_disable_pin() Signed-off-by: Kuninori Morimoto Reviewed-by: Charles Keepax Link: https://patch.msgid.link/87bjl9tng7.wl-kuninori.morimoto.gx@renesas.com Signed-off-by: Mark Brown --- diff --git a/sound/soc/soc-topology.c b/sound/soc/soc-topology.c index 44b60324eaa2e..064b8d76b9550 100644 --- a/sound/soc/soc-topology.c +++ b/sound/soc/soc-topology.c @@ -1026,7 +1026,7 @@ static int soc_tplg_add_route(struct soc_tplg *tplg, static int soc_tplg_dapm_graph_elems_load(struct soc_tplg *tplg, struct snd_soc_tplg_hdr *hdr) { - struct snd_soc_dapm_context *dapm = &tplg->comp->dapm; + struct snd_soc_dapm_context *dapm = snd_soc_component_to_dapm(tplg->comp); const size_t maxlen = SNDRV_CTL_ELEM_ID_NAME_MAXLEN; struct snd_soc_tplg_dapm_graph_elem *elem; struct snd_soc_dapm_route *route; @@ -1097,7 +1097,7 @@ static int soc_tplg_dapm_graph_elems_load(struct soc_tplg *tplg, static int soc_tplg_dapm_widget_create(struct soc_tplg *tplg, struct snd_soc_tplg_dapm_widget *w) { - struct snd_soc_dapm_context *dapm = &tplg->comp->dapm; + struct snd_soc_dapm_context *dapm = snd_soc_component_to_dapm(tplg->comp); struct snd_soc_dapm_widget template, *widget; struct snd_soc_tplg_ctl_hdr *control_hdr; struct snd_soc_card *card = tplg->comp->card; @@ -1245,7 +1245,8 @@ widget: return 0; ready_err: - soc_tplg_remove_widget(widget->dapm->component, &widget->dobj, SOC_TPLG_PASS_WIDGET); + soc_tplg_remove_widget(snd_soc_dapm_to_component(widget->dapm), + &widget->dobj, SOC_TPLG_PASS_WIDGET); snd_soc_dapm_free_widget(widget); hdr_err: kfree(template.sname); @@ -1367,8 +1368,7 @@ static int soc_tplg_dai_create(struct soc_tplg *tplg, struct snd_soc_pcm_stream *stream; struct snd_soc_tplg_stream_caps *caps; struct snd_soc_dai *dai; - struct snd_soc_dapm_context *dapm = - snd_soc_component_get_dapm(tplg->comp); + struct snd_soc_dapm_context *dapm = snd_soc_component_to_dapm(tplg->comp); int ret; dai_drv = devm_kzalloc(tplg->dev, sizeof(struct snd_soc_dai_driver), GFP_KERNEL);