diff options
| author | Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> | 2026-01-09 02:54:15 +0300 |
|---|---|---|
| committer | Mark Brown <broonie@kernel.org> | 2026-01-12 14:20:51 +0300 |
| commit | 77157cb45c66bd652a08a360693fcced558c5ef9 (patch) | |
| tree | 1628cb3300f03553a5fffca6f1765fbdb63440a2 | |
| parent | 35bffbe49dfd3395c65d76f14d773a1225f3489f (diff) | |
| download | linux-77157cb45c66bd652a08a360693fcced558c5ef9.tar.xz | |
ASoC: codecs: rt1320-sdw: convert to snd_soc_dapm_xxx()
This patch converts below functions.
snd_soc_component_get_bias_level() -> snd_soc_dapm_get_bias_level()
snd_soc_component_get_dapm() -> snd_soc_component_to_dapm()
Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Link: https://patch.msgid.link/87344f3bko.wl-kuninori.morimoto.gx@renesas.com
Signed-off-by: Mark Brown <broonie@kernel.org>
| -rw-r--r-- | sound/soc/codecs/rt1320-sdw.c | 21 |
1 files changed, 11 insertions, 10 deletions
diff --git a/sound/soc/codecs/rt1320-sdw.c b/sound/soc/codecs/rt1320-sdw.c index 0d54ed754bd2..e37b4cb87fbe 100644 --- a/sound/soc/codecs/rt1320-sdw.c +++ b/sound/soc/codecs/rt1320-sdw.c @@ -1246,7 +1246,7 @@ static int rt1320_r0_cali_put(struct snd_kcontrol *kcontrol, { struct snd_soc_component *component = snd_kcontrol_chip(kcontrol); struct rt1320_sdw_priv *rt1320 = snd_soc_component_get_drvdata(component); - struct snd_soc_dapm_context *dapm = snd_soc_component_get_dapm(rt1320->component); + struct snd_soc_dapm_context *dapm = snd_soc_component_to_dapm(rt1320->component); int ret; if (!rt1320->hw_init) @@ -1258,7 +1258,7 @@ static int rt1320_r0_cali_put(struct snd_kcontrol *kcontrol, rt1320->cali_done = false; snd_soc_dapm_mutex_lock(dapm); - 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]) { rt1320_calibrate(rt1320); } @@ -1582,8 +1582,7 @@ struct rt1320_dspfwheader { short crc; }; - struct snd_soc_dapm_context *dapm = - snd_soc_component_get_dapm(rt1320->component); + struct snd_soc_dapm_context *dapm = snd_soc_component_to_dapm(rt1320->component); struct device *dev = &rt1320->sdw_slave->dev; unsigned int val, i, fw_offset, fw_ready; unsigned int fw_status_addr; @@ -2388,7 +2387,7 @@ static int rt1320_r0_load_mode_put(struct snd_kcontrol *kcontrol, { struct snd_soc_component *component = snd_kcontrol_chip(kcontrol); struct rt1320_sdw_priv *rt1320 = snd_soc_component_get_drvdata(component); - struct snd_soc_dapm_context *dapm = snd_soc_component_get_dapm(rt1320->component); + struct snd_soc_dapm_context *dapm = snd_soc_component_to_dapm(rt1320->component); int ret; if (!rt1320->hw_init) @@ -2403,7 +2402,7 @@ static int rt1320_r0_load_mode_put(struct snd_kcontrol *kcontrol, return ret; snd_soc_dapm_mutex_lock(dapm); - if (snd_soc_component_get_bias_level(component) == SND_SOC_BIAS_OFF) { + if (snd_soc_dapm_get_bias_level(dapm) == SND_SOC_BIAS_OFF) { rt1320->r0_l_reg = ucontrol->value.integer.value[0]; rt1320->r0_r_reg = ucontrol->value.integer.value[1]; rt1320_calc_r0(rt1320); @@ -2447,6 +2446,7 @@ static int rt1320_dspfw_load_put(struct snd_kcontrol *kcontrol, { struct snd_soc_component *component = snd_kcontrol_chip(kcontrol); struct rt1320_sdw_priv *rt1320 = snd_soc_component_get_drvdata(component); + struct snd_soc_dapm_context *dapm = snd_soc_component_to_dapm(component); int ret; if (!rt1320->hw_init) @@ -2456,7 +2456,7 @@ static int rt1320_dspfw_load_put(struct snd_kcontrol *kcontrol, if (ret < 0 && ret != -EACCES) return ret; - 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]) rt1320_dspfw_load_code(rt1320); @@ -2481,6 +2481,7 @@ static int rt1320_rae_update_put(struct snd_kcontrol *kcontrol, { struct snd_soc_component *component = snd_kcontrol_chip(kcontrol); struct rt1320_sdw_priv *rt1320 = snd_soc_component_get_drvdata(component); + struct snd_soc_dapm_context *dapm = snd_soc_component_to_dapm(component); int ret; if (!rt1320->hw_init) @@ -2490,7 +2491,7 @@ static int rt1320_rae_update_put(struct snd_kcontrol *kcontrol, if (ret < 0 && ret != -EACCES) return ret; - 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] && rt1320->fw_load_done) rt1320_rae_load(rt1320); @@ -2516,7 +2517,7 @@ static int rt1320_r0_temperature_put(struct snd_kcontrol *kcontrol, { struct snd_soc_component *component = snd_kcontrol_chip(kcontrol); struct rt1320_sdw_priv *rt1320 = snd_soc_component_get_drvdata(component); - struct snd_soc_dapm_context *dapm = snd_soc_component_get_dapm(rt1320->component); + struct snd_soc_dapm_context *dapm = snd_soc_component_to_dapm(rt1320->component); int ret; if (!rt1320->hw_init) @@ -2527,7 +2528,7 @@ static int rt1320_r0_temperature_put(struct snd_kcontrol *kcontrol, return ret; snd_soc_dapm_mutex_lock(dapm); - 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] && ucontrol->value.integer.value[1]) rt1320_t0_load(rt1320, ucontrol->value.integer.value[0], ucontrol->value.integer.value[1]); snd_soc_dapm_mutex_unlock(dapm); |
