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

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

authored by

Kuninori Morimoto and committed by
Mark Brown
9b5a1d32 a3fc90c5

+8 -4
+8 -4
sound/soc/ti/n810.c
··· 85 85 { 86 86 struct snd_pcm_runtime *runtime = substream->runtime; 87 87 struct snd_soc_pcm_runtime *rtd = snd_soc_substream_to_rtd(substream); 88 + struct snd_soc_dapm_context *dapm = snd_soc_card_to_dapm(rtd->card); 88 89 89 90 snd_pcm_hw_constraint_single(runtime, SNDRV_PCM_HW_PARAM_CHANNELS, 2); 90 91 91 - n810_ext_control(&rtd->card->dapm); 92 + n810_ext_control(dapm); 92 93 return clk_prepare_enable(sys_clkout2); 93 94 } 94 95 ··· 130 129 struct snd_ctl_elem_value *ucontrol) 131 130 { 132 131 struct snd_soc_card *card = snd_kcontrol_chip(kcontrol); 132 + struct snd_soc_dapm_context *dapm = snd_soc_card_to_dapm(card); 133 133 134 134 if (n810_spk_func == ucontrol->value.enumerated.item[0]) 135 135 return 0; 136 136 137 137 n810_spk_func = ucontrol->value.enumerated.item[0]; 138 - n810_ext_control(&card->dapm); 138 + n810_ext_control(dapm); 139 139 140 140 return 1; 141 141 } ··· 153 151 struct snd_ctl_elem_value *ucontrol) 154 152 { 155 153 struct snd_soc_card *card = snd_kcontrol_chip(kcontrol); 154 + struct snd_soc_dapm_context *dapm = snd_soc_card_to_dapm(card); 156 155 157 156 if (n810_jack_func == ucontrol->value.enumerated.item[0]) 158 157 return 0; 159 158 160 159 n810_jack_func = ucontrol->value.enumerated.item[0]; 161 - n810_ext_control(&card->dapm); 160 + n810_ext_control(dapm); 162 161 163 162 return 1; 164 163 } ··· 176 173 struct snd_ctl_elem_value *ucontrol) 177 174 { 178 175 struct snd_soc_card *card = snd_kcontrol_chip(kcontrol); 176 + struct snd_soc_dapm_context *dapm = snd_soc_card_to_dapm(card); 179 177 180 178 if (n810_dmic_func == ucontrol->value.enumerated.item[0]) 181 179 return 0; 182 180 183 181 n810_dmic_func = ucontrol->value.enumerated.item[0]; 184 - n810_ext_control(&card->dapm); 182 + n810_ext_control(dapm); 185 183 186 184 return 1; 187 185 }