]> git.baikalelectronics.ru Git - kernel.git/commitdiff
ASoC: tegra: Fix wrong value type in ADMAIF
authorSameer Pujar <spujar@nvidia.com>
Thu, 18 Nov 2021 07:06:56 +0000 (12:36 +0530)
committerMark Brown <broonie@kernel.org>
Thu, 18 Nov 2021 19:02:16 +0000 (19:02 +0000)
The enum controls are expected to use enumerated value type.
Update relevant references in control get/put callbacks.

Fixes: 9a5234ef7639 ("ASoC: tegra: Add Tegra210 based ADMAIF driver")
Suggested-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Sameer Pujar <spujar@nvidia.com>
Reviewed-by: Takashi Iwai <tiwai@suse.de>
Link: https://lore.kernel.org/r/1637219231-406-2-git-send-email-spujar@nvidia.com
Signed-off-by: Mark Brown <broonie@kernel.org>
sound/soc/tegra/tegra210_admaif.c

index bcccdf3ddc528b2d2ccea759390c0564c1ea6c86..6febe80cfa6fd1e071274982790a8e4bb5607e2f 100644 (file)
@@ -430,7 +430,7 @@ static int tegra_admaif_get_control(struct snd_kcontrol *kcontrol,
        struct snd_soc_component *cmpnt = snd_soc_kcontrol_component(kcontrol);
        struct soc_enum *ec = (struct soc_enum *)kcontrol->private_value;
        struct tegra_admaif *admaif = snd_soc_component_get_drvdata(cmpnt);
-       long *uctl_val = &ucontrol->value.integer.value[0];
+       unsigned int *uctl_val = &ucontrol->value.enumerated.item[0];
 
        if (strstr(kcontrol->id.name, "Playback Mono To Stereo"))
                *uctl_val = admaif->mono_to_stereo[ADMAIF_TX_PATH][ec->reg];
@@ -450,7 +450,7 @@ static int tegra_admaif_put_control(struct snd_kcontrol *kcontrol,
        struct snd_soc_component *cmpnt = snd_soc_kcontrol_component(kcontrol);
        struct soc_enum *ec = (struct soc_enum *)kcontrol->private_value;
        struct tegra_admaif *admaif = snd_soc_component_get_drvdata(cmpnt);
-       int value = ucontrol->value.integer.value[0];
+       unsigned int value = ucontrol->value.enumerated.item[0];
 
        if (strstr(kcontrol->id.name, "Playback Mono To Stereo"))
                admaif->mono_to_stereo[ADMAIF_TX_PATH][ec->reg] = value;