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

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

authored by

Kuninori Morimoto and committed by
Mark Brown
21bb118e 8268a73d

+6 -3
+6 -3
sound/soc/codecs/wm8978.c
··· 853 853 static int wm8978_set_bias_level(struct snd_soc_component *component, 854 854 enum snd_soc_bias_level level) 855 855 { 856 + struct snd_soc_dapm_context *dapm = snd_soc_component_to_dapm(component); 856 857 u16 power1 = snd_soc_component_read(component, WM8978_POWER_MANAGEMENT_1) & ~3; 857 858 858 859 switch (level) { ··· 866 865 /* bit 3: enable bias, bit 2: enable I/O tie off buffer */ 867 866 power1 |= 0xc; 868 867 869 - if (snd_soc_component_get_bias_level(component) == SND_SOC_BIAS_OFF) { 868 + if (snd_soc_dapm_get_bias_level(dapm) == SND_SOC_BIAS_OFF) { 870 869 /* Initial cap charge at VMID 5k */ 871 870 snd_soc_component_write(component, WM8978_POWER_MANAGEMENT_1, 872 871 power1 | 0x3); ··· 925 924 static int wm8978_suspend(struct snd_soc_component *component) 926 925 { 927 926 struct wm8978_priv *wm8978 = snd_soc_component_get_drvdata(component); 927 + struct snd_soc_dapm_context *dapm = snd_soc_component_to_dapm(component); 928 928 929 - snd_soc_component_force_bias_level(component, SND_SOC_BIAS_OFF); 929 + snd_soc_dapm_force_bias_level(dapm, SND_SOC_BIAS_OFF); 930 930 /* Also switch PLL off */ 931 931 snd_soc_component_write(component, WM8978_POWER_MANAGEMENT_1, 0); 932 932 ··· 939 937 static int wm8978_resume(struct snd_soc_component *component) 940 938 { 941 939 struct wm8978_priv *wm8978 = snd_soc_component_get_drvdata(component); 940 + struct snd_soc_dapm_context *dapm = snd_soc_component_to_dapm(component); 942 941 943 942 /* Sync reg_cache with the hardware */ 944 943 regcache_sync(wm8978->regmap); 945 944 946 - snd_soc_component_force_bias_level(component, SND_SOC_BIAS_STANDBY); 945 + snd_soc_dapm_force_bias_level(dapm, SND_SOC_BIAS_STANDBY); 947 946 948 947 if (wm8978->f_pllout) 949 948 /* Switch PLL on */