Changeset 206
- Timestamp:
- Jun 17, 2007, 1:16:58 AM (18 years ago)
- 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 961 961 962 962 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);972 963 } 973 964 -
GPL/branches/alsa-resync1/alsa-kernel/core/info.c
r112 r206 38 38 #include <stdarg.h> 39 39 40 #define min(x,y) (x < y ? x : y )41 42 40 /* 43 41 * 44 42 */ 45 static inline void dec_mod_count(struct module *module)46 {47 if (module)48 __MOD_DEC_USE_COUNT(module);49 }50 43 51 44 int snd_info_check_reserved_words(const char *str) -
GPL/branches/alsa-resync1/alsa-kernel/core/init.c
r100 r206 25 25 #include <linux/slab.h> 26 26 #include <linux/time.h> 27 #include <linux/ctype.h> 27 28 #include <sound/core.h> 28 29 #include <sound/control.h> … … 376 377 } 377 378 id = card->id; 378 while (*spos != '\0' && !isalnum 1(*spos))379 while (*spos != '\0' && !isalnum(*spos)) 379 380 spos++; 380 if (isdigit 1(*spos))381 *id++ = isalpha 1(card->shortname[0]) ? card->shortname[0] : 'D';381 if (isdigit(*spos)) 382 *id++ = isalpha(card->shortname[0]) ? card->shortname[0] : 'D'; 382 383 while (*spos != '\0' && (size_t)(id - card->id) < sizeof(card->id) - 1) { 383 if (isalnum 1(*spos))384 if (isalnum(*spos)) 384 385 *id++ = *spos; 385 386 spos++; … … 605 606 int len = strlen(component); 606 607 607 ptr = strstr 1(card->components, component);608 ptr = strstr(card->components, component); 608 609 if (ptr != NULL) { 609 610 if (ptr[len] == '\0' || ptr[len] == ' ') /* already there */ … … 747 748 * handler and from the control API. 748 749 */ 749 int snd_card_set_pm_callback(s truct snd_card*card,750 int (*suspend)(struct snd_card*, unsigned int),751 int (*resume)(struct snd_card*, unsigned int),750 int 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), 752 753 void *private_data) 753 754 { -
GPL/branches/alsa-resync1/alsa-kernel/core/memalloc.c
r104 r206 25 25 #include <sound/core.h> 26 26 #include <sound/info.h> 27 #include <linux/proc_fs.h> 27 28 #include <sound/memalloc.h> 28 29 … … 58 59 struct list_head list; 59 60 }; 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 }73 61 74 62 /* id for pre-allocated buffers */ -
GPL/branches/alsa-resync1/alsa-kernel/core/memory.c
r92 r206 276 276 return -EFAULT; 277 277 count -= c; 278 (char*)dst +=c;279 (char*)src +=c;278 dst = (char*)dst + c; 279 src = (char*)src + c; 280 280 } 281 281 return 0; … … 307 307 memcpy_toio((void*)dst, buf, c); 308 308 count -= c; 309 (char*)dst +=c;310 (char*)src +=c;309 dst = (char*)dst + c; 310 src = (char*)src + c; 311 311 } 312 312 return 0; -
GPL/branches/alsa-resync1/alsa-kernel/core/misc.c
r105 r206 41 41 return 0; 42 42 } 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 066 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 #endif87 43 88 44 void destroy_workqueue(struct workqueue_struct *wq) … … 95 51 #endif 96 52 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 0108 wait_event_interruptible(wq->more_work, !list_empty(&wq->worklist));109 #endif110 } while (!signal_pending(current));111 #if 0112 complete_and_exit(&wq->thread_exited, 0);113 #endif114 53 } 115 54 -
GPL/branches/alsa-resync1/alsa-kernel/core/rawmidi.c
r92 r206 19 19 * 20 20 */ 21 22 23 #define INCL_NOPMAPI 24 #include <os2.h> 25 #include <ossdefos2.h> 26 #include <ossidc32.h> 21 27 22 28 #include <sound/driver.h> … … 843 849 * Returns the size of read data, or a negative error code on failure. 844 850 */ 851 845 852 int snd_rawmidi_receive(snd_rawmidi_substream_t * substream, const unsigned char *buffer, int count) 846 853 { -
GPL/branches/alsa-resync1/alsa-kernel/core/seq/seq_clientmgr.c
r34 r206 2181 2181 2182 2182 2183 static longsnd_seq_ioctl(struct file *file, unsigned int cmd, unsigned long arg)2183 static int snd_seq_ioctl(struct file *file, unsigned int cmd, unsigned long arg) 2184 2184 { 2185 2185 struct snd_seq_client *client = file->private_data; -
GPL/branches/alsa-resync1/alsa-kernel/core/seq/seq_timer.c
r34 r206 55 55 tick->resolution += s; 56 56 } 57 if (tick->resolution <= 0)57 if (tick->resolution == 0) 58 58 tick->resolution = 1; 59 59 snd_seq_timer_update_tick(tick, 0); -
GPL/branches/alsa-resync1/alsa-kernel/core/sgbuf.c
r105 r206 30 30 #define SGBUF_TBL_ALIGN 32 31 31 #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 DEBUG51 dprintf(("virt mem: %x, phys: %x, addr: %x, page: %x",(char*)vmaddr, (char*)ptr, addr, page));52 #endif53 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 }61 32 62 33 /* -
GPL/branches/alsa-resync1/alsa-kernel/drivers/dummy.c
r92 r206 234 234 bps *= snd_pcm_format_width(runtime->format); 235 235 bps /= 8; 236 if (bps <= 0)236 if (bps == 0) 237 237 return -EINVAL; 238 238 dpcm->pcm_bps = bps; … … 338 338 if (dpcm == NULL) 339 339 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) { 341 341 kfree(dpcm); 342 342 return -ENOMEM; … … 367 367 if (dpcm == NULL) 368 368 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) { 370 370 kfree(dpcm); 371 371 return -ENOMEM; … … 445 445 0, 0, snd_dummy_volume_info, \ 446 446 snd_dummy_volume_get, snd_dummy_volume_put, \ 447 0, \ 447 448 addr } 448 449 -
GPL/branches/alsa-resync1/alsa-kernel/include/sound/compat_22.h
r107 r206 444 444 #define up_write(x) up(x) 445 445 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 461 446 #define tasklet_unlock_wait(t) while (test_bit(0, &(t)->sync)) { } 462 447 #define tasklet_kill(t) tasklet_unlock_wait(t) /* FIXME: world is not perfect... */ … … 469 454 #define __user 470 455 #endif 471 472 #include <asm/atomic.h>473 #define ATOMIC_INIT(i) { (i) }474 /**475 * atomic_dec_and_test - decrement and test476 * @v: pointer of type atomic_t477 *478 * Atomically decrements @v by 1 and479 * returns true if the result is 0, or false for all other480 * cases. Note that the guaranteed481 * 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 }490 456 491 457 /** -
GPL/branches/alsa-resync1/alsa-kernel/include/sound/core.h
r112 r206 25 25 #include <linux/sched.h> /* wake_up() */ 26 26 #include <asm/semaphore.h> 27 #include <sound/typedefs.h> 27 28 28 29 /* Typedef's */ … … 138 139 struct device *dev; 139 140 #ifdef CONFIG_PM 140 141 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 */ 143 144 void *pm_private_data; 144 145 unsigned int power_state; /* power state */ … … 176 177 wake_up(&card->power_sleep); 177 178 } 178 int snd_card_set_pm_callback(s truct snd_card*card,179 int (*suspend)(struct snd_card*, unsigned int),180 int (*resume)(struct snd_card*, unsigned int),179 int 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), 181 182 void *private_data); 182 183 int snd_card_set_isa_pm_callback(struct snd_card *card, … … 293 294 struct snd_card *snd_card_new(int idx, const char *id, 294 295 struct module *module, int extra_size); 296 int snd_card_disconnect(struct snd_card *card); 295 297 int snd_card_free(struct snd_card *card); 296 298 int snd_card_register(struct snd_card *card); … … 307 309 int snd_device_register(struct snd_card *card, void *device_data); 308 310 int snd_device_register_all(struct snd_card *card); 311 int snd_device_disconnect_all(struct snd_card *card); 309 312 int snd_device_free(struct snd_card *card, void *device_data); 310 313 int snd_device_free_all(struct snd_card *card, snd_device_cmd_t cmd); … … 314 317 #define DMA_MODE_NO_ENABLE 0x0100 315 318 316 void snd_dma_program(unsigned long dma, unsigned long addr, unsigned int size, unsigned short mode);319 void snd_dma_program(unsigned long dma, const void *buf, unsigned int size, unsigned short mode); 317 320 void snd_dma_disable(unsigned long dma); 318 321 unsigned int snd_dma_residue(unsigned long dma); -
GPL/branches/alsa-resync1/alsa-kernel/include/sound/emu10k1.h
r84 r206 1520 1520 int snd_emu10k1_fx8010_new(struct snd_emu10k1 *emu, int device, struct snd_hwdep ** rhwdep); 1521 1521 1522 irqreturn_t snd_emu10k1_interrupt(int irq, void *dev_id );1522 irqreturn_t snd_emu10k1_interrupt(int irq, void *dev_id, struct pt_regs *); 1523 1523 1524 1524 void snd_emu10k1_voice_init(struct snd_emu10k1 * emu, int voice); -
GPL/branches/alsa-resync1/alsa-kernel/isa/opl3sa2.c
r112 r206 226 226 static unsigned char snd_opl3sa2_read(opl3sa2_t *chip, unsigned char reg) 227 227 { 228 u nsigned longflags;228 u32 flags; 229 229 unsigned char result; 230 230 … … 325 325 } 326 326 327 static voidsnd_opl3sa2_interrupt(int irq, void *dev_id, struct pt_regs *regs)327 static int snd_opl3sa2_interrupt(int irq, void *dev_id, struct pt_regs *regs) 328 328 { 329 329 unsigned short status; … … 331 331 332 332 if (chip == NULL || chip->card == NULL) 333 return ;333 return 0; 334 334 335 335 status = snd_opl3sa2_read(chip, OPL3SA2_IRQ_STATUS); … … 353 353 } 354 354 } 355 return 0; 355 356 } 356 357 … … 360 361 0, 0, snd_opl3sa2_info_single, \ 361 362 snd_opl3sa2_get_single, snd_opl3sa2_put_single, \ 363 0, \ 362 364 reg | (shift << 8) | (mask << 16) | (invert << 24) } 363 365 … … 427 429 0, 0, snd_opl3sa2_info_double, \ 428 430 snd_opl3sa2_get_double, snd_opl3sa2_put_double, \ 431 0, \ 429 432 left_reg | (right_reg << 8) | (shift_left << 16) | (shift_right << 19) | (mask << 24) | (invert << 22) } 430 433 … … 581 584 /* Power Management support functions */ 582 585 #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? */ 586 static 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 */ 592 591 chip->cs4231_suspend(chip->cs4231); 593 snd_pcm_suspend_all(chip->cs4231->pcm);594 592 595 593 /* power down */ … … 597 595 598 596 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 600 static 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); 606 603 int i; 607 608 snd_power_lock(card);609 if (card->power_state == SNDRV_CTL_POWER_D0)610 goto __skip;611 604 612 605 /* power up */ … … 626 619 627 620 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 } 667 623 #endif /* CONFIG_PM */ 668 624 -
GPL/branches/alsa-resync1/alsa-kernel/pci/ac97/ac97_codec.c
r86 r206 1931 1931 } 1932 1932 1933 #if 0 // fixme to be gone? 1933 1934 /* stop no dev release warning */ 1934 1935 static void ac97_device_release(struct device * dev) 1935 1936 { 1936 1937 } 1938 #endif // fixme to be gone? 1937 1939 1938 1940 /* register ac97 codec to bus */ 1939 1941 static int snd_ac97_dev_register(struct snd_device *device) 1940 1942 { 1941 #if 0 1943 #if 0 // fixme to be gone? 1942 1944 struct snd_ac97 *ac97 = device->device_data; 1943 1945 int err; … … 1954 1956 return err; 1955 1957 } 1956 #endif 1958 #endif // fixme to be gone? 1957 1959 return 0; 1958 1960 } … … 2321 2323 power |= AC97_PD_PR2 | AC97_PD_PR3; /* Analog Mixer powerdown */ 2322 2324 snd_ac97_write(ac97, AC97_POWERDOWN, power); 2325 #ifdef CONFIG_SND_AC97_POWER_SAVE 2323 2326 if (ac97_is_power_save_mode(ac97)) { 2324 2327 udelay(100); … … 2328 2331 snd_ac97_write(ac97, AC97_POWERDOWN, power); 2329 2332 } 2333 #endif // CONFIG_SND_AC97_POWER_SAVE 2330 2334 } 2331 2335 -
GPL/branches/alsa-resync1/alsa-kernel/pci/ac97/ac97_patch.c
r86 r206 2081 2081 unsigned short val; 2082 2082 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) 2085 2086 return -EINVAL; 2086 2087 val = ctrl2reg[ucontrol->value.enumerated.item[0]] -
GPL/branches/alsa-resync1/alsa-kernel/pci/ali5451/ali5451.c
r92 r206 1805 1805 { SNDRV_CTL_ELEM_IFACE_MIXER, 0,0, xname, xindex,\ 1806 1806 0, 0, snd_ali5451_spdif_info, snd_ali5451_spdif_get, \ 1807 snd_ali5451_spdif_put, value}1807 snd_ali5451_spdif_put, 0, value} 1808 1808 #else 1809 1809 #define ALI5451_SPDIF(xname, xindex, value) \ … … 1930 1930 int err; 1931 1931 static ac97_bus_ops_t ops = { 1932 0,snd_ali_codec_write, 1932 0,0, 1933 snd_ali_codec_write, 1933 1934 snd_ali_codec_read,0,0 1934 1935 }; … … 2038 2039 if (codec->hw_initialized) 2039 2040 snd_ali_disable_address_interrupt(codec); 2040 if (codec->irq >= 0) {2041 // if (codec->irq >= 0) { // 12 Jun 07 SHL avoid warning 2041 2042 synchronize_irq(codec->irq); 2042 2043 free_irq(codec->irq, (void *)codec); 2043 }2044 // } // 12 Jun 07 SHL 2044 2045 if (codec->port) 2045 2046 pci_release_regions(codec->pci); -
GPL/branches/alsa-resync1/alsa-kernel/pci/cmipci.c
r77 r206 1842 1842 0, 0, snd_cmipci_info_volume, \ 1843 1843 snd_cmipci_get_volume, snd_cmipci_put_volume, \ 1844 0,\ 1844 1845 COMPOSE_SB_REG(left_reg, right_reg, left_shift, right_shift, mask, invert, stereo), \ 1845 1846 } … … 1943 1944 0, 0, snd_cmipci_info_input_sw, \ 1944 1945 snd_cmipci_get_input_sw, snd_cmipci_put_input_sw, \ 1946 0, \ 1945 1947 COMPOSE_SB_REG(SB_DSP4_INPUT_LEFT, SB_DSP4_INPUT_RIGHT, left_shift, right_shift, 1, 0, 1), \ 1946 1948 } … … 2007 2009 0, 0, snd_cmipci_info_native_mixer, \ 2008 2010 snd_cmipci_get_native_mixer, snd_cmipci_put_native_mixer, \ 2011 0, \ 2009 2012 COMPOSE_SB_REG(reg, reg, lshift, rshift, 1, invert, 1), \ 2010 2013 } … … 2014 2017 0, 0, snd_cmipci_info_native_mixer, \ 2015 2018 snd_cmipci_get_native_mixer, snd_cmipci_put_native_mixer, \ 2019 0, \ 2016 2020 COMPOSE_SB_REG(reg, reg, shift, shift, 1, invert, 0), \ 2017 2021 } … … 2021 2025 0, 0, snd_cmipci_info_native_mixer, \ 2022 2026 snd_cmipci_get_native_mixer, snd_cmipci_put_native_mixer, \ 2027 0, \ 2023 2028 COMPOSE_SB_REG(reg, reg, lshift, rshift, mask, 0, 1), \ 2024 2029 } … … 2028 2033 0, 0, snd_cmipci_info_native_mixer, \ 2029 2034 snd_cmipci_get_native_mixer, snd_cmipci_put_native_mixer, \ 2035 0, \ 2030 2036 COMPOSE_SB_REG(reg, reg, shift, shift, mask, 0, 0), \ 2031 2037 } … … 2128 2134 snd_cmipci_get_native_mixer_sensitive, 2129 2135 snd_cmipci_put_native_mixer_sensitive, 2136 0, 2130 2137 COMPOSE_SB_REG(CM_REG_MIXER1, CM_REG_MIXER1, CM_WSMUTE_SHIFT, CM_WSMUTE_SHIFT, 1, 1, 0), 2131 2138 }, … … 2303 2310 snd_cmipci_uswitch_get, \ 2304 2311 snd_cmipci_uswitch_put, \ 2312 0, \ 2305 2313 (unsigned long)&cmipci_switch_arg_##sarg,\ 2306 2314 } -
GPL/branches/alsa-resync1/alsa-kernel/pci/cs4281.c
r77 r206 1102 1102 static snd_kcontrol_new_t snd_cs4281_fm_vol = 1103 1103 { 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) 1110 1110 }; 1111 1111 1112 1112 static snd_kcontrol_new_t snd_cs4281_pcm_vol = 1113 1113 { 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) 1120 1120 }; 1121 1121 … … 1142 1142 int err; 1143 1143 static ac97_bus_ops_t ops = { 1144 0, 1144 0,0, 1145 1145 snd_cs4281_ac97_write, 1146 1146 snd_cs4281_ac97_read, … … 1935 1935 1936 1936 if (cmd & OPL3_RIGHT) 1937 port = ( unsigned long)chip->ba0 + BA0_B1AP; /* right port */1937 port = (void *)chip->ba0 + BA0_B1AP; /* right port */ 1938 1938 else 1939 port = ( unsigned long)chip->ba0 + BA0_B0AP; /* left port */1939 port = (void *)chip->ba0 + BA0_B0AP; /* left port */ 1940 1940 1941 1941 spin_lock_irqsave(&opl3->reg_lock, flags); -
GPL/branches/alsa-resync1/alsa-kernel/pci/emu10k1/emu10k1x.c
r84 r206 780 780 } 781 781 782 static irqreturn_t snd_emu10k1x_interrupt(int irq, void *dev_id )782 static irqreturn_t snd_emu10k1x_interrupt(int irq, void *dev_id, struct pt_regs *unused) 783 783 { 784 784 unsigned int status; -
GPL/branches/alsa-resync1/alsa-kernel/pci/emu10k1/emuproc.c
r34 r206 176 176 177 177 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 179 179 int nefx = emu->audigy ? 64 : 32; 180 180 char **outputs = emu->audigy ? audigy_outs : creative_outs; -
GPL/branches/alsa-resync1/alsa-kernel/pci/emu10k1/irq.c
r84 r206 32 32 #include <sound/emu10k1.h> 33 33 34 irqreturn_t snd_emu10k1_interrupt(int irq, void *dev_id )34 irqreturn_t snd_emu10k1_interrupt(int irq, void *dev_id, struct pt_regs *notused) 35 35 { 36 36 struct snd_emu10k1 *emu = dev_id; -
GPL/branches/alsa-resync1/alsa-kernel/pci/es1968.c
r112 r206 2053 2053 int err; 2054 2054 static ac97_bus_ops_t ops = { 2055 0, snd_es1968_ac97_write,2055 0, 0, snd_es1968_ac97_write, 2056 2056 snd_es1968_ac97_read,0,0 2057 2057 }; -
GPL/branches/alsa-resync1/alsa-kernel/pci/fm801.c
r77 r206 1002 1002 { SNDRV_CTL_ELEM_IFACE_MIXER, 0,0, xname, 0,0,0, snd_fm801_info_single, \ 1003 1003 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) } 1005 1005 1006 1006 static int snd_fm801_info_single(snd_kcontrol_t *kcontrol, snd_ctl_elem_info_t * uinfo) … … 1047 1047 { SNDRV_CTL_ELEM_IFACE_MIXER, 0,0, xname, 0,0,0, snd_fm801_info_double, \ 1048 1048 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) } 1050 1050 1051 1051 static int snd_fm801_info_double(snd_kcontrol_t *kcontrol, snd_ctl_elem_info_t * uinfo) … … 1189 1189 int err; 1190 1190 static ac97_bus_ops_t ops = { 1191 0, snd_fm801_codec_write,1191 0, 0, snd_fm801_codec_write, 1192 1192 snd_fm801_codec_read, 0,0 1193 1193 }; -
GPL/branches/alsa-resync1/alsa-kernel/pci/hda/hda_intel.c
r86 r206 398 398 * Compiler should optimize and eliminate the code if dma_addr_t is 32bit 399 399 */ 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) 401 401 402 402 static int azx_acquire_irq(struct azx *chip, int do_disconnect); -
GPL/branches/alsa-resync1/alsa-kernel/pci/intel8x0.c
r88 r206 3238 3238 } 3239 3239 3240 #if 0 // fixme to be gone? 3240 3241 static void __devexit snd_intel8x0_joystick_remove(struct pci_dev *pci) 3241 3242 { … … 3253 3254 pci_write_config_word(pci, 0xe6, val); 3254 3255 } 3256 #endif // fixme to be gone 3255 3257 3256 3258 static struct pci_device_id snd_intel8x0_joystick_ids[] = { -
GPL/branches/alsa-resync1/alsa-kernel/pci/maestro3.c
r106 r206 2134 2134 int err; 2135 2135 static ac97_bus_ops_t ops = { 2136 0,snd_m3_ac97_write,2137 snd_m3_ac97_read,0,02136 .write = snd_m3_ac97_write, 2137 .read = snd_m3_ac97_read 2138 2138 }; 2139 2139 -
GPL/branches/alsa-resync1/alsa-kernel/pci/trident/trident.c
r92 r206 79 79 MODULE_DEVICE_TABLE(pci, snd_trident_ids); 80 80 81 // 12 Jun 07 SHL fixme to be in some .h 82 void __devinit snd_trident_gameport(struct snd_trident *chip); 83 81 84 static int __devinit snd_trident_probe(struct pci_dev *pci, 82 85 const struct pci_device_id *pci_id) -
GPL/branches/alsa-resync1/alsa-kernel/pci/trident/trident_main.c
r106 r206 152 152 153 153 /*--------------------------------------------------------------------------- 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) 155 155 156 156 Description: This routine will do all of the writing to the external … … 2362 2362 snd_trident_spdif_control_get, 2363 2363 snd_trident_spdif_control_put, 2364 0, 2364 2365 0x28, 2365 2366 }; … … 2574 2575 snd_trident_ac97_control_get, 2575 2576 snd_trident_ac97_control_put, 2577 0, 2576 2578 4, 2577 2579 }; … … 2630 2632 snd_trident_vol_control_get, 2631 2633 snd_trident_vol_control_put, 2632 16, 2634 0, // tlv 2635 16 // private 2633 2636 }; 2634 2637 … … 2947 2950 int idx, err, retries = 2; 2948 2951 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 2951 2958 }; 2952 2959 uctl = kcalloc(1, sizeof(*uctl), GFP_KERNEL); -
GPL/branches/alsa-resync1/alsa-kernel/pci/via82xx.c
r85 r206 618 618 * Used for 686 and 8233A 619 619 */ 620 static irqreturn_t snd_via686_interrupt(int irq, void *dev_id )620 static irqreturn_t snd_via686_interrupt(int irq, void *dev_id, struct pt_regs *unused) 621 621 { 622 622 struct via82xx *chip = dev_id; … … 664 664 * Interrupt handler 665 665 */ 666 static irqreturn_t snd_via8233_interrupt(int irq, void *dev_id )666 static irqreturn_t snd_via8233_interrupt(int irq, void *dev_id,struct pt_regs *unused) 667 667 { 668 668 struct via82xx *chip = dev_id; … … 2311 2311 if (request_irq(pci->irq, 2312 2312 chip_type == TYPE_VIA8233 ? 2313 snd_via8233_interrupt :snd_via686_interrupt,2313 snd_via8233_interrupt : snd_via686_interrupt, 2314 2314 SA_INTERRUPT|SA_SHIRQ, 2315 2315 card->driver, chip)) { -
GPL/branches/alsa-resync1/alsa-kernel/synth/emux/soundfont.c
r77 r206 142 142 143 143 count -= sizeof(patch); 144 (char*)data +=sizeof(patch);144 data = (char*)data + sizeof(patch); 145 145 146 146 if (patch.key != SNDRV_OSS_SOUNDFONT_PATCH) { … … 539 539 return -EFAULT; 540 540 541 (char*)data +=sizeof(hdr);541 data = (char*)data + sizeof(hdr); 542 542 count -= sizeof(hdr); 543 543 544 if ( hdr.nvoices <= 0 || hdr.nvoices >= 100) {544 if ((signed char)hdr.nvoices <= 0 || hdr.nvoices >= 100) { 545 545 printk("Soundfont error: Illegal voice number %d\n", hdr.nvoices); 546 546 return -EINVAL; … … 578 578 } 579 579 580 (char*)data +=sizeof(tmpzone.v);580 data = (char*)data + sizeof(tmpzone.v); 581 581 count -= sizeof(tmpzone.v); 582 582
Note:
See TracChangeset
for help on using the changeset viewer.