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

ASoC: codecs: rt5514: 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/875xbh4drl.wl-kuninori.morimoto.gx@renesas.com
Signed-off-by: Mark Brown <broonie@kernel.org>

authored by

Kuninori Morimoto and committed by
Mark Brown
ca6cd3d3 11c256c4

+5 -3
+5 -3
sound/soc/codecs/rt5514.c
··· 325 325 struct snd_ctl_elem_value *ucontrol) 326 326 { 327 327 struct snd_soc_component *component = snd_kcontrol_chip(kcontrol); 328 + struct snd_soc_dapm_context *dapm = snd_soc_component_to_dapm(component); 328 329 struct rt5514_priv *rt5514 = snd_soc_component_get_drvdata(component); 329 330 const struct firmware *fw = NULL; 330 331 u8 buf[8]; ··· 333 332 if (ucontrol->value.integer.value[0] == rt5514->dsp_enabled) 334 333 return 0; 335 334 336 - if (snd_soc_component_get_bias_level(component) == SND_SOC_BIAS_OFF) { 335 + if (snd_soc_dapm_get_bias_level(dapm) == SND_SOC_BIAS_OFF) { 337 336 rt5514->dsp_enabled = ucontrol->value.integer.value[0]; 338 337 339 338 if (rt5514->dsp_enabled) { ··· 1051 1050 enum snd_soc_bias_level level) 1052 1051 { 1053 1052 struct rt5514_priv *rt5514 = snd_soc_component_get_drvdata(component); 1053 + struct snd_soc_dapm_context *dapm = snd_soc_component_to_dapm(component); 1054 1054 int ret; 1055 1055 1056 1056 switch (level) { 1057 1057 case SND_SOC_BIAS_PREPARE: 1058 - if (snd_soc_component_get_bias_level(component) == SND_SOC_BIAS_ON) { 1058 + if (snd_soc_dapm_get_bias_level(dapm) == SND_SOC_BIAS_ON) { 1059 1059 clk_disable_unprepare(rt5514->mclk); 1060 1060 } else { 1061 1061 ret = clk_prepare_enable(rt5514->mclk); ··· 1066 1064 break; 1067 1065 1068 1066 case SND_SOC_BIAS_STANDBY: 1069 - if (snd_soc_component_get_bias_level(component) == SND_SOC_BIAS_OFF) { 1067 + if (snd_soc_dapm_get_bias_level(dapm) == SND_SOC_BIAS_OFF) { 1070 1068 /* 1071 1069 * If the DSP is enabled in start of recording, the DSP 1072 1070 * should be disabled, and sync back to normal recording