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

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

authored by

Kuninori Morimoto and committed by
Mark Brown
453dfd1c 2049f715

+3 -2
+3 -2
sound/soc/codecs/rt5660.c
··· 1069 1069 enum snd_soc_bias_level level) 1070 1070 { 1071 1071 struct rt5660_priv *rt5660 = snd_soc_component_get_drvdata(component); 1072 + struct snd_soc_dapm_context *dapm = snd_soc_component_to_dapm(component); 1072 1073 int ret; 1073 1074 1074 1075 switch (level) { ··· 1080 1079 snd_soc_component_update_bits(component, RT5660_GEN_CTRL1, 1081 1080 RT5660_DIG_GATE_CTRL, RT5660_DIG_GATE_CTRL); 1082 1081 1083 - if (snd_soc_component_get_bias_level(component) == SND_SOC_BIAS_ON) { 1082 + if (snd_soc_dapm_get_bias_level(dapm) == SND_SOC_BIAS_ON) { 1084 1083 clk_disable_unprepare(rt5660->mclk); 1085 1084 } else { 1086 1085 ret = clk_prepare_enable(rt5660->mclk); ··· 1090 1089 break; 1091 1090 1092 1091 case SND_SOC_BIAS_STANDBY: 1093 - if (snd_soc_component_get_bias_level(component) == SND_SOC_BIAS_OFF) { 1092 + if (snd_soc_dapm_get_bias_level(dapm) == SND_SOC_BIAS_OFF) { 1094 1093 snd_soc_component_update_bits(component, RT5660_PWR_ANLG1, 1095 1094 RT5660_PWR_VREF1 | RT5660_PWR_MB | 1096 1095 RT5660_PWR_BG | RT5660_PWR_VREF2,