Changeset 206


Ignore:
Timestamp:
Jun 16, 2007, 11:16:58 PM (13 years ago)
Author:
Brendan Oakley
Message:

Applied fixes from trunk to ReSync? branch, fixed up additional conflicts, errors, and warnings.

Location:
GPL/branches/alsa-resync1/alsa-kernel
Files:
32 edited

Legend:

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

    r92 r206  
    961961
    962962        return 0;
    963 }
    964 
    965 static int snd_ctl_elem_add_user(struct snd_ctl_file *file,
    966                                  struct snd_ctl_elem_info __user *_info, int replace)
    967 {
    968         struct snd_ctl_elem_info info;
    969         if (copy_from_user(&info, _info, sizeof(info)))
    970                 return -EFAULT;
    971         return snd_ctl_elem_add(file, &info, replace);
    972963}
    973964
  • GPL/branches/alsa-resync1/alsa-kernel/core/info.c

    r112 r206  
    3838#include <stdarg.h>
    3939
    40 #define min(x,y) (x < y ? x : y )
    41 
    4240/*
    4341 *
    4442 */
    45 static inline void dec_mod_count(struct module *module)
    46 {
    47         if (module)
    48                 __MOD_DEC_USE_COUNT(module);
    49 }
    5043
    5144int snd_info_check_reserved_words(const char *str)
  • GPL/branches/alsa-resync1/alsa-kernel/core/init.c

    r100 r206  
    2525#include <linux/slab.h>
    2626#include <linux/time.h>
     27#include <linux/ctype.h>
    2728#include <sound/core.h>
    2829#include <sound/control.h>
     
    376377        }
    377378        id = card->id;
    378         while (*spos != '\0' && !isalnum1(*spos))
     379        while (*spos != '\0' && !isalnum(*spos))
    379380                spos++;
    380         if (isdigit1(*spos))
    381                 *id++ = isalpha1(card->shortname[0]) ? card->shortname[0] : 'D';
     381        if (isdigit(*spos))
     382                *id++ = isalpha(card->shortname[0]) ? card->shortname[0] : 'D';
    382383        while (*spos != '\0' && (size_t)(id - card->id) < sizeof(card->id) - 1) {
    383                 if (isalnum1(*spos))
     384                if (isalnum(*spos))
    384385                        *id++ = *spos;
    385386                spos++;
     
    605606        int len = strlen(component);
    606607
    607         ptr = strstr1(card->components, component);
     608        ptr = strstr(card->components, component);
    608609        if (ptr != NULL) {
    609610                if (ptr[len] == '\0' || ptr[len] == ' ')        /* already there */
     
    747748 * handler and from the control API.
    748749 */
    749 int snd_card_set_pm_callback(struct snd_card *card,
    750                              int (*suspend)(struct snd_card *, unsigned int),
    751                              int (*resume)(struct snd_card *, unsigned int),
     750int snd_card_set_pm_callback(snd_card_t *card,
     751                             int (*suspend)(snd_card_t *, unsigned int),
     752                             int (*resume)(snd_card_t *, unsigned int),
    752753                             void *private_data)
    753754{
  • GPL/branches/alsa-resync1/alsa-kernel/core/memalloc.c

    r104 r206  
    2525#include <sound/core.h>
    2626#include <sound/info.h>
     27#include <linux/proc_fs.h>
    2728#include <sound/memalloc.h>
    2829
     
    5859    struct list_head list;
    5960};
    60 
    61 #include <linux/proc_fs.h>
    62 static inline struct proc_dir_entry *create_proc_read_entry(const char *name,
    63         mode_t mode, struct proc_dir_entry *base,
    64         read_proc_t *read_proc, void * data)
    65 {
    66         struct proc_dir_entry *res=create_proc_entry(name,mode,base);
    67         if (res) {
    68                 res->read_proc=read_proc;
    69                 res->data=data;
    70         }
    71         return res;
    72 }
    7361
    7462/* id for pre-allocated buffers */
  • GPL/branches/alsa-resync1/alsa-kernel/core/memory.c

    r92 r206  
    276276            return -EFAULT;
    277277        count -= c;
    278         (char*)dst += c;
    279         (char*)src += c;
     278        dst = (char*)dst + c;
     279        src = (char*)src + c;
    280280    }
    281281    return 0;
     
    307307        memcpy_toio((void*)dst, buf, c);
    308308        count -= c;
    309         (char*)dst += c;
    310         (char*)src += c;
     309        dst = (char*)dst + c;
     310        src = (char*)src + c;
    311311    }
    312312    return 0;
  • GPL/branches/alsa-resync1/alsa-kernel/core/misc.c

    r105 r206  
    4141        return 0;
    4242}
    43 
    44 static void run_workqueue(struct workqueue_struct *wq)
    45 {
    46         unsigned long flags;
    47 
    48         spin_lock_irqsave(&wq->lock, flags);
    49         while (!list_empty(&wq->worklist)) {
    50                 struct work_struct *work = list_entry(wq->worklist.next,
    51                                                       struct work_struct, entry);
    52                 void (*f) (void *) = work->func;
    53                 void *data = work->data;
    54 
    55                 list_del_init(wq->worklist.next);
    56                 spin_unlock_irqrestore(&wq->lock, flags);
    57                 clear_bit(0, &work->pending);
    58                 f(data);
    59                 spin_lock_irqsave(&wq->lock, flags);
    60                 wake_up(&wq->work_done);
    61         }
    62         spin_unlock_irqrestore(&wq->lock, flags);
    63 }
    64 
    65 #if 0
    66 void flush_workqueue(struct workqueue_struct *wq)
    67 {
    68         if (0 /* wq->task == current */) {
    69                 run_workqueue(wq);
    70         } else {
    71                 wait_queue_t wait;
    72 
    73                 init_waitqueue_entry(&wait, current);
    74                 set_current_state(TASK_UNINTERRUPTIBLE);
    75                 spin_lock_irq(&wq->lock);
    76                 add_wait_queue(&wq->work_done, &wait);
    77                 while (!list_empty(&wq->worklist)) {
    78                         spin_unlock_irq(&wq->lock);
    79                         schedule();
    80                         spin_lock_irq(&wq->lock);
    81                 }
    82                 remove_wait_queue(&wq->work_done, &wait);
    83                 spin_unlock_irq(&wq->lock);
    84         }
    85 }
    86 #endif
    8743
    8844void destroy_workqueue(struct workqueue_struct *wq)
     
    9551#endif
    9652        kfree(wq);
    97 }
    98 
    99 static int xworker_thread(void *data)
    100 {
    101         struct workqueue_struct *wq = data;
    102 
    103         strcpy(current->comm, wq->name); /* FIXME: different names? */
    104 
    105         do {
    106             run_workqueue(wq);
    107 #if 0
    108             wait_event_interruptible(wq->more_work, !list_empty(&wq->worklist));
    109 #endif
    110         } while (!signal_pending(current));
    111 #if 0
    112         complete_and_exit(&wq->thread_exited, 0);
    113 #endif
    11453}
    11554
  • GPL/branches/alsa-resync1/alsa-kernel/core/rawmidi.c

    r92 r206  
    1919 *
    2020 */
     21
     22
     23#define INCL_NOPMAPI
     24#include <os2.h>
     25#include <ossdefos2.h>
     26#include <ossidc32.h>
    2127
    2228#include <sound/driver.h>
     
    843849 * Returns the size of read data, or a negative error code on failure.
    844850 */
     851
    845852int snd_rawmidi_receive(snd_rawmidi_substream_t * substream, const unsigned char *buffer, int count)
    846853{
  • GPL/branches/alsa-resync1/alsa-kernel/core/seq/seq_clientmgr.c

    r34 r206  
    21812181
    21822182
    2183 static long snd_seq_ioctl(struct file *file, unsigned int cmd, unsigned long arg)
     2183static int snd_seq_ioctl(struct file *file, unsigned int cmd, unsigned long arg)
    21842184{
    21852185        struct snd_seq_client *client = file->private_data;
  • GPL/branches/alsa-resync1/alsa-kernel/core/seq/seq_timer.c

    r34 r206  
    5555                tick->resolution += s;
    5656        }
    57         if (tick->resolution <= 0)
     57        if (tick->resolution == 0)
    5858                tick->resolution = 1;
    5959        snd_seq_timer_update_tick(tick, 0);
  • GPL/branches/alsa-resync1/alsa-kernel/core/sgbuf.c

    r105 r206  
    3030#define SGBUF_TBL_ALIGN         32
    3131#define sgbuf_align_table(tbl)  ((((tbl) + SGBUF_TBL_ALIGN - 1) / SGBUF_TBL_ALIGN) * SGBUF_TBL_ALIGN)
    32 
    33 /* set up the page table from the given vmalloc'ed buffer pointer.
    34  * return a negative error if the page is out of the pci address mask.
    35  */
    36 static int store_page_tables(struct snd_sg_buf *sgbuf, void *vmaddr, unsigned int pages)
    37 {
    38         unsigned int i;
    39 
    40         sgbuf->pages = 0;
    41         DebugInt3();
    42         for (i = 0; i < pages; i++) {
    43                 struct page *page;
    44                 void *ptr;
    45                 dma_addr_t addr;
    46                 ptr = (void*)virt_to_phys((void*)((char*)vmaddr + (i << PAGE_SHIFT)));
    47 //              ptr = get_vmalloc_addr(vmaddr + (i << PAGE_SHIFT));
    48                 addr = virt_to_bus(ptr);
    49                 page = virt_to_page((int)ptr);
    50 #ifdef DEBUG
    51                 dprintf(("virt mem: %x, phys: %x, addr: %x, page: %x",(char*)vmaddr, (char*)ptr, addr, page));
    52 #endif
    53                 sgbuf->table[i].buf = ptr;
    54                 sgbuf->table[i].addr = addr;
    55                 sgbuf->page_table[i] = page;
    56                 SetPageReserved(page);
    57                 sgbuf->pages++;
    58         }
    59         return 0;
    60 }
    6132
    6233/*
  • GPL/branches/alsa-resync1/alsa-kernel/drivers/dummy.c

    r92 r206  
    234234    bps *= snd_pcm_format_width(runtime->format);
    235235    bps /= 8;
    236     if (bps <= 0)
     236    if (bps == 0)
    237237        return -EINVAL;
    238238    dpcm->pcm_bps = bps;
     
    338338    if (dpcm == NULL)
    339339        return -ENOMEM;
    340     if ((runtime->dma_area = snd_malloc_pages_fallback(MAX_BUFFER_SIZE, GFP_KERNEL, &runtime->dma_bytes)) == NULL) {
     340    if ((runtime->dma_area = snd_malloc_pages_fallback(MAX_BUFFER_SIZE, GFP_KERNEL, (unsigned long *) &runtime->dma_bytes)) == NULL) {
    341341        kfree(dpcm);
    342342        return -ENOMEM;
     
    367367    if (dpcm == NULL)
    368368        return -ENOMEM;
    369     if ((runtime->dma_area = snd_malloc_pages_fallback(MAX_BUFFER_SIZE, GFP_KERNEL, &runtime->dma_bytes)) == NULL) {
     369    if ((runtime->dma_area = snd_malloc_pages_fallback(MAX_BUFFER_SIZE, GFP_KERNEL, (unsigned long *) &runtime->dma_bytes)) == NULL) {
    370370        kfree(dpcm);
    371371        return -ENOMEM;
     
    445445    0, 0, snd_dummy_volume_info, \
    446446    snd_dummy_volume_get, snd_dummy_volume_put, \
     447    0, \
    447448    addr }
    448449
  • GPL/branches/alsa-resync1/alsa-kernel/include/sound/compat_22.h

    r107 r206  
    444444#define up_write(x) up(x)
    445445
    446 /* this is identical with tq_struct but the "routine" field is renamed to "func" */
    447 struct tasklet_struct {
    448         struct tasklet_struct *next;    /* linked list of active bh's */
    449         unsigned long sync;             /* must be initialized to zero */
    450         void (*func)(void *);           /* function to call */
    451         void *data;                     /* argument to function */
    452 };
    453 
    454 #define tasklet_init(t,f,d)     do { \
    455         (t)->next = NULL; \
    456         (t)->sync = 0; \
    457         (t)->func = (void (*)(void *))(f); \
    458         (t)->data = (void *)(d); \
    459 } while (0)
    460 
    461446#define tasklet_unlock_wait(t)  while (test_bit(0, &(t)->sync)) { }
    462447#define tasklet_kill(t)         tasklet_unlock_wait(t) /* FIXME: world is not perfect... */
     
    469454#define __user
    470455#endif
    471 
    472 #include <asm/atomic.h>
    473 #define ATOMIC_INIT(i)  { (i) }
    474 /**
    475  * atomic_dec_and_test - decrement and test
    476  * @v: pointer of type atomic_t
    477  *
    478  * Atomically decrements @v by 1 and
    479  * returns true if the result is 0, or false for all other
    480  * cases.  Note that the guaranteed
    481  * useful range of an atomic_t is only 24 bits.
    482  */
    483 static inline int atomic_dec_and_test(volatile atomic_t *v)
    484 {
    485     atomic_dec(v);
    486     if (v->counter == 0)
    487         return 1;
    488     return 0;
    489 }
    490456
    491457/**
  • GPL/branches/alsa-resync1/alsa-kernel/include/sound/core.h

    r112 r206  
    2525#include <linux/sched.h>                /* wake_up() */
    2626#include <asm/semaphore.h>
     27#include <sound/typedefs.h>
    2728
    2829/* Typedef's */
     
    138139        struct device *dev;
    139140#ifdef CONFIG_PM
    140         int (*pm_suspend)(struct snd_card *card, unsigned int state);
    141         int (*pm_resume)(struct snd_card *card, unsigned int state);
    142         struct pm_dev *pm_dev;          /* for ISA */
     141        int (*pm_suspend)(struct snd_card *card, unsigned int state);
     142        int (*pm_resume)(struct snd_card *card, unsigned int state);
     143        struct pm_dev *pm_dev;          /* for ISA */
    143144        void *pm_private_data;
    144145        unsigned int power_state;       /* power state */
     
    176177        wake_up(&card->power_sleep);
    177178}
    178 int snd_card_set_pm_callback(struct snd_card *card,
    179                              int (*suspend)(struct snd_card *, unsigned int),
    180                              int (*resume)(struct snd_card *, unsigned int),
     179int snd_card_set_pm_callback(snd_card_t *card,
     180                             int (*suspend)(snd_card_t *, unsigned int),
     181                             int (*resume)(snd_card_t *, unsigned int),
    181182                             void *private_data);
    182183int snd_card_set_isa_pm_callback(struct snd_card *card,
     
    293294struct snd_card *snd_card_new(int idx, const char *id,
    294295                         struct module *module, int extra_size);
     296int snd_card_disconnect(struct snd_card *card);
    295297int snd_card_free(struct snd_card *card);
    296298int snd_card_register(struct snd_card *card);
     
    307309int snd_device_register(struct snd_card *card, void *device_data);
    308310int snd_device_register_all(struct snd_card *card);
     311int snd_device_disconnect_all(struct snd_card *card);
    309312int snd_device_free(struct snd_card *card, void *device_data);
    310313int snd_device_free_all(struct snd_card *card, snd_device_cmd_t cmd);
     
    314317#define DMA_MODE_NO_ENABLE      0x0100
    315318
    316 void snd_dma_program(unsigned long dma, unsigned long addr, unsigned int size, unsigned short mode);
     319void snd_dma_program(unsigned long dma, const void *buf, unsigned int size, unsigned short mode);
    317320void snd_dma_disable(unsigned long dma);
    318321unsigned int snd_dma_residue(unsigned long dma);
  • GPL/branches/alsa-resync1/alsa-kernel/include/sound/emu10k1.h

    r84 r206  
    15201520int snd_emu10k1_fx8010_new(struct snd_emu10k1 *emu, int device, struct snd_hwdep ** rhwdep);
    15211521
    1522 irqreturn_t snd_emu10k1_interrupt(int irq, void *dev_id);
     1522irqreturn_t snd_emu10k1_interrupt(int irq, void *dev_id, struct pt_regs *);
    15231523
    15241524void snd_emu10k1_voice_init(struct snd_emu10k1 * emu, int voice);
  • GPL/branches/alsa-resync1/alsa-kernel/isa/opl3sa2.c

    r112 r206  
    226226static unsigned char snd_opl3sa2_read(opl3sa2_t *chip, unsigned char reg)
    227227{
    228         unsigned long flags;
     228        u32 flags;
    229229        unsigned char result;
    230230
     
    325325}
    326326
    327 static void snd_opl3sa2_interrupt(int irq, void *dev_id, struct pt_regs *regs)
     327static int snd_opl3sa2_interrupt(int irq, void *dev_id, struct pt_regs *regs)
    328328{
    329329        unsigned short status;
     
    331331
    332332        if (chip == NULL || chip->card == NULL)
    333                 return;
     333                return 0;
    334334
    335335        status = snd_opl3sa2_read(chip, OPL3SA2_IRQ_STATUS);
     
    353353                }
    354354        }
     355        return 0;
    355356}
    356357
     
    360361  0, 0, snd_opl3sa2_info_single, \
    361362  snd_opl3sa2_get_single, snd_opl3sa2_put_single, \
     363  0, \
    362364  reg | (shift << 8) | (mask << 16) | (invert << 24) }
    363365
     
    427429  0, 0, snd_opl3sa2_info_double, \
    428430  snd_opl3sa2_get_double, snd_opl3sa2_put_double, \
     431  0, \
    429432  left_reg | (right_reg << 8) | (shift_left << 16) | (shift_right << 19) | (mask << 24) | (invert << 22) }
    430433
     
    581584/* Power Management support functions */
    582585#ifdef CONFIG_PM
    583 static void snd_opl3sa2_suspend(opl3sa2_t *chip)
    584 {
    585         snd_card_t *card = chip->card;
    586 
    587         snd_power_lock(card);
    588         if (card->power_state == SNDRV_CTL_POWER_D3hot)
    589                 goto __skip;
    590 
    591         /* FIXME: is this order ok? */
     586static int snd_opl3sa2_suspend(snd_card_t *card, unsigned int state)
     587{
     588        opl3sa2_t *chip = snd_magic_cast(opl3sa2_t, card->pm_private_data, return -EINVAL);
     589
     590        snd_pcm_suspend_all(chip->cs4231->pcm); /* stop before saving regs */
    592591        chip->cs4231_suspend(chip->cs4231);
    593         snd_pcm_suspend_all(chip->cs4231->pcm);
    594592
    595593        /* power down */
     
    597595
    598596        snd_power_change_state(card, SNDRV_CTL_POWER_D3hot);
    599       __skip:
    600         snd_power_unlock(card);
    601 }
    602 
    603 static void snd_opl3sa2_resume(opl3sa2_t *chip)
    604 {
    605         snd_card_t *card = chip->card;
     597        return 0;
     598}
     599
     600static int snd_opl3sa2_resume(snd_card_t *card, unsigned int state)
     601{
     602        opl3sa2_t *chip = snd_magic_cast(opl3sa2_t, card->pm_private_data, return -EINVAL);
    606603        int i;
    607 
    608         snd_power_lock(card);
    609         if (card->power_state == SNDRV_CTL_POWER_D0)
    610                 goto __skip;
    611604
    612605        /* power up */
     
    626619
    627620        snd_power_change_state(card, SNDRV_CTL_POWER_D0);
    628       __skip:
    629         snd_power_unlock(card);
    630 }
    631 
    632 /* callback for control API */
    633 static int snd_opl3sa2_set_power_state(snd_card_t *card, unsigned int power_state)
    634 {
    635         opl3sa2_t *chip = (opl3sa2_t *) card->pm_private_data;
    636         switch (power_state) {
    637         case SNDRV_CTL_POWER_D0:
    638         case SNDRV_CTL_POWER_D1:
    639         case SNDRV_CTL_POWER_D2:
    640                 snd_opl3sa2_resume(chip);
    641                 break;
    642         case SNDRV_CTL_POWER_D3hot:
    643         case SNDRV_CTL_POWER_D3cold:
    644                 snd_opl3sa2_suspend(chip);
    645                 break;
    646         default:
    647                 return -EINVAL;
    648         }
    649         return 0;
    650 }
    651 
    652 static int snd_opl3sa2_pm_callback(struct pm_dev *dev, pm_request_t rqst, void *data)
    653 {
    654         opl3sa2_t *chip = snd_magic_cast(opl3sa2_t, dev->data, return 0);
    655 
    656         switch (rqst) {
    657         case PM_SUSPEND:
    658                 snd_opl3sa2_suspend(chip);
    659                 break;
    660         case PM_RESUME:
    661                 snd_opl3sa2_resume(chip);
    662                 break;
    663         }
    664         return 0;
    665 }
    666 
     621        return 0;
     622}
    667623#endif /* CONFIG_PM */
    668624
  • GPL/branches/alsa-resync1/alsa-kernel/pci/ac97/ac97_codec.c

    r86 r206  
    19311931}
    19321932
     1933#if 0 // fixme to be gone?
    19331934/* stop no dev release warning */
    19341935static void ac97_device_release(struct device * dev)
    19351936{
    19361937}
     1938#endif // fixme to be gone?
    19371939
    19381940/* register ac97 codec to bus */
    19391941static int snd_ac97_dev_register(struct snd_device *device)
    19401942{
    1941 #if 0
     1943#if 0 // fixme to be gone?
    19421944    struct snd_ac97 *ac97 = device->device_data;
    19431945        int err;
     
    19541956                return err;
    19551957        }
    1956 #endif
     1958#endif // fixme to be gone?
    19571959        return 0;
    19581960}
     
    23212323        power |= AC97_PD_PR2 | AC97_PD_PR3;     /* Analog Mixer powerdown */
    23222324        snd_ac97_write(ac97, AC97_POWERDOWN, power);
     2325#ifdef CONFIG_SND_AC97_POWER_SAVE
    23232326        if (ac97_is_power_save_mode(ac97)) {
    23242327            udelay(100);
     
    23282331            snd_ac97_write(ac97, AC97_POWERDOWN, power);
    23292332        }
     2333#endif // CONFIG_SND_AC97_POWER_SAVE
    23302334}
    23312335
  • GPL/branches/alsa-resync1/alsa-kernel/pci/ac97/ac97_patch.c

    r86 r206  
    20812081        unsigned short val;
    20822082
    2083         if (ucontrol->value.enumerated.item[0] > 3
    2084             || ucontrol->value.enumerated.item[0] < 0)
     2083        // if (ucontrol->value.enumerated.item[0] > 3   // 12 Jun 07 SHL
     2084        //    || ucontrol->value.enumerated.item[0] < 0)        // 12 Jun 07 SHL
     2085        if (ucontrol->value.enumerated.item[0] > 3)
    20852086                return -EINVAL;
    20862087        val = ctrl2reg[ucontrol->value.enumerated.item[0]]
  • GPL/branches/alsa-resync1/alsa-kernel/pci/ali5451/ali5451.c

    r92 r206  
    18051805    { SNDRV_CTL_ELEM_IFACE_MIXER, 0,0, xname, xindex,\
    18061806    0, 0, snd_ali5451_spdif_info, snd_ali5451_spdif_get, \
    1807     snd_ali5451_spdif_put, value}
     1807    snd_ali5451_spdif_put, 0, value}
    18081808#else
    18091809#define ALI5451_SPDIF(xname, xindex, value) \
     
    19301930    int err;
    19311931    static ac97_bus_ops_t ops = {
    1932         0,snd_ali_codec_write,
     1932        0,0,
     1933        snd_ali_codec_write,
    19331934        snd_ali_codec_read,0,0
    19341935    };
     
    20382039    if (codec->hw_initialized)
    20392040        snd_ali_disable_address_interrupt(codec);
    2040     if (codec->irq >= 0) {
     2041    // if (codec->irq >= 0) {   // 12 Jun 07 SHL avoid warning
    20412042        synchronize_irq(codec->irq);
    20422043        free_irq(codec->irq, (void *)codec);
    2043     }
     2044    // }        // 12 Jun 07 SHL
    20442045    if (codec->port)
    20452046        pci_release_regions(codec->pci);
  • GPL/branches/alsa-resync1/alsa-kernel/pci/cmipci.c

    r77 r206  
    18421842    0, 0, snd_cmipci_info_volume, \
    18431843    snd_cmipci_get_volume, snd_cmipci_put_volume, \
     1844    0,\
    18441845    COMPOSE_SB_REG(left_reg, right_reg, left_shift, right_shift, mask, invert, stereo), \
    18451846    }
     
    19431944    0, 0, snd_cmipci_info_input_sw, \
    19441945    snd_cmipci_get_input_sw, snd_cmipci_put_input_sw, \
     1946    0, \
    19451947    COMPOSE_SB_REG(SB_DSP4_INPUT_LEFT, SB_DSP4_INPUT_RIGHT, left_shift, right_shift, 1, 0, 1), \
    19461948    }
     
    20072009    0, 0, snd_cmipci_info_native_mixer, \
    20082010    snd_cmipci_get_native_mixer, snd_cmipci_put_native_mixer, \
     2011    0, \
    20092012    COMPOSE_SB_REG(reg, reg, lshift, rshift, 1, invert, 1), \
    20102013    }
     
    20142017    0, 0, snd_cmipci_info_native_mixer, \
    20152018    snd_cmipci_get_native_mixer, snd_cmipci_put_native_mixer, \
     2019    0, \
    20162020    COMPOSE_SB_REG(reg, reg, shift, shift, 1, invert, 0), \
    20172021    }
     
    20212025    0, 0, snd_cmipci_info_native_mixer, \
    20222026    snd_cmipci_get_native_mixer, snd_cmipci_put_native_mixer, \
     2027    0, \
    20232028    COMPOSE_SB_REG(reg, reg, lshift, rshift, mask, 0, 1), \
    20242029    }
     
    20282033    0, 0, snd_cmipci_info_native_mixer, \
    20292034    snd_cmipci_get_native_mixer, snd_cmipci_put_native_mixer, \
     2035    0, \
    20302036    COMPOSE_SB_REG(reg, reg, shift, shift, mask, 0, 0), \
    20312037    }
     
    21282134        snd_cmipci_get_native_mixer_sensitive,
    21292135        snd_cmipci_put_native_mixer_sensitive,
     2136        0,
    21302137        COMPOSE_SB_REG(CM_REG_MIXER1, CM_REG_MIXER1, CM_WSMUTE_SHIFT, CM_WSMUTE_SHIFT, 1, 1, 0),
    21312138    },
     
    23032310    snd_cmipci_uswitch_get, \
    23042311    snd_cmipci_uswitch_put, \
     2312    0, \
    23052313    (unsigned long)&cmipci_switch_arg_##sarg,\
    23062314    }
  • GPL/branches/alsa-resync1/alsa-kernel/pci/cs4281.c

    r77 r206  
    11021102static snd_kcontrol_new_t snd_cs4281_fm_vol =
    11031103{
    1104     /*  .iface = */SNDRV_CTL_ELEM_IFACE_MIXER,0,0,
    1105     /*  .name = */"Synth Playback Volume",0,0,0,
    1106     /*  .info = */snd_cs4281_info_volume,
    1107     /*  .get = */snd_cs4281_get_volume,
    1108     /*  .put = */snd_cs4281_put_volume,
    1109     /*  .private_value = */((BA0_FMLVC << 16) | BA0_FMRVC),
     1104    .iface = SNDRV_CTL_ELEM_IFACE_MIXER,
     1105    .name = "Synth Playback Volume",
     1106    .info = snd_cs4281_info_volume,
     1107    .get = snd_cs4281_get_volume,
     1108    .put = snd_cs4281_put_volume,
     1109    .private_value = ((BA0_FMLVC << 16) | BA0_FMRVC)
    11101110};
    11111111
    11121112static snd_kcontrol_new_t snd_cs4281_pcm_vol =
    11131113{
    1114     /*  .iface = */SNDRV_CTL_ELEM_IFACE_MIXER,0,0,
    1115     /*  .name = */"PCM Stream Playback Volume",0,0,0,
    1116     /*  .info = */snd_cs4281_info_volume,
    1117     /*  .get = */snd_cs4281_get_volume,
    1118     /*  .put = */snd_cs4281_put_volume,
    1119     /*  .private_value = */ ((BA0_PPLVC << 16) | BA0_PPRVC),
     1114    .iface = SNDRV_CTL_ELEM_IFACE_MIXER,
     1115    .name = "PCM Stream Playback Volume",
     1116    .info = snd_cs4281_info_volume,
     1117    .get = snd_cs4281_get_volume,
     1118    .put = snd_cs4281_put_volume,
     1119    .private_value = ((BA0_PPLVC << 16) | BA0_PPRVC)
    11201120};
    11211121
     
    11421142    int err;
    11431143    static ac97_bus_ops_t ops = {
    1144         0,
     1144        0,0,
    11451145        snd_cs4281_ac97_write,
    11461146        snd_cs4281_ac97_read,
     
    19351935
    19361936    if (cmd & OPL3_RIGHT)
    1937         port = (unsigned long)chip->ba0 + BA0_B1AP; /* right port */
     1937        port = (void *)chip->ba0 + BA0_B1AP; /* right port */
    19381938    else
    1939         port = (unsigned long)chip->ba0 + BA0_B0AP; /* left port */
     1939        port = (void *)chip->ba0 + BA0_B0AP; /* left port */
    19401940
    19411941    spin_lock_irqsave(&opl3->reg_lock, flags);
  • GPL/branches/alsa-resync1/alsa-kernel/pci/emu10k1/emu10k1x.c

    r84 r206  
    780780}
    781781
    782 static irqreturn_t snd_emu10k1x_interrupt(int irq, void *dev_id)
     782static irqreturn_t snd_emu10k1x_interrupt(int irq, void *dev_id, struct pt_regs *unused)
    783783{
    784784    unsigned int status;
  • GPL/branches/alsa-resync1/alsa-kernel/pci/emu10k1/emuproc.c

    r34 r206  
    176176
    177177    struct snd_emu10k1 *emu = entry->private_data;
    178     unsigned int val;
     178    unsigned int val = 0;               // 11 Jun 07 SHL fixme to know why not used
    179179    int nefx = emu->audigy ? 64 : 32;
    180180    char **outputs = emu->audigy ? audigy_outs : creative_outs;
  • GPL/branches/alsa-resync1/alsa-kernel/pci/emu10k1/irq.c

    r84 r206  
    3232#include <sound/emu10k1.h>
    3333
    34 irqreturn_t snd_emu10k1_interrupt(int irq, void *dev_id)
     34irqreturn_t snd_emu10k1_interrupt(int irq, void *dev_id, struct pt_regs *notused)
    3535{
    3636    struct snd_emu10k1 *emu = dev_id;
  • GPL/branches/alsa-resync1/alsa-kernel/pci/es1968.c

    r112 r206  
    20532053    int err;
    20542054    static ac97_bus_ops_t ops = {
    2055         0, snd_es1968_ac97_write,
     2055        0, 0, snd_es1968_ac97_write,
    20562056        snd_es1968_ac97_read,0,0
    20572057    };
  • GPL/branches/alsa-resync1/alsa-kernel/pci/fm801.c

    r77 r206  
    10021002{ SNDRV_CTL_ELEM_IFACE_MIXER, 0,0, xname, 0,0,0, snd_fm801_info_single, \
    10031003  snd_fm801_get_single, snd_fm801_put_single, \
    1004   reg | (shift << 8) | (mask << 16) | (invert << 24) }
     1004  0, reg | (shift << 8) | (mask << 16) | (invert << 24) }
    10051005
    10061006static int snd_fm801_info_single(snd_kcontrol_t *kcontrol, snd_ctl_elem_info_t * uinfo)
     
    10471047{ SNDRV_CTL_ELEM_IFACE_MIXER, 0,0, xname, 0,0,0, snd_fm801_info_double, \
    10481048  snd_fm801_get_double, snd_fm801_put_double, \
    1049   reg | (shift_left << 8) | (shift_right << 12) | (mask << 16) | (invert << 24) }
     1049  0, reg | (shift_left << 8) | (shift_right << 12) | (mask << 16) | (invert << 24) }
    10501050
    10511051static int snd_fm801_info_double(snd_kcontrol_t *kcontrol, snd_ctl_elem_info_t * uinfo)
     
    11891189        int err;
    11901190        static ac97_bus_ops_t ops = {
    1191             0, snd_fm801_codec_write,
     1191            0, 0, snd_fm801_codec_write,
    11921192            snd_fm801_codec_read, 0,0
    11931193        };
  • GPL/branches/alsa-resync1/alsa-kernel/pci/hda/hda_intel.c

    r86 r206  
    398398 * Compiler should optimize and eliminate the code if dma_addr_t is 32bit
    399399 */
    400 #define upper_32bit(addr) (sizeof(addr) > 4 ? (u32)((addr) >> 32) : (u32)0)
     400#define upper_32bit(addr) (sizeof(addr) > 4 ? (u32)(((unsigned long long)addr) >> 32) : (u32)0)
    401401
    402402static int azx_acquire_irq(struct azx *chip, int do_disconnect);
  • GPL/branches/alsa-resync1/alsa-kernel/pci/intel8x0.c

    r88 r206  
    32383238}
    32393239
     3240#if 0 // fixme to be gone?
    32403241static void __devexit snd_intel8x0_joystick_remove(struct pci_dev *pci)
    32413242{
     
    32533254    pci_write_config_word(pci, 0xe6, val);
    32543255}
     3256#endif // fixme to be gone
    32553257
    32563258static struct pci_device_id snd_intel8x0_joystick_ids[] = {
  • GPL/branches/alsa-resync1/alsa-kernel/pci/maestro3.c

    r106 r206  
    21342134    int err;
    21352135    static ac97_bus_ops_t ops = {
    2136         0,snd_m3_ac97_write,
    2137         snd_m3_ac97_read,0,0
     2136        .write = snd_m3_ac97_write,
     2137        .read = snd_m3_ac97_read
    21382138    };
    21392139
  • GPL/branches/alsa-resync1/alsa-kernel/pci/trident/trident.c

    r92 r206  
    7979MODULE_DEVICE_TABLE(pci, snd_trident_ids);
    8080
     81// 12 Jun 07 SHL fixme to be in some .h
     82void __devinit snd_trident_gameport(struct snd_trident *chip);
     83
    8184static int __devinit snd_trident_probe(struct pci_dev *pci,
    8285                                       const struct pci_device_id *pci_id)
  • GPL/branches/alsa-resync1/alsa-kernel/pci/trident/trident_main.c

    r106 r206  
    152152
    153153/*---------------------------------------------------------------------------
    154  void snd_trident_codec_write(ac97_t *ac97, unsigned short reg, unsigned short wdata)
     154 void snd_trident_codec_write(ac97_t *ac97, unsigned short reg, unsigned short wdata unsigned short unused)
    155155
    156156 Description: This routine will do all of the writing to the external
     
    23622362    snd_trident_spdif_control_get,
    23632363    snd_trident_spdif_control_put,
     2364    0,
    23642365    0x28,
    23652366};
     
    25742575    snd_trident_ac97_control_get,
    25752576    snd_trident_ac97_control_put,
     2577    0,
    25762578    4,
    25772579};
     
    26302632    snd_trident_vol_control_get,
    26312633    snd_trident_vol_control_put,
    2632     16,
     2634    0,                  // tlv
     2635    16                  // private
    26332636};
    26342637
     
    29472950    int idx, err, retries = 2;
    29482951    static ac97_bus_ops_t ops = {
    2949         0,snd_trident_codec_write,
    2950         snd_trident_codec_read,0,0
     2952        0,              // reset
     2953        0,              // warm_reset
     2954        snd_trident_codec_write,
     2955        snd_trident_codec_read,
     2956        0,              // wait
     2957        0               // init
    29512958    };
    29522959    uctl = kcalloc(1, sizeof(*uctl), GFP_KERNEL);
  • GPL/branches/alsa-resync1/alsa-kernel/pci/via82xx.c

    r85 r206  
    618618 *  Used for 686 and 8233A
    619619 */
    620 static irqreturn_t snd_via686_interrupt(int irq, void *dev_id)
     620static irqreturn_t snd_via686_interrupt(int irq, void *dev_id, struct pt_regs *unused)
    621621{
    622622        struct via82xx *chip = dev_id;
     
    664664 *  Interrupt handler
    665665 */
    666 static irqreturn_t snd_via8233_interrupt(int irq, void *dev_id)
     666static irqreturn_t snd_via8233_interrupt(int irq, void *dev_id,struct pt_regs *unused)
    667667{
    668668        struct via82xx *chip = dev_id;
     
    23112311        if (request_irq(pci->irq,
    23122312                        chip_type == TYPE_VIA8233 ?
    2313                         snd_via8233_interrupt : snd_via686_interrupt,
     2313                          snd_via8233_interrupt : snd_via686_interrupt,
    23142314                        SA_INTERRUPT|SA_SHIRQ,
    23152315                        card->driver, chip)) {
  • GPL/branches/alsa-resync1/alsa-kernel/synth/emux/soundfont.c

    r77 r206  
    142142
    143143        count -= sizeof(patch);
    144         (char*)data += sizeof(patch);
     144        data = (char*)data + sizeof(patch);
    145145
    146146        if (patch.key != SNDRV_OSS_SOUNDFONT_PATCH) {
     
    539539                return -EFAULT;
    540540       
    541         (char*)data += sizeof(hdr);
     541        data = (char*)data + sizeof(hdr);
    542542        count -= sizeof(hdr);
    543543
    544         if (hdr.nvoices <= 0 || hdr.nvoices >= 100) {
     544        if ((signed char)hdr.nvoices <= 0 || hdr.nvoices >= 100) {
    545545                printk("Soundfont error: Illegal voice number %d\n", hdr.nvoices);
    546546                return -EINVAL;
     
    578578                }
    579579
    580                 (char*)data += sizeof(tmpzone.v);
     580                data = (char*)data + sizeof(tmpzone.v);
    581581                count -= sizeof(tmpzone.v);
    582582
Note: See TracChangeset for help on using the changeset viewer.