Ignore:
Timestamp:
Aug 5, 2007, 7:09:24 AM (18 years ago)
Author:
Brendan Oakley
Message:

Merged to Alsa 0.9.2

Location:
GPL/branches/alsa-resync1/alsa-kernel/pci/ice1712
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • GPL/branches/alsa-resync1/alsa-kernel/pci/ice1712/ice1712.c

    r224 r231  
    18141814}
    18151815
    1816 static snd_kcontrol_new_t snd_ice1712_pro_internal_clock = __devinitdata {
     1816static snd_kcontrol_new_t snd_ice1712_pro_internal_clock __devinitdata = {
    18171817        .iface = SNDRV_CTL_ELEM_IFACE_MIXER,
    18181818        .name = "Multi Track Internal Clock",
     
    18331833static int snd_ice1712_pro_rate_locking_get(snd_kcontrol_t * kcontrol, snd_ctl_elem_value_t * ucontrol)
    18341834{
    1835         ucontrol->value.integer.value[0] = PRO_RATE_LOCKED ? 1 : 0;
     1835        ucontrol->value.integer.value[0] = PRO_RATE_LOCKED;
    18361836        return 0;
    18371837}
     
    18391839static int snd_ice1712_pro_rate_locking_put(snd_kcontrol_t * kcontrol, snd_ctl_elem_value_t * ucontrol)
    18401840{
    1841         int change = 0;
    1842 
    1843         change = PRO_RATE_LOCKED ? 1 : 0 != ucontrol->value.integer.value[0] ? 1 : 0;
    1844         PRO_RATE_LOCKED = ucontrol->value.integer.value[0] ? 1 : 0;
     1841        ice1712_t *ice = snd_kcontrol_chip(kcontrol);
     1842        int change = 0, nval;
     1843
     1844        nval = ucontrol->value.integer.value[0] ? 1 : 0;
     1845        spin_lock_irq(&ice->reg_lock);
     1846        change = PRO_RATE_LOCKED != nval;
     1847        PRO_RATE_LOCKED = nval;
     1848        spin_unlock_irq(&ice->reg_lock);
    18451849        return change;
    18461850}
     
    18651869static int snd_ice1712_pro_rate_reset_get(snd_kcontrol_t * kcontrol, snd_ctl_elem_value_t * ucontrol)
    18661870{
    1867         ucontrol->value.integer.value[0] = PRO_RATE_RESET ? 1 : 0;
     1871        ucontrol->value.integer.value[0] = PRO_RATE_RESET;
    18681872        return 0;
    18691873}
     
    18711875static int snd_ice1712_pro_rate_reset_put(snd_kcontrol_t * kcontrol, snd_ctl_elem_value_t * ucontrol)
    18721876{
    1873         int change = 0;
    1874 
    1875         change = PRO_RATE_LOCKED ? 1 : 0 != ucontrol->value.integer.value[0] ? 1 : 0;
    1876         PRO_RATE_RESET = ucontrol->value.integer.value[0] ? 1 : 0;
     1877        ice1712_t *ice = snd_kcontrol_chip(kcontrol);
     1878        int change = 0, nval;
     1879
     1880        nval = ucontrol->value.integer.value[0] ? 1 : 0;
     1881        spin_lock_irq(&ice->reg_lock);
     1882        change = PRO_RATE_RESET != nval;
     1883        PRO_RATE_RESET = nval;
     1884        spin_unlock_irq(&ice->reg_lock);
    18771885        return change;
    18781886}
  • GPL/branches/alsa-resync1/alsa-kernel/pci/ice1712/ice1724.c

    r224 r231  
    13141314static int snd_vt1724_pro_rate_locking_get(snd_kcontrol_t * kcontrol, snd_ctl_elem_value_t * ucontrol)
    13151315{
    1316         ucontrol->value.integer.value[0] = PRO_RATE_LOCKED ? 1 : 0;
     1316        ucontrol->value.integer.value[0] = PRO_RATE_LOCKED;
    13171317        return 0;
    13181318}
     
    13201320static int snd_vt1724_pro_rate_locking_put(snd_kcontrol_t * kcontrol, snd_ctl_elem_value_t * ucontrol)
    13211321{
    1322         int change = 0;
    1323 
    1324         change = PRO_RATE_LOCKED ? 1 : 0 != ucontrol->value.integer.value[0] ? 1 : 0;
    1325         PRO_RATE_LOCKED = ucontrol->value.integer.value[0] ? 1 : 0;
     1322        ice1712_t *ice = snd_kcontrol_chip(kcontrol);
     1323        int change = 0, nval;
     1324
     1325        nval = ucontrol->value.integer.value[0] ? 1 : 0;
     1326        spin_lock_irq(&ice->reg_lock);
     1327        change = PRO_RATE_LOCKED != nval;
     1328        PRO_RATE_LOCKED = nval;
     1329        spin_unlock_irq(&ice->reg_lock);
    13261330        return change;
    13271331}
     
    13521356static int snd_vt1724_pro_rate_reset_put(snd_kcontrol_t * kcontrol, snd_ctl_elem_value_t * ucontrol)
    13531357{
    1354         int change = 0;
    1355 
    1356         change = PRO_RATE_LOCKED ? 1 : 0 != ucontrol->value.integer.value[0] ? 1 : 0;
    1357         PRO_RATE_RESET = ucontrol->value.integer.value[0] ? 1 : 0;
     1358        ice1712_t *ice = snd_kcontrol_chip(kcontrol);
     1359        int change = 0, nval;
     1360
     1361        nval = ucontrol->value.integer.value[0] ? 1 : 0;
     1362        spin_lock_irq(&ice->reg_lock);
     1363        change = PRO_RATE_RESET != nval;
     1364        PRO_RATE_RESET = nval;
     1365        spin_unlock_irq(&ice->reg_lock);
    13581366        return change;
    13591367}
Note: See TracChangeset for help on using the changeset viewer.