mirror of
https://github.com/torvalds/linux.git
synced 2026-05-31 10:33:41 +02:00
ASoC: codecs: max98095: use snd_kcontrol_chip() instead of snd_soc_kcontrol_component()
We have very similar name functions (A)(B). Both gets component from snd_kcontrol, but (A) is used in callback functions which is registered through snd_soc_add_component_controls(), (B) is used through snd_soc_dapm_new_widgets(). (A) snd_soc_kcontrol_component() (B) snd_soc_dapm_kcontrol_component() (B) is using very picky way to get component but using it is necessary in ASoC. But (A) is just wrapper function to snd_kcontrol_chip(), and directly using it without wrapper is very common way on ALSA. To reduce confusions of similar function, let's use common way on (A). Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Link: https://patch.msgid.link/87wm4yqfhz.wl-kuninori.morimoto.gx@renesas.com Signed-off-by: Mark Brown <broonie@kernel.org>
This commit is contained in:
parent
dc5aa86741
commit
e548389df7
|
|
@ -350,7 +350,7 @@ static SOC_ENUM_SINGLE_DECL(max98095_dai3_dac_filter_enum,
|
|||
static int max98095_mic1pre_set(struct snd_kcontrol *kcontrol,
|
||||
struct snd_ctl_elem_value *ucontrol)
|
||||
{
|
||||
struct snd_soc_component *component = snd_soc_kcontrol_component(kcontrol);
|
||||
struct snd_soc_component *component = snd_kcontrol_chip(kcontrol);
|
||||
struct max98095_priv *max98095 = snd_soc_component_get_drvdata(component);
|
||||
unsigned int sel = ucontrol->value.integer.value[0];
|
||||
|
||||
|
|
@ -364,7 +364,7 @@ static int max98095_mic1pre_set(struct snd_kcontrol *kcontrol,
|
|||
static int max98095_mic1pre_get(struct snd_kcontrol *kcontrol,
|
||||
struct snd_ctl_elem_value *ucontrol)
|
||||
{
|
||||
struct snd_soc_component *component = snd_soc_kcontrol_component(kcontrol);
|
||||
struct snd_soc_component *component = snd_kcontrol_chip(kcontrol);
|
||||
struct max98095_priv *max98095 = snd_soc_component_get_drvdata(component);
|
||||
|
||||
ucontrol->value.integer.value[0] = max98095->mic1pre;
|
||||
|
|
@ -374,7 +374,7 @@ static int max98095_mic1pre_get(struct snd_kcontrol *kcontrol,
|
|||
static int max98095_mic2pre_set(struct snd_kcontrol *kcontrol,
|
||||
struct snd_ctl_elem_value *ucontrol)
|
||||
{
|
||||
struct snd_soc_component *component = snd_soc_kcontrol_component(kcontrol);
|
||||
struct snd_soc_component *component = snd_kcontrol_chip(kcontrol);
|
||||
struct max98095_priv *max98095 = snd_soc_component_get_drvdata(component);
|
||||
unsigned int sel = ucontrol->value.integer.value[0];
|
||||
|
||||
|
|
@ -388,7 +388,7 @@ static int max98095_mic2pre_set(struct snd_kcontrol *kcontrol,
|
|||
static int max98095_mic2pre_get(struct snd_kcontrol *kcontrol,
|
||||
struct snd_ctl_elem_value *ucontrol)
|
||||
{
|
||||
struct snd_soc_component *component = snd_soc_kcontrol_component(kcontrol);
|
||||
struct snd_soc_component *component = snd_kcontrol_chip(kcontrol);
|
||||
struct max98095_priv *max98095 = snd_soc_component_get_drvdata(component);
|
||||
|
||||
ucontrol->value.integer.value[0] = max98095->mic2pre;
|
||||
|
|
@ -1485,7 +1485,7 @@ static int max98095_get_eq_channel(const char *name)
|
|||
static int max98095_put_eq_enum(struct snd_kcontrol *kcontrol,
|
||||
struct snd_ctl_elem_value *ucontrol)
|
||||
{
|
||||
struct snd_soc_component *component = snd_soc_kcontrol_component(kcontrol);
|
||||
struct snd_soc_component *component = snd_kcontrol_chip(kcontrol);
|
||||
struct max98095_priv *max98095 = snd_soc_component_get_drvdata(component);
|
||||
struct max98095_pdata *pdata = max98095->pdata;
|
||||
int channel = max98095_get_eq_channel(kcontrol->id.name);
|
||||
|
|
@ -1549,7 +1549,7 @@ static int max98095_put_eq_enum(struct snd_kcontrol *kcontrol,
|
|||
static int max98095_get_eq_enum(struct snd_kcontrol *kcontrol,
|
||||
struct snd_ctl_elem_value *ucontrol)
|
||||
{
|
||||
struct snd_soc_component *component = snd_soc_kcontrol_component(kcontrol);
|
||||
struct snd_soc_component *component = snd_kcontrol_chip(kcontrol);
|
||||
struct max98095_priv *max98095 = snd_soc_component_get_drvdata(component);
|
||||
int channel = max98095_get_eq_channel(kcontrol->id.name);
|
||||
struct max98095_cdata *cdata;
|
||||
|
|
@ -1636,7 +1636,7 @@ static int max98095_get_bq_channel(struct snd_soc_component *component,
|
|||
static int max98095_put_bq_enum(struct snd_kcontrol *kcontrol,
|
||||
struct snd_ctl_elem_value *ucontrol)
|
||||
{
|
||||
struct snd_soc_component *component = snd_soc_kcontrol_component(kcontrol);
|
||||
struct snd_soc_component *component = snd_kcontrol_chip(kcontrol);
|
||||
struct max98095_priv *max98095 = snd_soc_component_get_drvdata(component);
|
||||
struct max98095_pdata *pdata = max98095->pdata;
|
||||
int channel = max98095_get_bq_channel(component, kcontrol->id.name);
|
||||
|
|
@ -1697,7 +1697,7 @@ static int max98095_put_bq_enum(struct snd_kcontrol *kcontrol,
|
|||
static int max98095_get_bq_enum(struct snd_kcontrol *kcontrol,
|
||||
struct snd_ctl_elem_value *ucontrol)
|
||||
{
|
||||
struct snd_soc_component *component = snd_soc_kcontrol_component(kcontrol);
|
||||
struct snd_soc_component *component = snd_kcontrol_chip(kcontrol);
|
||||
struct max98095_priv *max98095 = snd_soc_component_get_drvdata(component);
|
||||
int channel = max98095_get_bq_channel(component, kcontrol->id.name);
|
||||
struct max98095_cdata *cdata;
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user