]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
ASoC: codecs: cs35l56: convert to snd_soc_dapm_xxx()
authorKuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Tue, 11 Nov 2025 00:20:29 +0000 (00:20 +0000)
committerMark Brown <broonie@kernel.org>
Mon, 17 Nov 2025 00:14:49 +0000 (00:14 +0000)
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/87y0od773m.wl-kuninori.morimoto.gx@renesas.com
Signed-off-by: Mark Brown <broonie@kernel.org>
sound/soc/codecs/cs35l56.c

index 6feef971024bcc52cd7e2bcdad741f2c41a5c0cc..802658720510d5f6b6efe49be337fa3600b01a84 100644 (file)
@@ -896,10 +896,10 @@ err:
 
 static struct snd_soc_dapm_context *cs35l56_power_up_for_cal(struct cs35l56_private *cs35l56)
 {
-       struct snd_soc_dapm_context *dapm = snd_soc_component_get_dapm(cs35l56->component);
+       struct snd_soc_dapm_context *dapm = snd_soc_component_to_dapm(cs35l56->component);
        int ret;
 
-       ret = snd_soc_component_enable_pin(cs35l56->component, "Calibrate");
+       ret = snd_soc_dapm_enable_pin(dapm, "Calibrate");
        if (ret)
                return ERR_PTR(ret);
 
@@ -910,9 +910,9 @@ static struct snd_soc_dapm_context *cs35l56_power_up_for_cal(struct cs35l56_priv
 
 static void cs35l56_power_down_after_cal(struct cs35l56_private *cs35l56)
 {
-       struct snd_soc_dapm_context *dapm = snd_soc_component_get_dapm(cs35l56->component);
+       struct snd_soc_dapm_context *dapm = snd_soc_component_to_dapm(cs35l56->component);
 
-       snd_soc_component_disable_pin(cs35l56->component, "Calibrate");
+       snd_soc_dapm_disable_pin(dapm, "Calibrate");
        snd_soc_dapm_sync(dapm);
 }
 
@@ -1131,6 +1131,7 @@ static int cs35l56_set_fw_suffix(struct cs35l56_private *cs35l56)
 
 static int cs35l56_component_probe(struct snd_soc_component *component)
 {
+       struct snd_soc_dapm_context *dapm = snd_soc_component_to_dapm(component);
        struct cs35l56_private *cs35l56 = snd_soc_component_get_drvdata(component);
        struct dentry *debugfs_root = component->debugfs_root;
        unsigned short vendor, device;
@@ -1204,7 +1205,7 @@ static int cs35l56_component_probe(struct snd_soc_component *component)
        if (ret)
                return dev_err_probe(cs35l56->base.dev, ret, "unable to add controls\n");
 
-       ret = snd_soc_component_disable_pin(component, "Calibrate");
+       ret = snd_soc_dapm_disable_pin(dapm, "Calibrate");
        if (ret)
                return ret;
 
@@ -1242,6 +1243,7 @@ static int cs35l56_set_bias_level(struct snd_soc_component *component,
                                  enum snd_soc_bias_level level)
 {
        struct cs35l56_private *cs35l56 = snd_soc_component_get_drvdata(component);
+       struct snd_soc_dapm_context *dapm = snd_soc_component_to_dapm(component);
 
        switch (level) {
        case SND_SOC_BIAS_STANDBY:
@@ -1249,7 +1251,7 @@ static int cs35l56_set_bias_level(struct snd_soc_component *component,
                 * Wait for patching to complete when transitioning from
                 * BIAS_OFF to BIAS_STANDBY
                 */
-               if (snd_soc_component_get_bias_level(component) == SND_SOC_BIAS_OFF)
+               if (snd_soc_dapm_get_bias_level(dapm) == SND_SOC_BIAS_OFF)
                        cs35l56_wait_dsp_ready(cs35l56);
 
                break;