---------------------
PatchSet 3139 
Date: 2005/04/25 11:22:20
Author: perex
Branch: HEAD
Tag: (none) 
Log:
Summary: fix behaviour of ac97_enum_mixer elements

ac97_enum mixer elements (e.g., "Capture Source") did not work because
of wrong bitmask calculation in snd_ac97_get_enum_double() and
snd_ac97_put_enum_double().

https://bugtrack.alsa-project.org/alsa-bug/view.php?id=1072

Signed-off-by: Sergey Vlasov <vsu@altlinux.ru>

Members: 
	pci/ac97/ac97_codec.c:1.184->1.185 

Index: /sound/pci/ac97/ac97_codec.c
diff -u /sound/pci/ac97/ac97_codec.c.old /sound/pci/ac97/ac97_codec.c
--- /sound/pci/ac97/ac97_codec.c.old	Thu Apr  7 12:23:58 2005
+++ /sound/pci/ac97/ac97_codec.c	Mon Apr 25 03:22:20 2005
@@ -465,7 +465,7 @@
 	struct ac97_enum *e = (struct ac97_enum *)kcontrol->private_value;
 	unsigned short val, bitmask;
 	
-	for (bitmask = 1; bitmask > e->mask; bitmask <<= 1)
+	for (bitmask = 1; bitmask < e->mask; bitmask <<= 1)
 		;
 	val = snd_ac97_read_cache(ac97, e->reg);
 	ucontrol->value.enumerated.item[0] = (val >> e->shift_l) & (bitmask - 1);
@@ -482,7 +482,7 @@
 	unsigned short val;
 	unsigned short mask, bitmask;
 	
-	for (bitmask = 1; bitmask > e->mask; bitmask <<= 1)
+	for (bitmask = 1; bitmask < e->mask; bitmask <<= 1)
 		;
 	if (ucontrol->value.enumerated.item[0] > e->mask - 1)
 		return -EINVAL;