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

index 35ec9c1b18f9187a4949bc3a541f9eefcace4850..9cad9b698cf2fb484f30991bc10ebe855e678fde 100644 (file)
@@ -556,14 +556,18 @@ static struct snd_soc_dai_driver max9867_dai[] = {
 #ifdef CONFIG_PM
 static int max9867_suspend(struct snd_soc_component *component)
 {
-       snd_soc_component_force_bias_level(component, SND_SOC_BIAS_OFF);
+       struct snd_soc_dapm_context *dapm = snd_soc_component_to_dapm(component);
+
+       snd_soc_dapm_force_bias_level(dapm, SND_SOC_BIAS_OFF);
 
        return 0;
 }
 
 static int max9867_resume(struct snd_soc_component *component)
 {
-       snd_soc_component_force_bias_level(component, SND_SOC_BIAS_STANDBY);
+       struct snd_soc_dapm_context *dapm = snd_soc_component_to_dapm(component);
+
+       snd_soc_dapm_force_bias_level(dapm, SND_SOC_BIAS_STANDBY);
 
        return 0;
 }
@@ -577,6 +581,7 @@ static int max9867_set_bias_level(struct snd_soc_component *component,
 {
        int err;
        struct max9867_priv *max9867 = snd_soc_component_get_drvdata(component);
+       struct snd_soc_dapm_context *dapm = snd_soc_component_to_dapm(component);
 
        switch (level) {
        case SND_SOC_BIAS_ON:
@@ -585,7 +590,7 @@ static int max9867_set_bias_level(struct snd_soc_component *component,
                        return err;
                break;
        case SND_SOC_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) {
                        err = regcache_sync(max9867->regmap);
                        if (err)
                                return err;