Commit 6762965d authored by Sameer Pujar's avatar Sameer Pujar Committed by Mark Brown

ASoC: tegra: Fix wrong value type in MVC

The enum controls are expected to use enumerated value type.
Update relevant references in control get/put callbacks.

Fixes: e539891f ("ASoC: tegra: Add Tegra210 based MVC driver")
Suggested-by: default avatarTakashi Iwai <tiwai@suse.de>
Signed-off-by: default avatarSameer Pujar <spujar@nvidia.com>
Reviewed-by: default avatarTakashi Iwai <tiwai@suse.de>
Link: https://lore.kernel.org/r/1637219231-406-7-git-send-email-spujar@nvidia.comSigned-off-by: default avatarMark Brown <broonie@kernel.org>
parent 42afca1a
...@@ -275,7 +275,7 @@ static int tegra210_mvc_get_curve_type(struct snd_kcontrol *kcontrol, ...@@ -275,7 +275,7 @@ static int tegra210_mvc_get_curve_type(struct snd_kcontrol *kcontrol,
struct snd_soc_component *cmpnt = snd_soc_kcontrol_component(kcontrol); struct snd_soc_component *cmpnt = snd_soc_kcontrol_component(kcontrol);
struct tegra210_mvc *mvc = snd_soc_component_get_drvdata(cmpnt); struct tegra210_mvc *mvc = snd_soc_component_get_drvdata(cmpnt);
ucontrol->value.integer.value[0] = mvc->curve_type; ucontrol->value.enumerated.item[0] = mvc->curve_type;
return 0; return 0;
} }
...@@ -285,7 +285,7 @@ static int tegra210_mvc_put_curve_type(struct snd_kcontrol *kcontrol, ...@@ -285,7 +285,7 @@ static int tegra210_mvc_put_curve_type(struct snd_kcontrol *kcontrol,
{ {
struct snd_soc_component *cmpnt = snd_soc_kcontrol_component(kcontrol); struct snd_soc_component *cmpnt = snd_soc_kcontrol_component(kcontrol);
struct tegra210_mvc *mvc = snd_soc_component_get_drvdata(cmpnt); struct tegra210_mvc *mvc = snd_soc_component_get_drvdata(cmpnt);
int value; unsigned int value;
regmap_read(mvc->regmap, TEGRA210_MVC_ENABLE, &value); regmap_read(mvc->regmap, TEGRA210_MVC_ENABLE, &value);
if (value & TEGRA210_MVC_EN) { if (value & TEGRA210_MVC_EN) {
...@@ -294,10 +294,10 @@ static int tegra210_mvc_put_curve_type(struct snd_kcontrol *kcontrol, ...@@ -294,10 +294,10 @@ static int tegra210_mvc_put_curve_type(struct snd_kcontrol *kcontrol,
return -EINVAL; return -EINVAL;
} }
if (mvc->curve_type == ucontrol->value.integer.value[0]) if (mvc->curve_type == ucontrol->value.enumerated.item[0])
return 0; return 0;
mvc->curve_type = ucontrol->value.integer.value[0]; mvc->curve_type = ucontrol->value.enumerated.item[0];
tegra210_mvc_reset_vol_settings(mvc, cmpnt->dev); tegra210_mvc_reset_vol_settings(mvc, cmpnt->dev);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment