ASoC: codecs: cs48l32: convert to snd_soc_dapm_xxx()

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>
This commit is contained in:
Kuninori Morimoto 2025-11-11 00:21:25 +00:00 committed by Mark Brown
parent 4c0f28830a
commit 97062ef891
No known key found for this signature in database
GPG Key ID: 24D68B725D5487D0
1 changed files with 9 additions and 9 deletions

View File

@ -320,8 +320,8 @@ static const struct soc_enum cs48l32_sample_rate[] = {
static int cs48l32_inmux_put(struct snd_kcontrol *kcontrol, static int cs48l32_inmux_put(struct snd_kcontrol *kcontrol,
struct snd_ctl_elem_value *ucontrol) 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_to_dapm(kcontrol);
struct snd_soc_dapm_context *dapm = snd_soc_dapm_kcontrol_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 cs48l32_codec *cs48l32_codec = snd_soc_component_get_drvdata(component);
struct soc_enum *e = (struct soc_enum *) kcontrol->private_value; struct soc_enum *e = (struct soc_enum *) kcontrol->private_value;
unsigned int mux, src_val, in_type; 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) if (in_type == CS48L32_IN_TYPE_SE)
src_val |= 1 << CS48L32_INx_SRC_SHIFT; src_val |= 1 << CS48L32_INx_SRC_SHIFT;
ret = snd_soc_component_update_bits(dapm->component, ret = snd_soc_component_update_bits(component,
e->reg, e->reg,
CS48L32_INx_SRC_MASK, CS48L32_INx_SRC_MASK,
src_val); src_val);
@ -385,7 +385,7 @@ static const char * const cs48l32_dmode_texts[] = {
static int cs48l32_dmode_put(struct snd_kcontrol *kcontrol, static int cs48l32_dmode_put(struct snd_kcontrol *kcontrol,
struct snd_ctl_elem_value *ucontrol) 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 snd_soc_component *component = snd_soc_dapm_to_component(dapm);
struct soc_enum *e = (struct soc_enum *) kcontrol->private_value; struct soc_enum *e = (struct soc_enum *) kcontrol->private_value;
unsigned int mode; 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_ctl_elem_value *ucontrol)
{ {
struct snd_soc_component *component = snd_kcontrol_chip(kcontrol); 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; struct soc_enum *e = (struct soc_enum *)kcontrol->private_value;
int ret; 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 soc_mixer_control *mc = (struct soc_mixer_control *)kcontrol->private_value;
struct snd_soc_component *component = snd_kcontrol_chip(kcontrol); 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; int ret;
snd_soc_dapm_mutex_lock(dapm); 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_ctl_elem_value *ucontrol)
{ {
struct snd_soc_component *component = snd_kcontrol_chip(kcontrol); 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_codec *cs48l32_codec = snd_soc_component_get_drvdata(component);
struct soc_enum *e = (struct soc_enum *) kcontrol->private_value; struct soc_enum *e = (struct soc_enum *) kcontrol->private_value;
unsigned int *item = ucontrol->value.enumerated.item; 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_ctl_elem_value *ucontrol)
{ {
struct snd_soc_component *component = snd_kcontrol_chip(kcontrol); 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_codec *cs48l32_codec = snd_soc_component_get_drvdata(component);
struct cs48l32_eq_control *params = (void *)kcontrol->private_value; struct cs48l32_eq_control *params = (void *)kcontrol->private_value;
__be16 *coeffs; __be16 *coeffs;
@ -1083,7 +1083,7 @@ static int cs48l32_dsp_rate_put(struct snd_kcontrol *kcontrol,
struct snd_ctl_elem_value *ucontrol) struct snd_ctl_elem_value *ucontrol)
{ {
struct snd_soc_component *component = snd_kcontrol_chip(kcontrol); 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_codec *cs48l32_codec = snd_soc_component_get_drvdata(component);
struct soc_enum *e = (struct soc_enum *) kcontrol->private_value; struct soc_enum *e = (struct soc_enum *) kcontrol->private_value;
const unsigned int rate_num = e->mask; const unsigned int rate_num = e->mask;