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

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

authored by

Kuninori Morimoto and committed by
Mark Brown
6ad9058c 9bcc76f5

+7 -7
+7 -7
sound/soc/codecs/rt5677.c
··· 706 706 707 707 static unsigned int rt5677_set_vad_source(struct rt5677_priv *rt5677) 708 708 { 709 - struct snd_soc_dapm_context *dapm = 710 - snd_soc_component_get_dapm(rt5677->component); 709 + struct snd_soc_dapm_context *dapm = snd_soc_component_to_dapm(rt5677->component); 711 710 /* Force dapm to sync before we enable the 712 711 * DSP to prevent write corruption 713 712 */ ··· 2732 2733 struct snd_kcontrol *kcontrol, int event) 2733 2734 { 2734 2735 struct snd_soc_component *component = snd_soc_dapm_to_component(w->dapm); 2736 + struct snd_soc_dapm_context *dapm = snd_soc_component_to_dapm(component); 2735 2737 struct rt5677_priv *rt5677 = snd_soc_component_get_drvdata(component); 2736 2738 2737 2739 switch (event) { 2738 2740 case SND_SOC_DAPM_POST_PMU: 2739 - if (snd_soc_component_get_bias_level(component) != SND_SOC_BIAS_ON && 2741 + if (snd_soc_dapm_get_bias_level(dapm) != SND_SOC_BIAS_ON && 2740 2742 !rt5677->is_vref_slow) { 2741 2743 mdelay(20); 2742 2744 regmap_update_bits(rt5677->regmap, RT5677_PWR_ANLG1, ··· 4643 4643 enum snd_soc_bias_level level) 4644 4644 { 4645 4645 struct rt5677_priv *rt5677 = snd_soc_component_get_drvdata(component); 4646 - enum snd_soc_bias_level prev_bias = 4647 - snd_soc_component_get_bias_level(component); 4646 + struct snd_soc_dapm_context *dapm = snd_soc_component_to_dapm(component); 4647 + enum snd_soc_bias_level prev_bias = snd_soc_dapm_get_bias_level(dapm); 4648 4648 4649 4649 switch (level) { 4650 4650 case SND_SOC_BIAS_ON: ··· 4880 4880 4881 4881 static int rt5677_probe(struct snd_soc_component *component) 4882 4882 { 4883 - struct snd_soc_dapm_context *dapm = snd_soc_component_get_dapm(component); 4883 + struct snd_soc_dapm_context *dapm = snd_soc_component_to_dapm(component); 4884 4884 struct rt5677_priv *rt5677 = snd_soc_component_get_drvdata(component); 4885 4885 int i; 4886 4886 ··· 4896 4896 ARRAY_SIZE(rt5677_dmic2_clk_1)); 4897 4897 } 4898 4898 4899 - snd_soc_component_force_bias_level(component, SND_SOC_BIAS_OFF); 4899 + snd_soc_dapm_force_bias_level(dapm, SND_SOC_BIAS_OFF); 4900 4900 4901 4901 regmap_update_bits(rt5677->regmap, RT5677_DIG_MISC, 4902 4902 ~RT5677_IRQ_DEBOUNCE_SEL_MASK, 0x0020);