Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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 <kuninori.morimoto.gx@renesas.com>
Reviewed-by: Charles Keepax <ckeepax@opensource.cirrus.com>
Link: https://patch.msgid.link/87bjl9tng7.wl-kuninori.morimoto.gx@renesas.com
Signed-off-by: Mark Brown <broonie@kernel.org>

authored by

Kuninori Morimoto and committed by
Mark Brown
088fa2cc eb802ba0

+5 -5
+5 -5
sound/soc/soc-topology.c
··· 1026 1026 static int soc_tplg_dapm_graph_elems_load(struct soc_tplg *tplg, 1027 1027 struct snd_soc_tplg_hdr *hdr) 1028 1028 { 1029 - struct snd_soc_dapm_context *dapm = &tplg->comp->dapm; 1029 + struct snd_soc_dapm_context *dapm = snd_soc_component_to_dapm(tplg->comp); 1030 1030 const size_t maxlen = SNDRV_CTL_ELEM_ID_NAME_MAXLEN; 1031 1031 struct snd_soc_tplg_dapm_graph_elem *elem; 1032 1032 struct snd_soc_dapm_route *route; ··· 1097 1097 static int soc_tplg_dapm_widget_create(struct soc_tplg *tplg, 1098 1098 struct snd_soc_tplg_dapm_widget *w) 1099 1099 { 1100 - struct snd_soc_dapm_context *dapm = &tplg->comp->dapm; 1100 + struct snd_soc_dapm_context *dapm = snd_soc_component_to_dapm(tplg->comp); 1101 1101 struct snd_soc_dapm_widget template, *widget; 1102 1102 struct snd_soc_tplg_ctl_hdr *control_hdr; 1103 1103 struct snd_soc_card *card = tplg->comp->card; ··· 1245 1245 return 0; 1246 1246 1247 1247 ready_err: 1248 - soc_tplg_remove_widget(widget->dapm->component, &widget->dobj, SOC_TPLG_PASS_WIDGET); 1248 + soc_tplg_remove_widget(snd_soc_dapm_to_component(widget->dapm), 1249 + &widget->dobj, SOC_TPLG_PASS_WIDGET); 1249 1250 snd_soc_dapm_free_widget(widget); 1250 1251 hdr_err: 1251 1252 kfree(template.sname); ··· 1368 1367 struct snd_soc_pcm_stream *stream; 1369 1368 struct snd_soc_tplg_stream_caps *caps; 1370 1369 struct snd_soc_dai *dai; 1371 - struct snd_soc_dapm_context *dapm = 1372 - snd_soc_component_get_dapm(tplg->comp); 1370 + struct snd_soc_dapm_context *dapm = snd_soc_component_to_dapm(tplg->comp); 1373 1371 int ret; 1374 1372 1375 1373 dai_drv = devm_kzalloc(tplg->dev, sizeof(struct snd_soc_dai_driver), GFP_KERNEL);