diff options
| author | Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> | 2025-11-11 00:24:29 +0000 |
|---|---|---|
| committer | Mark Brown <broonie@kernel.org> | 2025-11-17 00:15:49 +0000 |
| commit | 5b35bb517f27fc2401ec3cfd8c02a127627a0188 (patch) | |
| tree | 37f45954bd10ced5e05093412c2681087d69c5b2 /sound/soc/codecs/rt1011.c | |
| parent | 2d8a091725e6f71c87a7ae35e51550693afdef77 (diff) | |
| download | linux-next-5b35bb517f27fc2401ec3cfd8c02a127627a0188.tar.gz linux-next-5b35bb517f27fc2401ec3cfd8c02a127627a0188.zip | |
ASoC: codecs: rt1011: 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/87cy5p4ds2.wl-kuninori.morimoto.gx@renesas.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'sound/soc/codecs/rt1011.c')
| -rw-r--r-- | sound/soc/codecs/rt1011.c | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/sound/soc/codecs/rt1011.c b/sound/soc/codecs/rt1011.c index 170e257e6dde..9f34a6a35487 100644 --- a/sound/soc/codecs/rt1011.c +++ b/sound/soc/codecs/rt1011.c @@ -1047,13 +1047,14 @@ static int rt1011_recv_spk_mode_put(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol) { struct snd_soc_component *component = snd_kcontrol_chip(kcontrol); + struct snd_soc_dapm_context *dapm = snd_soc_dapm_kcontrol_to_dapm(kcontrol); struct rt1011_priv *rt1011 = snd_soc_component_get_drvdata(component); if (ucontrol->value.integer.value[0] == rt1011->recv_spk_mode) return 0; - if (snd_soc_component_get_bias_level(component) == SND_SOC_BIAS_OFF) { + if (snd_soc_dapm_get_bias_level(dapm) == SND_SOC_BIAS_OFF) { rt1011->recv_spk_mode = ucontrol->value.integer.value[0]; if (rt1011->recv_spk_mode) { @@ -1220,10 +1221,11 @@ static int rt1011_r0_cali_put(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol) { struct snd_soc_component *component = snd_kcontrol_chip(kcontrol); + struct snd_soc_dapm_context *dapm = snd_soc_component_to_dapm(component); struct rt1011_priv *rt1011 = snd_soc_component_get_drvdata(component); rt1011->cali_done = 0; - if (snd_soc_component_get_bias_level(component) == SND_SOC_BIAS_OFF && + if (snd_soc_dapm_get_bias_level(dapm) == SND_SOC_BIAS_OFF && ucontrol->value.integer.value[0]) rt1011_calibrate(rt1011, 1); @@ -1260,6 +1262,7 @@ static int rt1011_r0_load_mode_put(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol) { struct snd_soc_component *component = snd_kcontrol_chip(kcontrol); + struct snd_soc_dapm_context *dapm = snd_soc_component_to_dapm(component); struct rt1011_priv *rt1011 = snd_soc_component_get_drvdata(component); struct device *dev; unsigned int r0_integer, r0_factor, format; @@ -1271,7 +1274,7 @@ static int rt1011_r0_load_mode_put(struct snd_kcontrol *kcontrol, return -EINVAL; dev = regmap_get_device(rt1011->regmap); - if (snd_soc_component_get_bias_level(component) == SND_SOC_BIAS_OFF) { + if (snd_soc_dapm_get_bias_level(dapm) == SND_SOC_BIAS_OFF) { rt1011->r0_reg = ucontrol->value.integer.value[0]; format = 2147483648U; /* 2^24 * 128 */ @@ -1658,8 +1661,7 @@ static int rt1011_hw_params(struct snd_pcm_substream *substream, static int rt1011_set_dai_fmt(struct snd_soc_dai *dai, unsigned int fmt) { struct snd_soc_component *component = dai->component; - struct snd_soc_dapm_context *dapm = - snd_soc_component_get_dapm(component); + struct snd_soc_dapm_context *dapm = snd_soc_component_to_dapm(component); unsigned int reg_val = 0, reg_bclk_inv = 0; int ret = 0; @@ -1839,8 +1841,7 @@ static int rt1011_set_tdm_slot(struct snd_soc_dai *dai, unsigned int tx_mask, unsigned int rx_mask, int slots, int slot_width) { struct snd_soc_component *component = dai->component; - struct snd_soc_dapm_context *dapm = - snd_soc_component_get_dapm(component); + struct snd_soc_dapm_context *dapm = snd_soc_component_to_dapm(component); unsigned int val = 0, tdm_en = 0, rx_slotnum, tx_slotnum; int ret = 0, first_bit, last_bit; @@ -2212,8 +2213,7 @@ static int rt1011_calibrate(struct rt1011_priv *rt1011, unsigned char cali_flag) unsigned int dc_offset; unsigned int r0_integer, r0_factor, format; struct device *dev = regmap_get_device(rt1011->regmap); - struct snd_soc_dapm_context *dapm = - snd_soc_component_get_dapm(rt1011->component); + struct snd_soc_dapm_context *dapm = snd_soc_component_to_dapm(rt1011->component); int ret = 0; snd_soc_dapm_mutex_lock(dapm); |
