Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 884c6cb

Browse files
pujarsbroonie
authored andcommitted
ASoC: tegra: Fix wrong value type in ADMAIF
The enum controls are expected to use enumerated value type. Update relevant references in control get/put callbacks. Fixes: f74028e ("ASoC: tegra: Add Tegra210 based ADMAIF driver") Suggested-by: Takashi Iwai <[email protected]> Signed-off-by: Sameer Pujar <[email protected]> Reviewed-by: Takashi Iwai <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Mark Brown <[email protected]>
1 parent 424fe7e commit 884c6cb

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

sound/soc/tegra/tegra210_admaif.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -430,7 +430,7 @@ static int tegra_admaif_get_control(struct snd_kcontrol *kcontrol,
430430
struct snd_soc_component *cmpnt = snd_soc_kcontrol_component(kcontrol);
431431
struct soc_enum *ec = (struct soc_enum *)kcontrol->private_value;
432432
struct tegra_admaif *admaif = snd_soc_component_get_drvdata(cmpnt);
433-
long *uctl_val = &ucontrol->value.integer.value[0];
433+
unsigned int *uctl_val = &ucontrol->value.enumerated.item[0];
434434

435435
if (strstr(kcontrol->id.name, "Playback Mono To Stereo"))
436436
*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,
450450
struct snd_soc_component *cmpnt = snd_soc_kcontrol_component(kcontrol);
451451
struct soc_enum *ec = (struct soc_enum *)kcontrol->private_value;
452452
struct tegra_admaif *admaif = snd_soc_component_get_drvdata(cmpnt);
453-
int value = ucontrol->value.integer.value[0];
453+
unsigned int value = ucontrol->value.enumerated.item[0];
454454

455455
if (strstr(kcontrol->id.name, "Playback Mono To Stereo"))
456456
admaif->mono_to_stereo[ADMAIF_TX_PATH][ec->reg] = value;

0 commit comments

Comments
 (0)