Changeset 319

Show
Ignore:
Timestamp:
03/25/08 00:48:35 (8 months ago)
Author:
psmedley
Message:

Cleanups + reinstante bt87x support

Location:
GPL/branches/uniaud-2.0
Files:
9 modified

Legend:

Unmodified
Added
Removed
  • GPL/branches/uniaud-2.0/alsa-kernel/core/hwdep.c

    r305 r319  
    343343 */ 
    344344 
     345#ifndef TARGET_OS2 
    345346static const struct file_operations snd_hwdep_f_ops = 
     347#else 
     348static struct file_operations snd_hwdep_f_ops = 
     349#endif 
    346350{ 
    347351#ifndef TARGET_OS2 
  • GPL/branches/uniaud-2.0/alsa-kernel/core/misc.inc

    r305 r319  
    251251#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 5, 45) 
    252252 
    253 static int work_caller(void *data) 
    254 { 
    255         struct work_struct *works = data; 
    256  
    257 #if LINUX_VERSION_CODE < KERNEL_VERSION(2, 5, 0) && LINUX_VERSION_CODE >= KERNEL_VERSION(2, 4, 8) 
    258         reparent_to_init(); 
    259 #endif 
    260         strcpy(current->comm, "snd"); /* FIXME: different names? */ 
    261  
    262         works->func(works->data); 
    263  
    264         return 0; 
    265 } 
    266  
    267253#ifndef TARGET_OS2 
    268254int snd_compat_schedule_work(struct work_struct *works) 
     
    337323} 
    338324 
    339 static int xworker_thread(void *data) 
    340 { 
    341         struct workqueue_struct *wq = data; 
    342  
    343 #if LINUX_VERSION_CODE < KERNEL_VERSION(2, 5, 0) && LINUX_VERSION_CODE >= KERNEL_VERSION(2, 4, 8) 
    344         reparent_to_init(); 
    345 #endif 
    346         strcpy(current->comm, wq->name); 
    347  
    348         do { 
    349                 run_workqueue(wq); 
    350                 wait_event_interruptible(wq->more_work, !list_empty(&wq->worklist)); 
    351         } while (!signal_pending(current)); 
    352  
    353         complete_and_exit(&wq->thread_exited, 0); 
    354 #if LINUX_VERSION_CODE < KERNEL_VERSION(2, 3, 0) 
    355         return 0; 
    356 #endif 
    357 } 
    358  
    359325struct workqueue_struct *snd_compat_create_workqueue(const char *name) 
    360326{ 
  • GPL/branches/uniaud-2.0/alsa-kernel/core/pcm_native.c

    r307 r319  
    28602860} 
    28612861 
     2862#ifdef SND_PCM_USE_READV 
    28622863#ifdef SND_PCM_USE_AIO 
    28632864static ssize_t snd_pcm_aio_read(struct kiocb *iocb, const struct iovec *iov, 
     
    29492950        return result; 
    29502951} 
     2952#endif /* SND_PCM_USE_READV */ 
    29512953 
    29522954static unsigned int snd_pcm_playback_poll(struct file *file, poll_table * wait) 
     
    34593461 */ 
    34603462 
     3463#ifndef TARGET_OS2 
    34613464const struct file_operations snd_pcm_f_ops[2] = { 
     3465#else 
     3466struct file_operations snd_pcm_f_ops[2] = { 
     3467#endif 
    34623468        { 
    34633469#ifndef TARGET_OS2 
  • GPL/branches/uniaud-2.0/alsa-kernel/core/timer.c

    r305 r319  
    19461946#endif 
    19471947 
     1948#ifndef TARGET_OS2 
    19481949static const struct file_operations snd_timer_f_ops = 
     1950#else 
     1951static struct file_operations snd_timer_f_ops = 
     1952#endif 
    19491953{ 
    19501954#ifndef TARGET_OS2 
  • GPL/branches/uniaud-2.0/alsa-kernel/include/sound/pcm.h

    r305 r319  
    445445 */ 
    446446 
     447#ifndef TARGET_OS2 
    447448extern const struct file_operations snd_pcm_f_ops[2]; 
     449#else 
     450extern struct file_operations snd_pcm_f_ops[2]; 
     451#endif 
    448452 
    449453int snd_pcm_new(struct snd_card *card, char *id, int device, 
  • GPL/branches/uniaud-2.0/alsa-kernel/pci/bt87x.c

    r305 r319  
    2222 */ 
    2323 
     24#ifdef TARGET_OS2 
     25#include <asm/bitops.h> 
     26#endif 
    2427#include <linux/init.h> 
    2528#include <linux/interrupt.h> 
     
    4144                "{Brooktree,Bt879}}"); 
    4245 
     46#ifndef TARGET_OS2 
    4347static int index[SNDRV_CARDS] = {[0 ... (SNDRV_CARDS - 1)] = -2}; /* Exclude the first card */ 
    4448static char *id[SNDRV_CARDS] = SNDRV_DEFAULT_STR;       /* ID for this card */ 
     49#else 
     50static int index[SNDRV_CARDS] = SNDRV_DEFAULT_IDX;      /* Index 0-MAX */ 
     51static char *id[SNDRV_CARDS] = SNDRV_DEFAULT_STR;       /* ID for this card */ 
     52#endif 
    4553static int enable[SNDRV_CARDS] = SNDRV_DEFAULT_ENABLE_PNP;      /* Enable this card */ 
    4654static int digital_rate[SNDRV_CARDS];   /* digital input rate */ 
     
    818826        /* Pinnacle  Studio PCTV rave */ 
    819827        BT_DEVICE(PCI_DEVICE_ID_BROOKTREE_878, 0xbd11, 0x1200, GENERIC), 
    820         { } 
     828        {0} 
    821829}; 
    822830MODULE_DEVICE_TABLE(pci, snd_bt87x_ids); 
     
    847855        int i; 
    848856        const struct pci_device_id *supported; 
    849  
     857#ifdef TARGET_OS2 
     858        u16 subsystem_vendor, subsystem_device; 
     859#endif 
     860 
     861#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 13) 
    850862        supported = pci_match_id(snd_bt87x_ids, pci); 
     863#else 
     864        supported = pci_match_device(snd_bt87x_ids, pci); 
     865#endif 
    851866        if (supported && supported->driver_data > 0) 
    852867                return supported->driver_data; 
    853868 
     869#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 3, 0) 
     870        subsystem_vendor = pci->subsystem_vendor; 
     871        subsystem_device = pci->subsystem_device; 
     872#else 
     873        pci_read_config_word(pci, PCI_SUBSYSTEM_VENDOR_ID, &subsystem_vendor); 
     874        pci_read_config_word(pci, PCI_SUBSYSTEM_ID, &subsystem_device); 
     875#endif 
    854876        for (i = 0; i < ARRAY_SIZE(blacklist); ++i) 
     877#ifndef TARGET_OS2 
    855878                if (blacklist[i].subvendor == pci->subsystem_vendor && 
    856879                    blacklist[i].subdevice == pci->subsystem_device) { 
     880#else 
     881                if (blacklist[i].subvendor == subsystem_vendor && 
     882                    blacklist[i].subdevice == subsystem_device) { 
     883#endif 
    857884                        snd_printdd(KERN_INFO "card %#04x-%#04x:%#04x has no audio\n", 
     885#ifndef TARGET_OS2 
    858886                                    pci->device, pci->subsystem_vendor, pci->subsystem_device); 
     887#else 
     888                                    pci->device, subsystem_vendor, subsystem_device); 
     889#endif 
    859890                        return -EBUSY; 
    860891                } 
    861892 
    862893        snd_printk(KERN_INFO "unknown card %#04x-%#04x:%#04x\n", 
     894#ifndef TARGET_OS2 
    863895                   pci->device, pci->subsystem_vendor, pci->subsystem_device); 
     896#else 
     897                   pci->device, subsystem_vendor, subsystem_device); 
     898#endif 
    864899        snd_printk(KERN_DEBUG "please mail id, board name, and, " 
    865900                   "if it works, the correct digital_rate option to " 
     
    9651000        BT_DEVICE(PCI_DEVICE_ID_BROOKTREE_878, PCI_ANY_ID, PCI_ANY_ID, UNKNOWN), 
    9661001        BT_DEVICE(PCI_DEVICE_ID_BROOKTREE_879, PCI_ANY_ID, PCI_ANY_ID, UNKNOWN), 
    967         { } 
     1002        {0} 
    9681003}; 
    9691004 
  • GPL/branches/uniaud-2.0/alsa-kernel/pci/makefile.os2

    r313 r319  
    3434FILE1    = pci_iomap_compat.obj ens1370.obj ens1371.obj cs4281.obj  es1938.obj 
    3535FILE2    = es1968.obj intel8x0.obj maestro3.obj via82xx.obj  
    36 FILE3    = fm801.obj atiixp.obj cmipci.obj als4000.obj 
     36FILE3    = fm801.obj atiixp.obj cmipci.obj als4000.obj bt87x.obj 
    3737FILE4    =   
    3838FILE5    =  
  • GPL/branches/uniaud-2.0/include/linux/kernel.h

    r123 r319  
    9898}; 
    9999 
     100static void complete_and_exit(struct completion *, long); 
     101 
    100102#endif 
  • GPL/branches/uniaud-2.0/lib32/ossidc.cpp

    r312 r319  
    259259        fnCardExitCall[nrCardsDetected] = name_module_exit(alsa_card_azx_exit); 
    260260    } 
    261 #if 0 
    262261    if((ForceCard == CARD_NONE || ForceCard == CARD_BT87X) && 
    263262       nrCardsDetected < (OSS32_MAX_AUDIOCARDS-1) && call_module_init(alsa_card_bt87x_init) == 0) 
     
    265264        fnCardExitCall[nrCardsDetected] = name_module_exit(alsa_card_bt87x_exit); 
    266265    } 
    267 #endif 
    268266#endif 
    269267    fStrategyInit = FALSE;