Changeset 231


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
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • GPL/branches/alsa-resync1/alsa-kernel/core/isadma.c

    r224 r231  
    9898                snd_printk(KERN_ERR "pointer (0x%x) for DMA #%ld is greater than transfer size (0x%x)\n", result, dma, size);
    9999#endif
    100         return result >= size ? 0 : size - result;
     100        if (result >= size || result == 0)
     101                return 0;
     102        else
     103                return size - result;
    101104}
  • GPL/branches/alsa-resync1/alsa-kernel/core/pcm_native.c

    r222 r231  
    20352035            substream->ops->hw_free(substream);
    20362036        substream->ops->close(substream);
     2037                substream->open_flag = 0;
     2038        }
    20372039        substream->ffile = NULL;
    20382040    }
  • GPL/branches/alsa-resync1/alsa-kernel/isa/opti9xx/opti92x-ad1848.c

    r224 r231  
    988988                } while (s != substream);
    989989                spin_lock(&chip->lock);
    990                 if (cmd == SNDRV_PCM_TRIGGER_START)
     990                if (cmd == SNDRV_PCM_TRIGGER_START) {
    991991                        snd_opti93x_out_mask(chip, OPTi93X_IFACE_CONF, what, what);
    992                 else
     992                        if (what & OPTi93X_CAPTURE_ENABLE)
     993                                udelay(50);
     994                } else
    993995                        snd_opti93x_out_mask(chip, OPTi93X_IFACE_CONF, what, 0x00);
    994996                spin_unlock(&chip->lock);
     
    12081210        runtime->hw = snd_opti93x_capture;
    12091211        snd_pcm_set_sync(substream);
     1212        chip->capture_substream = substream;
    12101213        snd_pcm_limit_isa_dma_size(chip->dma2, &runtime->hw.buffer_bytes_max);
    12111214        snd_pcm_hw_constraint_list(runtime, 0, SNDRV_PCM_HW_PARAM_RATE, &hw_constraints_rates);
  • 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.