Ignore:
Timestamp:
Dec 11, 2005, 5:57:39 PM (20 years ago)
Author:
vladest
Message:

Latest update from ALSA. some intial > 15 interrupts support

File:
1 edited

Legend:

Unmodified
Added
Removed
  • GPL/trunk/alsa-kernel/pci/cs4281.c

    r33 r34  
    11941194        size = (long)CS4281_BA0_SIZE - pos;
    11951195    if (size > 0) {
    1196         if (copy_to_user_fromio(buf, chip->ba0 + pos, size))
     1196        if (copy_to_user_fromio(buf, (char*)chip->ba0 + pos, size))
    11971197            return -EFAULT;
    11981198    }
     
    12111211        size = (long)CS4281_BA1_SIZE - pos;
    12121212    if (size > 0) {
    1213         if (copy_to_user_fromio(buf, chip->ba1 + pos, size))
     1213        if (copy_to_user_fromio(buf, (char*)chip->ba1 + pos, size))
    12141214            return -EFAULT;
    12151215    }
     
    12171217}
    12181218
    1219 #ifdef TARGET_OS2
    12201219static struct snd_info_entry_ops snd_cs4281_proc_ops_BA0 = {
    1221     0, 0,
    1222     snd_cs4281_BA0_read,
    1223     0, 0, 0, 0, 0
     1220        .read = snd_cs4281_BA0_read,
    12241221};
    12251222
    12261223static struct snd_info_entry_ops snd_cs4281_proc_ops_BA1 = {
    1227     0, 0,
    1228     snd_cs4281_BA1_read,
    1229     0, 0, 0, 0, 0
     1224        .read = snd_cs4281_BA1_read,
    12301225};
    1231 #else
    1232 static struct snd_info_entry_ops snd_cs4281_proc_ops_BA0 = {
    1233 read: snd_cs4281_BA0_read,
    1234 };
    1235 
    1236 static struct snd_info_entry_ops snd_cs4281_proc_ops_BA1 = {
    1237 read: snd_cs4281_BA1_read,
    1238 };
    1239 
    1240 #endif
    12411226
    12421227static void __devinit snd_cs4281_proc_init(cs4281_t * chip)
     
    18461831}
    18471832
    1848 #ifdef TARGET_OS2
    1849 static snd_rawmidi_ops_t snd_cs4281_midi_output =
    1850 {
    1851     /*  open:           */      snd_cs4281_midi_output_open,
    1852     /*  close:          */      snd_cs4281_midi_output_close,
    1853     /*  trigger:        */      snd_cs4281_midi_output_trigger,
     1833static struct snd_rawmidi_ops snd_cs4281_midi_output =
     1834{
     1835    .open =             snd_cs4281_midi_output_open,
     1836    .close =    snd_cs4281_midi_output_close,
     1837    .trigger =  snd_cs4281_midi_output_trigger,
    18541838};
    18551839
    1856 static snd_rawmidi_ops_t snd_cs4281_midi_input =
    1857 {
    1858     /*  open:           */      snd_cs4281_midi_input_open,
    1859     /*  close:          */      snd_cs4281_midi_input_close,
    1860     /*  trigger:        */      snd_cs4281_midi_input_trigger,
     1840static struct snd_rawmidi_ops snd_cs4281_midi_input =
     1841{
     1842    .open =     snd_cs4281_midi_input_open,
     1843    .close =    snd_cs4281_midi_input_close,
     1844    .trigger =  snd_cs4281_midi_input_trigger,
    18611845};
    1862 #else
    1863 static snd_rawmidi_ops_t snd_cs4281_midi_output =
    1864 {
    1865 open:           snd_cs4281_midi_output_open,
    1866     close:          snd_cs4281_midi_output_close,
    1867     trigger:        snd_cs4281_midi_output_trigger,
    1868 };
    1869 
    1870 static snd_rawmidi_ops_t snd_cs4281_midi_input =
    1871 {
    1872 open:           snd_cs4281_midi_input_open,
    1873     close:          snd_cs4281_midi_input_close,
    1874     trigger:        snd_cs4281_midi_input_trigger,
    1875 };
    1876 
    1877 #endif
    18781846
    18791847static int __devinit snd_cs4281_midi(cs4281_t * chip, int device, snd_rawmidi_t **rrawmidi)
     
    19061874    unsigned int status, dma, val;
    19071875    cs4281_dma_t *cdma;
    1908 #ifdef TARGET_OS2
    1909     int fOurIrq = FALSE;
    1910 #endif
    19111876
    19121877    if (chip == NULL)
     
    19191884
    19201885    if (status & (BA0_HISR_DMA(0)|BA0_HISR_DMA(1)|BA0_HISR_DMA(2)|BA0_HISR_DMA(3))) {
    1921 #ifdef TARGET_OS2
    1922         fOurIrq = TRUE;
    1923 #endif
    19241886        for (dma = 0; dma < 4; dma++)
    19251887            if (status & BA0_HISR_DMA(dma)) {
     
    19511913        unsigned char c;
    19521914
    1953 #ifdef TARGET_OS2
    1954         fOurIrq = TRUE;
    1955 #endif
    1956 
    19571915        spin_lock(&chip->reg_lock);
    19581916        while ((snd_cs4281_peekBA0(chip, BA0_MIDSR) & BA0_MIDSR_RBE) == 0) {
     
    19791937    /* EOI to the PCI part... reenables interrupts */
    19801938    snd_cs4281_pokeBA0(chip, BA0_HICR, BA0_HICR_EOI);
    1981 
    1982 #ifdef TARGET_OS2
    1983     if (fOurIrq) {
    1984         eoi_irq(irq);
    1985     }
    1986 #endif
    19871939    return IRQ_HANDLED;
    19881940
Note: See TracChangeset for help on using the changeset viewer.