Update of /cvsroot/alsa/alsa-kernel/pci/ice1712
In directory sc8-pr-cvs1:/tmp/cvs-serv31320

Modified Files:
        ice1712.c 
Log Message:
Cleanups - PRO_RATE_RESET,PRO_RATE_LOCKED

Index: ice1712.c
===================================================================
RCS file: /cvsroot/alsa/alsa-kernel/pci/ice1712/ice1712.c,v
retrieving revision 1.18
retrieving revision 1.19
diff -u -r1.18 -r1.19
--- ice1712.c   25 Feb 2003 15:05:06 -0000      1.18
+++ ice1712.c   15 Mar 2003 15:34:13 -0000      1.19
@@ -1832,16 +1832,19 @@
 
 static int snd_ice1712_pro_rate_locking_get(snd_kcontrol_t * kcontrol, 
snd_ctl_elem_value_t * ucontrol)
 {
-       ucontrol->value.integer.value[0] = PRO_RATE_LOCKED ? 1 : 0;
+       ucontrol->value.integer.value[0] = PRO_RATE_LOCKED;
        return 0;
 }
 
 static int snd_ice1712_pro_rate_locking_put(snd_kcontrol_t * kcontrol, 
snd_ctl_elem_value_t * ucontrol)
 {
-       int change = 0;
+       int change = 0, nval;
 
-       change = PRO_RATE_LOCKED ? 1 : 0 != ucontrol->value.integer.value[0] ? 1 : 0;
-       PRO_RATE_LOCKED = ucontrol->value.integer.value[0] ? 1 : 0;
+       nval = ucontrol->value.integer.value[0] ? 1 : 0;
+       spin_lock_irq(&ice->reg_lock);
+       change = PRO_RATE_LOCKED != nval;
+       PRO_RATE_LOCKED = nval;
+       spin_unlock_irq(&ice->reg_lock);
        return change;
 }
 
@@ -1864,16 +1867,19 @@
 
 static int snd_ice1712_pro_rate_reset_get(snd_kcontrol_t * kcontrol, 
snd_ctl_elem_value_t * ucontrol)
 {
-       ucontrol->value.integer.value[0] = PRO_RATE_RESET ? 1 : 0;
+       ucontrol->value.integer.value[0] = PRO_RATE_RESET;
        return 0;
 }
 
 static int snd_ice1712_pro_rate_reset_put(snd_kcontrol_t * kcontrol, 
snd_ctl_elem_value_t * ucontrol)
 {
-       int change = 0;
+       int change = 0, nval;
 
-       change = PRO_RATE_LOCKED ? 1 : 0 != ucontrol->value.integer.value[0] ? 1 : 0;
-       PRO_RATE_RESET = ucontrol->value.integer.value[0] ? 1 : 0;
+       nval = ucontrol->value.integer.value[0] ? 1 : 0;
+       spin_lock_irq(&ice->reg_lock);
+       change = PRO_RATE_RESET != nval;
+       PRO_RATE_RESET = nval;
+       spin_unlock_irq(&ice->reg_lock);
        return change;
 }
 



-------------------------------------------------------
This SF.net email is sponsored by:Crypto Challenge is now open! 
Get cracking and register here for some mind boggling fun and 
the chance of winning an Apple iPod:
http://ads.sourceforge.net/cgi-bin/redirect.pl?thaw0031en
_______________________________________________
Alsa-cvslog mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/alsa-cvslog

Reply via email to