Update of /cvsroot/alsa/alsa-kernel/pci/ice1712
In directory sc8-pr-cvs1:/tmp/cvs-serv420
Modified Files:
ice1712.c ice1724.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.19
retrieving revision 1.20
diff -u -r1.19 -r1.20
--- ice1712.c 15 Mar 2003 15:34:13 -0000 1.19
+++ ice1712.c 15 Mar 2003 15:38:29 -0000 1.20
@@ -1838,6 +1838,7 @@
static int snd_ice1712_pro_rate_locking_put(snd_kcontrol_t * kcontrol,
snd_ctl_elem_value_t * ucontrol)
{
+ ice1712_t *ice = snd_kcontrol_chip(kcontrol);
int change = 0, nval;
nval = ucontrol->value.integer.value[0] ? 1 : 0;
@@ -1873,6 +1874,7 @@
static int snd_ice1712_pro_rate_reset_put(snd_kcontrol_t * kcontrol,
snd_ctl_elem_value_t * ucontrol)
{
+ ice1712_t *ice = snd_kcontrol_chip(kcontrol);
int change = 0, nval;
nval = ucontrol->value.integer.value[0] ? 1 : 0;
Index: ice1724.c
===================================================================
RCS file: /cvsroot/alsa/alsa-kernel/pci/ice1712/ice1724.c,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- ice1724.c 28 Feb 2003 14:24:37 -0000 1.2
+++ ice1724.c 15 Mar 2003 15:38:29 -0000 1.3
@@ -1313,16 +1313,20 @@
static int snd_vt1724_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_vt1724_pro_rate_locking_put(snd_kcontrol_t * kcontrol,
snd_ctl_elem_value_t * ucontrol)
{
- int change = 0;
+ ice1712_t *ice = snd_kcontrol_chip(kcontrol);
+ 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;
}
@@ -1351,10 +1355,14 @@
static int snd_vt1724_pro_rate_reset_put(snd_kcontrol_t * kcontrol,
snd_ctl_elem_value_t * ucontrol)
{
- int change = 0;
+ ice1712_t *ice = snd_kcontrol_chip(kcontrol);
+ 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