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

index 2a1d0408a4cf19acb2232a763353bb2bee1e4de1..0b4927d07f25c81d9eac9d601cad52feec21c2e4 100644 (file)
@@ -58,8 +58,8 @@ struct tse850_priv {
 static int tse850_get_mux1(struct snd_kcontrol *kctrl,
                           struct snd_ctl_elem_value *ucontrol)
 {
-       struct snd_soc_dapm_context *dapm = snd_soc_dapm_kcontrol_dapm(kctrl);
-       struct snd_soc_card *card = dapm->card;
+       struct snd_soc_dapm_context *dapm = snd_soc_dapm_kcontrol_to_dapm(kctrl);
+       struct snd_soc_card *card = snd_soc_dapm_to_card(dapm);
        struct tse850_priv *tse850 = snd_soc_card_get_drvdata(card);
 
        ucontrol->value.enumerated.item[0] = tse850->loop1_cache;
@@ -70,8 +70,8 @@ static int tse850_get_mux1(struct snd_kcontrol *kctrl,
 static int tse850_put_mux1(struct snd_kcontrol *kctrl,
                           struct snd_ctl_elem_value *ucontrol)
 {
-       struct snd_soc_dapm_context *dapm = snd_soc_dapm_kcontrol_dapm(kctrl);
-       struct snd_soc_card *card = dapm->card;
+       struct snd_soc_dapm_context *dapm = snd_soc_dapm_kcontrol_to_dapm(kctrl);
+       struct snd_soc_card *card = snd_soc_dapm_to_card(dapm);
        struct tse850_priv *tse850 = snd_soc_card_get_drvdata(card);
        struct soc_enum *e = (struct soc_enum *)kctrl->private_value;
        unsigned int val = ucontrol->value.enumerated.item[0];
@@ -88,8 +88,8 @@ static int tse850_put_mux1(struct snd_kcontrol *kctrl,
 static int tse850_get_mux2(struct snd_kcontrol *kctrl,
                           struct snd_ctl_elem_value *ucontrol)
 {
-       struct snd_soc_dapm_context *dapm = snd_soc_dapm_kcontrol_dapm(kctrl);
-       struct snd_soc_card *card = dapm->card;
+       struct snd_soc_dapm_context *dapm = snd_soc_dapm_kcontrol_to_dapm(kctrl);
+       struct snd_soc_card *card = snd_soc_dapm_to_card(dapm);
        struct tse850_priv *tse850 = snd_soc_card_get_drvdata(card);
 
        ucontrol->value.enumerated.item[0] = tse850->loop2_cache;
@@ -100,8 +100,8 @@ static int tse850_get_mux2(struct snd_kcontrol *kctrl,
 static int tse850_put_mux2(struct snd_kcontrol *kctrl,
                           struct snd_ctl_elem_value *ucontrol)
 {
-       struct snd_soc_dapm_context *dapm = snd_soc_dapm_kcontrol_dapm(kctrl);
-       struct snd_soc_card *card = dapm->card;
+       struct snd_soc_dapm_context *dapm = snd_soc_dapm_kcontrol_to_dapm(kctrl);
+       struct snd_soc_card *card = snd_soc_dapm_to_card(dapm);
        struct tse850_priv *tse850 = snd_soc_card_get_drvdata(card);
        struct soc_enum *e = (struct soc_enum *)kctrl->private_value;
        unsigned int val = ucontrol->value.enumerated.item[0];
@@ -118,8 +118,8 @@ static int tse850_put_mux2(struct snd_kcontrol *kctrl,
 static int tse850_get_mix(struct snd_kcontrol *kctrl,
                          struct snd_ctl_elem_value *ucontrol)
 {
-       struct snd_soc_dapm_context *dapm = snd_soc_dapm_kcontrol_dapm(kctrl);
-       struct snd_soc_card *card = dapm->card;
+       struct snd_soc_dapm_context *dapm = snd_soc_dapm_kcontrol_to_dapm(kctrl);
+       struct snd_soc_card *card = snd_soc_dapm_to_card(dapm);
        struct tse850_priv *tse850 = snd_soc_card_get_drvdata(card);
 
        ucontrol->value.enumerated.item[0] = tse850->add_cache;
@@ -130,8 +130,8 @@ static int tse850_get_mix(struct snd_kcontrol *kctrl,
 static int tse850_put_mix(struct snd_kcontrol *kctrl,
                          struct snd_ctl_elem_value *ucontrol)
 {
-       struct snd_soc_dapm_context *dapm = snd_soc_dapm_kcontrol_dapm(kctrl);
-       struct snd_soc_card *card = dapm->card;
+       struct snd_soc_dapm_context *dapm = snd_soc_dapm_kcontrol_to_dapm(kctrl);
+       struct snd_soc_card *card = snd_soc_dapm_to_card(dapm);
        struct tse850_priv *tse850 = snd_soc_card_get_drvdata(card);
        int connect = !!ucontrol->value.integer.value[0];
 
@@ -152,8 +152,8 @@ static int tse850_put_mix(struct snd_kcontrol *kctrl,
 static int tse850_get_ana(struct snd_kcontrol *kctrl,
                          struct snd_ctl_elem_value *ucontrol)
 {
-       struct snd_soc_dapm_context *dapm = snd_soc_dapm_kcontrol_dapm(kctrl);
-       struct snd_soc_card *card = dapm->card;
+       struct snd_soc_dapm_context *dapm = snd_soc_dapm_kcontrol_to_dapm(kctrl);
+       struct snd_soc_card *card = snd_soc_dapm_to_card(dapm);
        struct tse850_priv *tse850 = snd_soc_card_get_drvdata(card);
        int ret;
 
@@ -185,8 +185,8 @@ static int tse850_get_ana(struct snd_kcontrol *kctrl,
 static int tse850_put_ana(struct snd_kcontrol *kctrl,
                          struct snd_ctl_elem_value *ucontrol)
 {
-       struct snd_soc_dapm_context *dapm = snd_soc_dapm_kcontrol_dapm(kctrl);
-       struct snd_soc_card *card = dapm->card;
+       struct snd_soc_dapm_context *dapm = snd_soc_dapm_kcontrol_to_dapm(kctrl);
+       struct snd_soc_card *card = snd_soc_dapm_to_card(dapm);
        struct tse850_priv *tse850 = snd_soc_card_get_drvdata(card);
        struct soc_enum *e = (struct soc_enum *)kctrl->private_value;
        unsigned int uV = ucontrol->value.enumerated.item[0];