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

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

authored by

Kuninori Morimoto and committed by
Mark Brown
22219a4a a0593f6d

+6 -3
+6 -3
sound/soc/pxa/spitz.c
··· 105 105 static int spitz_startup(struct snd_pcm_substream *substream) 106 106 { 107 107 struct snd_soc_pcm_runtime *rtd = snd_soc_substream_to_rtd(substream); 108 + struct snd_soc_dapm_context *dapm = snd_soc_card_to_dapm(rtd->card); 108 109 109 110 /* check the jack status at stream startup */ 110 - spitz_ext_control(&rtd->card->dapm); 111 + spitz_ext_control(dapm); 111 112 112 113 return 0; 113 114 } ··· 167 166 struct snd_ctl_elem_value *ucontrol) 168 167 { 169 168 struct snd_soc_card *card = snd_kcontrol_chip(kcontrol); 169 + struct snd_soc_dapm_context *dapm = snd_soc_card_to_dapm(card); 170 170 171 171 if (spitz_jack_func == ucontrol->value.enumerated.item[0]) 172 172 return 0; 173 173 174 174 spitz_jack_func = ucontrol->value.enumerated.item[0]; 175 - spitz_ext_control(&card->dapm); 175 + spitz_ext_control(dapm); 176 176 return 1; 177 177 } 178 178 ··· 188 186 struct snd_ctl_elem_value *ucontrol) 189 187 { 190 188 struct snd_soc_card *card = snd_kcontrol_chip(kcontrol); 189 + struct snd_soc_dapm_context *dapm = snd_soc_card_to_dapm(card); 191 190 192 191 if (spitz_spk_func == ucontrol->value.enumerated.item[0]) 193 192 return 0; 194 193 195 194 spitz_spk_func = ucontrol->value.enumerated.item[0]; 196 - spitz_ext_control(&card->dapm); 195 + spitz_ext_control(dapm); 197 196 return 1; 198 197 } 199 198