mirror of https://github.com/torvalds/linux.git
ASoC: uniphier: 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/87cy6qm7jk.wl-kuninori.morimoto.gx@renesas.com Signed-off-by: Mark Brown <broonie@kernel.org>
This commit is contained in:
parent
308eee4473
commit
7e4cdef1ef
|
|
@ -623,7 +623,7 @@ static int uniphier_aio_vol_info(struct snd_kcontrol *kcontrol,
|
|||
static int uniphier_aio_vol_get(struct snd_kcontrol *kcontrol,
|
||||
struct snd_ctl_elem_value *ucontrol)
|
||||
{
|
||||
struct snd_soc_component *comp = snd_soc_kcontrol_component(kcontrol);
|
||||
struct snd_soc_component *comp = snd_kcontrol_chip(kcontrol);
|
||||
struct uniphier_aio_chip *chip = snd_soc_component_get_drvdata(comp);
|
||||
struct uniphier_aio_sub *sub;
|
||||
int oport_hw = kcontrol->private_value;
|
||||
|
|
@ -640,7 +640,7 @@ static int uniphier_aio_vol_get(struct snd_kcontrol *kcontrol,
|
|||
static int uniphier_aio_vol_put(struct snd_kcontrol *kcontrol,
|
||||
struct snd_ctl_elem_value *ucontrol)
|
||||
{
|
||||
struct snd_soc_component *comp = snd_soc_kcontrol_component(kcontrol);
|
||||
struct snd_soc_component *comp = snd_kcontrol_chip(kcontrol);
|
||||
struct uniphier_aio_chip *chip = snd_soc_component_get_drvdata(comp);
|
||||
struct uniphier_aio_sub *sub;
|
||||
int oport_hw = kcontrol->private_value;
|
||||
|
|
|
|||
|
|
@ -228,7 +228,7 @@ static void evea_update_switch_all(struct evea_priv *evea)
|
|||
static int evea_get_switch_lin(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 evea_priv *evea = snd_soc_component_get_drvdata(component);
|
||||
|
||||
ucontrol->value.integer.value[0] = evea->switch_lin;
|
||||
|
|
@ -239,7 +239,7 @@ static int evea_get_switch_lin(struct snd_kcontrol *kcontrol,
|
|||
static int evea_set_switch_lin(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 evea_priv *evea = snd_soc_component_get_drvdata(component);
|
||||
|
||||
if (evea->switch_lin == ucontrol->value.integer.value[0])
|
||||
|
|
@ -253,7 +253,7 @@ static int evea_set_switch_lin(struct snd_kcontrol *kcontrol,
|
|||
static int evea_get_switch_lo(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 evea_priv *evea = snd_soc_component_get_drvdata(component);
|
||||
|
||||
ucontrol->value.integer.value[0] = evea->switch_lo;
|
||||
|
|
@ -264,7 +264,7 @@ static int evea_get_switch_lo(struct snd_kcontrol *kcontrol,
|
|||
static int evea_set_switch_lo(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 evea_priv *evea = snd_soc_component_get_drvdata(component);
|
||||
|
||||
if (evea->switch_lo == ucontrol->value.integer.value[0])
|
||||
|
|
@ -278,7 +278,7 @@ static int evea_set_switch_lo(struct snd_kcontrol *kcontrol,
|
|||
static int evea_get_switch_hp(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 evea_priv *evea = snd_soc_component_get_drvdata(component);
|
||||
|
||||
ucontrol->value.integer.value[0] = evea->switch_hp;
|
||||
|
|
@ -289,7 +289,7 @@ static int evea_get_switch_hp(struct snd_kcontrol *kcontrol,
|
|||
static int evea_set_switch_hp(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 evea_priv *evea = snd_soc_component_get_drvdata(component);
|
||||
|
||||
if (evea->switch_hp == ucontrol->value.integer.value[0])
|
||||
|
|
|
|||
Loading…
Reference in New Issue