mirror of
https://github.com/edk2-porting/linux-next.git
synced 2024-12-17 09:43:59 +08:00
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: Jaswinder Jassal <jjassal@opensource.wolfsonmicro.com> Reviewed-by: Charles Keepax <ckeepax@opensource.wolfsonmicro.com> Signed-off-by: Mark Brown <broonie@kernel.org>
This commit is contained in:
parent
29b4817d40
commit
189f06c031
@ -77,7 +77,7 @@ int snd_soc_get_enum_double(struct snd_kcontrol *kcontrol,
|
|||||||
item = snd_soc_enum_val_to_item(e, val);
|
item = snd_soc_enum_val_to_item(e, val);
|
||||||
ucontrol->value.enumerated.item[0] = item;
|
ucontrol->value.enumerated.item[0] = item;
|
||||||
if (e->shift_l != e->shift_r) {
|
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);
|
item = snd_soc_enum_val_to_item(e, val);
|
||||||
ucontrol->value.enumerated.item[1] = item;
|
ucontrol->value.enumerated.item[1] = item;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user