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

ASoC: ti: davinci-evm: 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/87wm3xs8ur.wl-kuninori.morimoto.gx@renesas.com
Signed-off-by: Mark Brown <broonie@kernel.org>

authored by

Kuninori Morimoto and committed by
Mark Brown
9188f03a cf3c9aa0

+6 -5
+6 -5
sound/soc/ti/davinci-evm.c
··· 113 113 static int evm_aic3x_init(struct snd_soc_pcm_runtime *rtd) 114 114 { 115 115 struct snd_soc_card *card = rtd->card; 116 + struct snd_soc_dapm_context *dapm = snd_soc_card_to_dapm(rtd->card); 116 117 struct device_node *np = card->dev->of_node; 117 118 int ret; 118 119 119 120 /* Add davinci-evm specific widgets */ 120 - snd_soc_dapm_new_controls(&card->dapm, aic3x_dapm_widgets, 121 + snd_soc_dapm_new_controls(dapm, aic3x_dapm_widgets, 121 122 ARRAY_SIZE(aic3x_dapm_widgets)); 122 123 123 124 if (np) { ··· 127 126 return ret; 128 127 } else { 129 128 /* Set up davinci-evm specific audio path audio_map */ 130 - snd_soc_dapm_add_routes(&card->dapm, audio_map, 129 + snd_soc_dapm_add_routes(dapm, audio_map, 131 130 ARRAY_SIZE(audio_map)); 132 131 } 133 132 134 133 /* not connected */ 135 - snd_soc_dapm_nc_pin(&card->dapm, "MONO_LOUT"); 136 - snd_soc_dapm_nc_pin(&card->dapm, "HPLCOM"); 137 - snd_soc_dapm_nc_pin(&card->dapm, "HPRCOM"); 134 + snd_soc_dapm_disable_pin(dapm, "MONO_LOUT"); 135 + snd_soc_dapm_disable_pin(dapm, "HPLCOM"); 136 + snd_soc_dapm_disable_pin(dapm, "HPRCOM"); 138 137 139 138 return 0; 140 139 }