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

index 657f0697e8569c304dbe58782a8de25695957c71..086ed0f57a85e012ad0c3c7384af64c1ba1d2f75 100644 (file)
@@ -320,8 +320,8 @@ static const struct soc_enum cs48l32_sample_rate[] = {
 static int cs48l32_inmux_put(struct snd_kcontrol *kcontrol,
                             struct snd_ctl_elem_value *ucontrol)
 {
-       struct snd_soc_component *component = snd_soc_dapm_kcontrol_component(kcontrol);
-       struct snd_soc_dapm_context *dapm = snd_soc_dapm_kcontrol_dapm(kcontrol);
+       struct snd_soc_dapm_context *dapm = snd_soc_dapm_kcontrol_to_dapm(kcontrol);
+       struct snd_soc_component *component = snd_soc_dapm_to_component(dapm);
        struct cs48l32_codec *cs48l32_codec = snd_soc_component_get_drvdata(component);
        struct soc_enum *e = (struct soc_enum *) kcontrol->private_value;
        unsigned int mux, src_val, in_type;
@@ -347,7 +347,7 @@ static int cs48l32_inmux_put(struct snd_kcontrol *kcontrol,
        if (in_type == CS48L32_IN_TYPE_SE)
                src_val |= 1 << CS48L32_INx_SRC_SHIFT;
 
-       ret = snd_soc_component_update_bits(dapm->component,
+       ret = snd_soc_component_update_bits(component,
                                            e->reg,
                                            CS48L32_INx_SRC_MASK,
                                            src_val);
@@ -385,7 +385,7 @@ static const char * const cs48l32_dmode_texts[] = {
 static int cs48l32_dmode_put(struct snd_kcontrol *kcontrol,
                             struct snd_ctl_elem_value *ucontrol)
 {
-       struct snd_soc_dapm_context *dapm = snd_soc_dapm_kcontrol_dapm(kcontrol);
+       struct snd_soc_dapm_context *dapm = snd_soc_dapm_kcontrol_to_dapm(kcontrol);
        struct snd_soc_component *component = snd_soc_dapm_to_component(dapm);
        struct soc_enum *e = (struct soc_enum *) kcontrol->private_value;
        unsigned int mode;
@@ -705,7 +705,7 @@ static int cs48l32_in_rate_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_get_dapm(component);
+       struct snd_soc_dapm_context *dapm = snd_soc_component_to_dapm(component);
        struct soc_enum *e = (struct soc_enum *)kcontrol->private_value;
        int ret;
 
@@ -756,7 +756,7 @@ static int cs48l32_low_power_mode_put(struct snd_kcontrol *kcontrol,
 {
        struct soc_mixer_control *mc = (struct soc_mixer_control *)kcontrol->private_value;
        struct snd_soc_component *component = snd_kcontrol_chip(kcontrol);
-       struct snd_soc_dapm_context *dapm = snd_soc_component_get_dapm(component);
+       struct snd_soc_dapm_context *dapm = snd_soc_component_to_dapm(component);
        int ret;
 
        snd_soc_dapm_mutex_lock(dapm);
@@ -962,7 +962,7 @@ static int cs48l32_eq_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_get_dapm(component);
+       struct snd_soc_dapm_context *dapm = snd_soc_component_to_dapm(component);
        struct cs48l32_codec *cs48l32_codec = snd_soc_component_get_drvdata(component);
        struct soc_enum *e = (struct soc_enum *) kcontrol->private_value;
        unsigned int *item = ucontrol->value.enumerated.item;
@@ -1026,7 +1026,7 @@ static int cs48l32_eq_coeff_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_get_dapm(component);
+       struct snd_soc_dapm_context *dapm = snd_soc_component_to_dapm(component);
        struct cs48l32_codec *cs48l32_codec = snd_soc_component_get_drvdata(component);
        struct cs48l32_eq_control *params = (void *)kcontrol->private_value;
        __be16 *coeffs;
@@ -1083,7 +1083,7 @@ static int cs48l32_dsp_rate_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_get_dapm(component);
+       struct snd_soc_dapm_context *dapm = snd_soc_component_to_dapm(component);
        struct cs48l32_codec *cs48l32_codec = snd_soc_component_get_drvdata(component);
        struct soc_enum *e = (struct soc_enum *) kcontrol->private_value;
        const unsigned int rate_num = e->mask;