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

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

authored by

Kuninori Morimoto and committed by
Mark Brown
96b0a247 aaf1f90c

+8 -5
+8 -5
sound/soc/codecs/da7219.c
··· 1807 1807 enum snd_soc_bias_level level) 1808 1808 { 1809 1809 struct da7219_priv *da7219 = snd_soc_component_get_drvdata(component); 1810 + struct snd_soc_dapm_context *dapm = snd_soc_component_to_dapm(component); 1810 1811 int ret; 1811 1812 1812 1813 switch (level) { ··· 1815 1814 break; 1816 1815 case SND_SOC_BIAS_PREPARE: 1817 1816 /* Enable MCLK for transition to ON state */ 1818 - if (snd_soc_component_get_bias_level(component) == SND_SOC_BIAS_STANDBY) { 1817 + if (snd_soc_dapm_get_bias_level(dapm) == SND_SOC_BIAS_STANDBY) { 1819 1818 if (da7219->mclk) { 1820 1819 ret = clk_prepare_enable(da7219->mclk); 1821 1820 if (ret) { ··· 1828 1827 1829 1828 break; 1830 1829 case SND_SOC_BIAS_STANDBY: 1831 - if (snd_soc_component_get_bias_level(component) == SND_SOC_BIAS_OFF) 1830 + if (snd_soc_dapm_get_bias_level(dapm) == SND_SOC_BIAS_OFF) 1832 1831 /* Master bias */ 1833 1832 snd_soc_component_update_bits(component, DA7219_REFERENCES, 1834 1833 DA7219_BIAS_EN_MASK, 1835 1834 DA7219_BIAS_EN_MASK); 1836 1835 1837 - if (snd_soc_component_get_bias_level(component) == SND_SOC_BIAS_PREPARE) { 1836 + if (snd_soc_dapm_get_bias_level(dapm) == SND_SOC_BIAS_PREPARE) { 1838 1837 /* Remove MCLK */ 1839 1838 if (da7219->mclk) 1840 1839 clk_disable_unprepare(da7219->mclk); ··· 2614 2613 static int da7219_suspend(struct snd_soc_component *component) 2615 2614 { 2616 2615 struct da7219_priv *da7219 = snd_soc_component_get_drvdata(component); 2616 + struct snd_soc_dapm_context *dapm = snd_soc_component_to_dapm(component); 2617 2617 2618 2618 /* Suspend AAD if we're not a wake-up source */ 2619 2619 if (!da7219->wakeup_source) 2620 2620 da7219_aad_suspend(component); 2621 2621 2622 - snd_soc_component_force_bias_level(component, SND_SOC_BIAS_OFF); 2622 + snd_soc_dapm_force_bias_level(dapm, SND_SOC_BIAS_OFF); 2623 2623 2624 2624 return 0; 2625 2625 } ··· 2628 2626 static int da7219_resume(struct snd_soc_component *component) 2629 2627 { 2630 2628 struct da7219_priv *da7219 = snd_soc_component_get_drvdata(component); 2629 + struct snd_soc_dapm_context *dapm = snd_soc_component_to_dapm(component); 2631 2630 2632 - snd_soc_component_force_bias_level(component, SND_SOC_BIAS_STANDBY); 2631 + snd_soc_dapm_force_bias_level(dapm, SND_SOC_BIAS_STANDBY); 2633 2632 2634 2633 /* Resume AAD if previously suspended */ 2635 2634 if (!da7219->wakeup_source)