Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 189f06c0 authored by Jaswinder Jassal's avatar Jaswinder Jassal Committed by Mark Brown
Browse files

ASoC: core: fix shift used for second item in snd_soc_get_enum_double



Incorrect shift value was being used to extract the second item.

Signed-off-by: default avatarJaswinder Jassal <jjassal@opensource.wolfsonmicro.com>
Reviewed-by: default avatarCharles Keepax <ckeepax@opensource.wolfsonmicro.com>
Signed-off-by: default avatarMark Brown <broonie@kernel.org>
parent 29b4817d
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -77,7 +77,7 @@ int snd_soc_get_enum_double(struct snd_kcontrol *kcontrol,
	item = snd_soc_enum_val_to_item(e, val);
	ucontrol->value.enumerated.item[0] = item;
	if (e->shift_l != e->shift_r) {
		val = (reg_val >> e->shift_l) & e->mask;
		val = (reg_val >> e->shift_r) & e->mask;
		item = snd_soc_enum_val_to_item(e, val);
		ucontrol->value.enumerated.item[1] = item;
	}