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

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

authored by

Kuninori Morimoto and committed by
Mark Brown
cf618412 0da5d1fb

+6 -5
+6 -5
sound/soc/codecs/tlv320aic3x.c
··· 163 163 static int snd_soc_dapm_put_volsw_aic3x(struct snd_kcontrol *kcontrol, 164 164 struct snd_ctl_elem_value *ucontrol) 165 165 { 166 - struct snd_soc_component *component = snd_soc_dapm_kcontrol_component(kcontrol); 167 - struct snd_soc_dapm_context *dapm = snd_soc_component_get_dapm(component); 166 + struct snd_soc_component *component = snd_soc_dapm_kcontrol_to_component(kcontrol); 167 + struct snd_soc_dapm_context *dapm = snd_soc_component_to_dapm(component); 168 168 struct soc_mixer_control *mc = 169 169 (struct soc_mixer_control *)kcontrol->private_value; 170 170 unsigned int reg = mc->reg; ··· 1009 1009 static int aic3x_add_widgets(struct snd_soc_component *component) 1010 1010 { 1011 1011 struct aic3x_priv *aic3x = snd_soc_component_get_drvdata(component); 1012 - struct snd_soc_dapm_context *dapm = snd_soc_component_get_dapm(component); 1012 + struct snd_soc_dapm_context *dapm = snd_soc_component_to_dapm(component); 1013 1013 1014 1014 switch (aic3x->model) { 1015 1015 case AIC3X_MODEL_3X: ··· 1449 1449 static int aic3x_set_bias_level(struct snd_soc_component *component, 1450 1450 enum snd_soc_bias_level level) 1451 1451 { 1452 + struct snd_soc_dapm_context *dapm = snd_soc_component_to_dapm(component); 1452 1453 struct aic3x_priv *aic3x = snd_soc_component_get_drvdata(component); 1453 1454 1454 1455 switch (level) { 1455 1456 case SND_SOC_BIAS_ON: 1456 1457 break; 1457 1458 case SND_SOC_BIAS_PREPARE: 1458 - if (snd_soc_component_get_bias_level(component) == SND_SOC_BIAS_STANDBY && 1459 + if (snd_soc_dapm_get_bias_level(dapm) == SND_SOC_BIAS_STANDBY && 1459 1460 aic3x->master) { 1460 1461 /* enable pll */ 1461 1462 snd_soc_component_update_bits(component, AIC3X_PLL_PROGA_REG, ··· 1466 1465 case SND_SOC_BIAS_STANDBY: 1467 1466 if (!aic3x->power) 1468 1467 aic3x_set_power(component, 1); 1469 - if (snd_soc_component_get_bias_level(component) == SND_SOC_BIAS_PREPARE && 1468 + if (snd_soc_dapm_get_bias_level(dapm) == SND_SOC_BIAS_PREPARE && 1470 1469 aic3x->master) { 1471 1470 /* disable pll */ 1472 1471 snd_soc_component_update_bits(component, AIC3X_PLL_PROGA_REG,