Changeset 262 for GPL/branches
- Timestamp:
- Oct 18, 2007, 6:38:12 AM (18 years ago)
- Location:
- GPL/branches/alsa-resync1/alsa-kernel
- Files:
-
- 40 edited
Legend:
- Unmodified
- Added
- Removed
-
GPL/branches/alsa-resync1/alsa-kernel/core/control.c
r250 r262 49 49 static int snd_ctl_open(struct inode *inode, struct file *file) 50 50 { 51 int cardnum = SNDRV_MINOR_CARD( minor(inode->i_rdev));51 int cardnum = SNDRV_MINOR_CARD(iminor(inode)); 52 52 unsigned long flags; 53 53 struct snd_card *card; -
GPL/branches/alsa-resync1/alsa-kernel/core/hwdep.c
r224 r262 74 74 static int snd_hwdep_open(struct inode *inode, struct file * file) 75 75 { 76 int major = major(inode->i_rdev);76 int major = imajor(inode); 77 77 int cardnum; 78 78 int device; … … 83 83 switch (major) { 84 84 case CONFIG_SND_MAJOR: 85 cardnum = SNDRV_MINOR_CARD( minor(inode->i_rdev));86 device = SNDRV_MINOR_DEVICE( minor(inode->i_rdev)) - SNDRV_MINOR_HWDEP;85 cardnum = SNDRV_MINOR_CARD(iminor(inode)); 86 device = SNDRV_MINOR_DEVICE(iminor(inode)) - SNDRV_MINOR_HWDEP; 87 87 break; 88 88 #ifdef CONFIG_SND_OSSEMUL 89 89 case SOUND_MAJOR: 90 cardnum = SNDRV_MINOR_OSS_CARD( minor(inode->i_rdev));90 cardnum = SNDRV_MINOR_OSS_CARD(iminor(inode)); 91 91 device = 0; 92 92 break; -
GPL/branches/alsa-resync1/alsa-kernel/core/pcm_native.c
r250 r262 21 21 22 22 #include <sound/driver.h> 23 #include <linux/version.h>24 23 #include <linux/mm.h> 25 24 #include <linux/file.h> … … 1568 1567 inode = file->f_dentry->d_inode; 1569 1568 if (!S_ISCHR(inode->i_mode) || 1570 major(inode->i_rdev) != snd_major) {1569 imajor(inode) != snd_major) { 1571 1570 fput(file); 1572 1571 return 0; 1573 1572 } 1574 minor = minor(inode->i_rdev);1573 minor = iminor(inode); 1575 1574 if (minor >= 256 || 1576 1575 minor % SNDRV_MINOR_DEVICES < SNDRV_MINOR_PCM_PLAYBACK) { … … 2105 2104 int snd_pcm_open(struct inode *inode, struct file *file) 2106 2105 { 2107 int cardnum = SNDRV_MINOR_CARD( minor(inode->i_rdev));2108 int device = SNDRV_MINOR_DEVICE( minor(inode->i_rdev));2106 int cardnum = SNDRV_MINOR_CARD(iminor(inode)); 2107 int device = SNDRV_MINOR_DEVICE(iminor(inode)); 2109 2108 int err; 2110 2109 snd_pcm_t *pcm; -
GPL/branches/alsa-resync1/alsa-kernel/core/rawmidi.c
r250 r262 358 358 static int snd_rawmidi_open(struct inode *inode, struct file *file) 359 359 { 360 int maj = major(inode->i_rdev);360 int maj = imajor(inode); 361 361 int cardnum; 362 362 snd_card_t *card; -
GPL/branches/alsa-resync1/alsa-kernel/core/sound.c
r250 r262 21 21 22 22 #include <sound/driver.h> 23 #include <linux/version.h>24 23 #include <linux/init.h> 25 24 #include <linux/slab.h> … … 128 127 static int snd_open(struct inode *inode, struct file *file) 129 128 { 130 int minor = minor(inode->i_rdev);129 int minor = iminor(inode); 131 130 int card = SNDRV_MINOR_CARD(minor); 132 131 int dev = SNDRV_MINOR_DEVICE(minor); -
GPL/branches/alsa-resync1/alsa-kernel/drivers/dummy.c
r260 r262 20 20 21 21 #include <sound/driver.h> 22 #include <linux/version.h>23 22 #include <linux/init.h> 24 23 #ifndef TARGET_OS2 //TODO: Implement linux/jiffies.h -
GPL/branches/alsa-resync1/alsa-kernel/include/sound/adriver.h
r250 r262 116 116 #define minor(x) MINOR(x) 117 117 #endif 118 #ifndef imajor 119 #define imajor(x) major((x)->i_rdev) 120 #endif 121 #ifndef iminor 122 #define iminor(x) minor((x)->i_rdev) 123 #endif 118 124 #ifndef mk_kdev 119 125 #define mk_kdev(maj, min) MKDEV(maj, min) … … 128 134 #define need_resched() (current->need_resched) 129 135 #endif 130 #if LINUX_VERSION_CODE < KERNEL_VERSION(2, 5, 4) && !defined TARGET_OS2136 #if LINUX_VERSION_CODE < KERNEL_VERSION(2, 5, 4) && !defined(WE_ARE_WOLK) && !defined TARGET_OS2 131 137 #include <linux/fs.h> 132 138 static inline struct proc_dir_entry *PDE(const struct inode *inode) -
GPL/branches/alsa-resync1/alsa-kernel/include/sound/compat_22.h
r250 r262 280 280 }; 281 281 282 #ifndef PCI_OLD_SUSPEND283 #define PCI_OLD_SUSPEND284 #endif285 286 282 struct pci_driver { 287 283 struct list_head node; -
GPL/branches/alsa-resync1/alsa-kernel/include/sound/hdsp.h
r250 r262 69 69 70 70 struct _snd_hdsp_firmware { 71 unsigned long firmware_data[24413];71 unsigned long *firmware_data; /* 24413 long words */ 72 72 }; 73 73 -
GPL/branches/alsa-resync1/alsa-kernel/include/sound/pcm_oss.h
r260 r262 52 52 size_t period_bytes; /* requested period size */ 53 53 unsigned int periods; 54 size_t buffer_bytes; /* requested periodsize */54 size_t buffer_bytes; /* requested buffer size */ 55 55 size_t bytes; /* total # bytes processed */ 56 56 size_t mmap_bytes; 57 57 char *buffer; /* vmallocated period */ 58 size_t buffer_used; /* used length from buffer */58 size_t buffer_used; /* used length from period buffer */ 59 59 snd_pcm_plugin_t *plugin_first; 60 60 snd_pcm_plugin_t *plugin_last; -
GPL/branches/alsa-resync1/alsa-kernel/include/sound/sscape_ioctl.h
r212 r262 11 11 struct sscape_microcode 12 12 { 13 unsigned char code[65536];13 unsigned char *code; /* 65536 chars */ 14 14 }; 15 15 16 16 #define SND_SSCAPE_LOAD_BOOTB _IOWR('P', 100, struct sscape_bootblock) 17 #define SND_SSCAPE_LOAD_MCODE _IOW ('P', 101, struct sscape_microcode)17 #define SND_SSCAPE_LOAD_MCODE _IOW ('P', 101, struct sscape_microcode) 18 18 19 19 #endif -
GPL/branches/alsa-resync1/alsa-kernel/include/sound/version.h
r260 r262 1 /* include/version.h. Generated by configure. */2 #define CONFIG_SND_VERSION "0.9. 6"1 /* include/version.h. Generated automatically by configure. */ 2 #define CONFIG_SND_VERSION "0.9.7" 3 3 #define CONFIG_SND_DATE "" -
GPL/branches/alsa-resync1/alsa-kernel/isa/ad1816a/ad1816a.c
r246 r262 94 94 }; 95 95 96 static struct pnp_card_device_id snd_ad1816a_pnpids[] __devinitdata= {96 static struct pnp_card_device_id snd_ad1816a_pnpids[] = { 97 97 /* Analog Devices AD1815 */ 98 98 { .id = "ADS7150", .devs = { { .id = "ADS7150" }, { .id = "ADS7151" } } }, -
GPL/branches/alsa-resync1/alsa-kernel/isa/als100.c
r246 r262 99 99 }; 100 100 101 static struct pnp_card_device_id snd_als100_pnpids[] __devinitdata= {101 static struct pnp_card_device_id snd_als100_pnpids[] = { 102 102 /* ALS100 - PRO16PNP */ 103 103 { .id = "ALS0001", .devs = { { "@@@0001" }, { "@X@0001" }, { "@H@0001" } } }, -
GPL/branches/alsa-resync1/alsa-kernel/isa/azt2320.c
r250 r262 110 110 }; 111 111 112 static struct pnp_card_device_id snd_azt2320_pnpids[] __devinitdata= {112 static struct pnp_card_device_id snd_azt2320_pnpids[] = { 113 113 /* PRO16V */ 114 114 { .id = "AZT1008", .devs = { { "AZT1008" }, { "AZT2001" }, } }, -
GPL/branches/alsa-resync1/alsa-kernel/isa/cmi8330.c
r260 r262 177 177 #ifdef CONFIG_PNP 178 178 179 static struct pnp_card_device_id snd_cmi8330_pnpids[] __devinitdata= {179 static struct pnp_card_device_id snd_cmi8330_pnpids[] = { 180 180 { .id = "CMI0001", .devs = { { "@@@0001" }, { "@X@0001" } } }, 181 181 { .id = "" } -
GPL/branches/alsa-resync1/alsa-kernel/isa/cs423x/cs4236.c
r250 r262 202 202 203 203 #ifdef CS4232 204 static struct pnp_card_device_id snd_cs423x_pnpids[] __devinitdata= {204 static struct pnp_card_device_id snd_cs423x_pnpids[] = { 205 205 /* Philips PCA70PS */ 206 206 { .id = "CSC0d32", .devs = { { "CSC0000" }, { "CSC0010" }, { "PNPb006" } } }, … … 221 221 }; 222 222 #else /* CS4236 */ 223 static struct pnp_card_device_id snd_cs423x_pnpids[] __devinitdata= {223 static struct pnp_card_device_id snd_cs423x_pnpids[] = { 224 224 /* Intel Marlin Spike Motherboard - CS4235 */ 225 225 { .id = "CSC0225", .devs = { { "CSC0000" }, { "CSC0010" }, { "CSC0003" } } }, … … 553 553 irq[dev], 554 554 dma1[dev]); 555 if (dma 1[dev] >= 0)555 if (dma2[dev] >= 0) 556 556 sprintf(card->longname + strlen(card->longname), "&%d", dma2[dev]); 557 557 if ((err = snd_card_register(card)) < 0) { -
GPL/branches/alsa-resync1/alsa-kernel/isa/dt019x.c
r250 r262 89 89 }; 90 90 91 static struct pnp_card_device_id snd_dt019x_pnpids[] __devinitdata= {91 static struct pnp_card_device_id snd_dt019x_pnpids[] = { 92 92 /* DT197A30 */ 93 93 { .id = "RWB1688", .devs = { { "@@@0001" }, { "@X@0001" }, { "@H@0001" }, } }, -
GPL/branches/alsa-resync1/alsa-kernel/isa/es18xx.c
r260 r262 1948 1948 #ifdef CONFIG_PNP 1949 1949 1950 static struct pnp_card_device_id snd_audiodrive_pnpids[] __devinitdata= {1950 static struct pnp_card_device_id snd_audiodrive_pnpids[] = { 1951 1951 /* ESS 1868 (integrated on Compaq dual P-Pro motherboard and Genius 18PnP 3D) */ 1952 1952 { .id = "ESS1868", .devs = { { "ESS1868" }, { "ESS0000" } } }, -
GPL/branches/alsa-resync1/alsa-kernel/isa/gus/gusclassic.c
r212 r262 197 197 } 198 198 if (gus->max_flag || gus->ess_flag) { 199 snd_card_free(card);200 199 snd_printdd("GUS Classic or ACE soundcard was not detected at 0x%lx\n", gus->gf1.port); 200 snd_card_free(card); 201 201 return -ENODEV; 202 202 } -
GPL/branches/alsa-resync1/alsa-kernel/isa/gus/gusextreme.c
r212 r262 297 297 } 298 298 if (!gus->ess_flag) { 299 snd_card_free(card);300 299 snd_printdd("GUS Extreme soundcard was not detected at 0x%lx\n", gus->gf1.port); 300 snd_card_free(card); 301 301 return -ENODEV; 302 302 } -
GPL/branches/alsa-resync1/alsa-kernel/isa/gus/gusmax.c
r246 r262 301 301 } 302 302 if (!gus->max_flag) { 303 snd_card_free(card);304 303 printk(KERN_ERR "GUS MAX soundcard was not detected at 0x%lx\n", gus->gf1.port); 304 snd_card_free(card); 305 305 return -ENODEV; 306 306 } -
GPL/branches/alsa-resync1/alsa-kernel/isa/gus/interwave.c
r250 r262 151 151 #ifdef CONFIG_PNP 152 152 153 static struct pnp_card_device_id snd_interwave_pnpids[] __devinitdata= {153 static struct pnp_card_device_id snd_interwave_pnpids[] = { 154 154 #ifndef SNDRV_STB 155 155 /* Gravis UltraSound Plug & Play */ -
GPL/branches/alsa-resync1/alsa-kernel/isa/opl3sa2.c
r256 r262 170 170 #ifdef CONFIG_PNP 171 171 172 static struct pnp_card_device_id snd_opl3sa2_pnpids[] __devinitdata= {172 static struct pnp_card_device_id snd_opl3sa2_pnpids[] = { 173 173 /* Yamaha YMF719E-S (Genius Sound Maker 3DX) */ 174 174 { .id = "YMH0020", .devs = { { "YMH0021" } } }, … … 721 721 goto __error; 722 722 } 723 spin_lock_init(&chip->reg_lock); 723 724 chip->irq = -1; 724 725 if ((err = snd_device_new(card, SNDRV_DEV_LOWLEVEL, chip, &ops)) < 0) -
GPL/branches/alsa-resync1/alsa-kernel/isa/sb/emu8000.c
r250 r262 660 660 soundfont_chorus_fx_t rec; 661 661 if (mode < SNDRV_EMU8000_CHORUS_PREDEFINED || mode >= SNDRV_EMU8000_CHORUS_NUMBERS) { 662 snd_printk(KERN_WARNING "i llegalchorus mode %d for uploading\n", mode);662 snd_printk(KERN_WARNING "invalid chorus mode %d for uploading\n", mode); 663 663 return -EINVAL; 664 664 } … … 788 788 789 789 if (mode < SNDRV_EMU8000_REVERB_PREDEFINED || mode >= SNDRV_EMU8000_REVERB_NUMBERS) { 790 snd_printk(KERN_WARNING "i llegalreverb mode %d for uploading\n", mode);790 snd_printk(KERN_WARNING "invalid reverb mode %d for uploading\n", mode); 791 791 return -EINVAL; 792 792 } -
GPL/branches/alsa-resync1/alsa-kernel/isa/sb/es968.c
r250 r262 70 70 }; 71 71 72 static struct pnp_card_device_id snd_es968_pnpids[] __devinitdata= {72 static struct pnp_card_device_id snd_es968_pnpids[] = { 73 73 { .id = "ESS0968", .devs = { { "@@@0968" }, } }, 74 74 { .id = "", } /* end */ -
GPL/branches/alsa-resync1/alsa-kernel/isa/sb/sb16.c
r260 r262 176 176 static snd_card_t *snd_sb16_legacy[SNDRV_CARDS] = SNDRV_DEFAULT_PTR; 177 177 178 static struct pnp_card_device_id snd_sb16_pnpids[] __devinitdata= {178 static struct pnp_card_device_id snd_sb16_pnpids[] = { 179 179 #ifndef SNDRV_SBAWE 180 180 /* Sound Blaster 16 PnP */ -
GPL/branches/alsa-resync1/alsa-kernel/isa/wavefront/wavefront.c
r250 r262 103 103 #ifdef CONFIG_PNP 104 104 105 static struct pnp_card_device_id snd_wavefront_pnpids[] __devinitdata= {105 static struct pnp_card_device_id snd_wavefront_pnpids[] = { 106 106 /* Tropez */ 107 107 { .id = "CSC7532", .devs = { { "CSC0000" }, { "CSC0010" }, { "PnPb006" }, { "CSC0004" } } }, -
GPL/branches/alsa-resync1/alsa-kernel/pci/cmipci.c
r210 r262 2645 2645 } 2646 2646 2647 static struct pci_device_id snd_cmipci_ids[] __devinitdata= {2647 static struct pci_device_id snd_cmipci_ids[] = { 2648 2648 {PCI_VENDOR_ID_CMEDIA, PCI_DEVICE_ID_CMEDIA_CM8338A, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0}, 2649 2649 {PCI_VENDOR_ID_CMEDIA, PCI_DEVICE_ID_CMEDIA_CM8338B, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0}, -
GPL/branches/alsa-resync1/alsa-kernel/pci/es1968.c
r250 r262 1598 1598 esschan_t *es; 1599 1599 int apu1; 1600 unsigned long flags; 1600 1601 1601 1602 /* search 2 APUs */ … … 1617 1618 es->substream = substream; 1618 1619 es->mode = ESM_MODE_PLAY; 1619 INIT_LIST_HEAD(&es->list);1620 1620 1621 1621 runtime->private_data = es; … … 1640 1640 esschan_t *es; 1641 1641 int apu1, apu2; 1642 unsigned long flags; 1642 1643 1643 1644 apu1 = snd_es1968_alloc_apu_pair(chip, ESM_APU_PCM_CAPTURE); … … 1669 1670 es->substream = substream; 1670 1671 es->mode = ESM_MODE_CAPTURE; 1671 INIT_LIST_HEAD(&es->list);1672 1672 1673 1673 /* get mixbuffer */ … … 1699 1699 es1968_t *chip = snd_pcm_substream_chip(substream); 1700 1700 esschan_t *es; 1701 unsigned long flags; 1701 1702 1702 1703 if (substream->runtime->private_data == NULL) … … 1716 1717 es1968_t *chip = snd_pcm_substream_chip(substream); 1717 1718 esschan_t *es; 1719 unsigned long flags; 1718 1720 1719 1721 if (substream->runtime->private_data == NULL) … … 2016 2018 2017 2019 if (event & ESM_SOUND_IRQ) { 2018 struct list_head *p , *n;2020 struct list_head *p; 2019 2021 spin_lock(&chip->substream_lock); 2020 /* we need to use list_for_each_safe here since the substream 2021 * can be deleted in period_elapsed(). 2022 */ 2023 list_for_each_safe(p, n, &chip->substream_list) { 2022 list_for_each(p, &chip->substream_list) { 2024 2023 esschan_t *es = list_entry(p, esschan_t, list); 2025 2024 if (es->running) -
GPL/branches/alsa-resync1/alsa-kernel/pci/ice1712/aureon.c
r250 r262 458 458 0x80, /* ACLINK: I2S */ 459 459 0xf8, /* I2S: vol, 96k, 24bit, 192k */ 460 0xc 2, /* SPDIF: out-en, out-int, spdif-in */460 0xc3, /* SPDIF: out-en, out-int, spdif-in */ 461 461 0xff, /* GPIO_DIR */ 462 462 0xff, /* GPIO_DIR1 */ … … 474 474 0x80, /* ACLINK: I2S */ 475 475 0xf8, /* I2S: vol, 96k, 24bit, 192k */ 476 0xc 2, /* SPDIF: out-en, out-int, spdif-in */476 0xc3, /* SPDIF: out-en, out-int, spdif-in */ 477 477 0xff, /* GPIO_DIR */ 478 478 0xff, /* GPIO_DIR1 */ -
GPL/branches/alsa-resync1/alsa-kernel/pci/ice1712/ice1712.c
r250 r262 104 104 #endif 105 105 106 static struct pci_device_id snd_ice1712_ids[] __devinitdata= {106 static struct pci_device_id snd_ice1712_ids[] = { 107 107 { PCI_VENDOR_ID_ICE, PCI_DEVICE_ID_ICE_1712, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0 }, /* ICE1712 */ 108 108 { 0, } … … 114 114 static int snd_ice1712_build_controls(ice1712_t *ice); 115 115 116 static int PRO_RATE_LOCKED = 0;116 static int PRO_RATE_LOCKED; 117 117 static int PRO_RATE_RESET = 1; 118 118 static unsigned int PRO_RATE_DEFAULT = 44100; … … 2388 2388 2389 2389 if ((ice->res_port = request_region(ice->port, 32, "ICE1712 - Controller")) == NULL) { 2390 snd_printk("unable to grab ports 0x%lx-0x%lx\n", ice->port, ice->port + 32 - 1); 2390 2391 snd_ice1712_free(ice); 2391 snd_printk("unable to grab ports 0x%lx-0x%lx\n", ice->port, ice->port + 32 - 1);2392 2392 return -EIO; 2393 2393 } 2394 2394 if ((ice->res_ddma_port = request_region(ice->ddma_port, 16, "ICE1712 - DDMA")) == NULL) { 2395 snd_printk("unable to grab ports 0x%lx-0x%lx\n", ice->ddma_port, ice->ddma_port + 16 - 1); 2395 2396 snd_ice1712_free(ice); 2396 snd_printk("unable to grab ports 0x%lx-0x%lx\n", ice->ddma_port, ice->ddma_port + 16 - 1);2397 2397 return -EIO; 2398 2398 } 2399 2399 if ((ice->res_dmapath_port = request_region(ice->dmapath_port, 16, "ICE1712 - DMA path")) == NULL) { 2400 snd_printk("unable to grab ports 0x%lx-0x%lx\n", ice->dmapath_port, ice->dmapath_port + 16 - 1); 2400 2401 snd_ice1712_free(ice); 2401 snd_printk("unable to grab ports 0x%lx-0x%lx\n", ice->dmapath_port, ice->dmapath_port + 16 - 1);2402 2402 return -EIO; 2403 2403 } 2404 2404 if ((ice->res_profi_port = request_region(ice->profi_port, 64, "ICE1712 - Professional")) == NULL) { 2405 snd_printk("unable to grab ports 0x%lx-0x%lx\n", ice->profi_port, ice->profi_port + 16 - 1); 2405 2406 snd_ice1712_free(ice); 2406 snd_printk("unable to grab ports 0x%lx-0x%lx\n", ice->profi_port, ice->profi_port + 16 - 1);2407 2407 return -EIO; 2408 2408 } 2409 2409 if (request_irq(pci->irq, snd_ice1712_interrupt, SA_INTERRUPT|SA_SHIRQ, "ICE1712", (void *) ice)) { 2410 snd_printk("unable to grab IRQ %d\n", pci->irq); 2410 2411 snd_ice1712_free(ice); 2411 snd_printk("unable to grab IRQ %d\n", pci->irq);2412 2412 return -EIO; 2413 2413 } -
GPL/branches/alsa-resync1/alsa-kernel/pci/ice1712/ice1724.c
r260 r262 78 78 #endif 79 79 80 static struct pci_device_id snd_vt1724_ids[] __devinitdata= {80 static struct pci_device_id snd_vt1724_ids[] = { 81 81 { PCI_VENDOR_ID_ICE, PCI_DEVICE_ID_VT1724, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0 }, 82 82 { 0, } … … 86 86 87 87 88 static int PRO_RATE_LOCKED = 0;88 static int PRO_RATE_LOCKED; 89 89 static int PRO_RATE_RESET = 1; 90 90 static unsigned int PRO_RATE_DEFAULT = 44100; … … 383 383 } 384 384 385 if (rate == ice->cur_rate) {386 spin_unlock_irqrestore(&ice->reg_lock, flags);387 return;388 }389 390 385 switch (rate) { 391 386 case 8000: val = 6; break; … … 410 405 } 411 406 outb(val, ICEMT1724(ice, RATE)); 407 if (rate == ice->cur_rate) { 408 spin_unlock_irqrestore(&ice->reg_lock, flags); 409 return; 410 } 411 412 412 ice->cur_rate = rate; 413 413 … … 483 483 } 484 484 485 #define CHECK_INVALID_PTR486 487 485 static snd_pcm_uframes_t snd_vt1724_playback_pro_pointer(snd_pcm_substream_t * substream) 488 486 { … … 492 490 if (!(inl(ICEMT1724(ice, DMA_CONTROL)) & VT1724_PDMA0_START)) 493 491 return 0; 492 #if 0 /* read PLAYBACK_ADDR */ 494 493 ptr = inl(ICEMT1724(ice, PLAYBACK_ADDR)); 495 #ifdef CHECK_INVALID_PTR496 494 if (ptr < substream->runtime->dma_addr) { 497 495 snd_printd("ice1724: invalid negative ptr\n"); 498 496 return 0; 499 497 } 500 #endif501 498 ptr -= substream->runtime->dma_addr; 502 499 ptr = bytes_to_frames(substream->runtime, ptr); 503 #ifdef CHECK_INVALID_PTR504 500 if (ptr >= substream->runtime->buffer_size) { 505 501 snd_printd("ice1724: invalid ptr %d (size=%d)\n", (int)ptr, (int)substream->runtime->period_size); 506 502 return 0; 503 } 504 #else /* read PLAYBACK_SIZE */ 505 ptr = inl(ICEMT1724(ice, PLAYBACK_SIZE)) & 0xffffff; 506 ptr = (ptr + 1) << 2; 507 ptr = bytes_to_frames(substream->runtime, ptr); 508 if (ptr <= substream->runtime->buffer_size) 509 ptr = substream->runtime->buffer_size - ptr; 510 else { 511 snd_printd("ice1724: invalid ptr %d (size=%d)\n", (int)ptr, (int)substream->runtime->buffer_size); 512 ptr = 0; 507 513 } 508 514 #endif … … 537 543 if (!(inl(ICEMT1724(ice, DMA_CONTROL)) & reg->start)) 538 544 return 0; 545 #if 0 /* use ADDR register */ 539 546 ptr = inl(ice->profi_port + reg->addr); 540 547 ptr -= substream->runtime->dma_addr; 541 548 return bytes_to_frames(substream->runtime, ptr); 549 #else /* use SIZE register */ 550 ptr = inw(ice->profi_port + reg->size); 551 ptr = (ptr + 1) << 2; 552 ptr = bytes_to_frames(substream->runtime, ptr); 553 if (ptr <= substream->runtime->buffer_size) 554 ptr = substream->runtime->buffer_size - ptr; 555 else { 556 snd_printd("ice1724: invalid ptr %d (size=%d)\n", (int)ptr, (int)substream->runtime->buffer_size); 557 ptr = 0; 558 } 559 return ptr; 560 #endif 542 561 } 543 562 … … 567 586 SNDRV_PCM_INFO_PAUSE | SNDRV_PCM_INFO_SYNC_START), 568 587 .formats = SNDRV_PCM_FMTBIT_S32_LE, 569 .rates = SNDRV_PCM_RATE_KNOT | SNDRV_PCM_RATE_8000_ 96000,588 .rates = SNDRV_PCM_RATE_KNOT | SNDRV_PCM_RATE_8000_192000, 570 589 .rate_min = 4000, 571 590 .rate_max = 192000, … … 586 605 SNDRV_PCM_INFO_PAUSE | SNDRV_PCM_INFO_SYNC_START), 587 606 .formats = SNDRV_PCM_FMTBIT_S32_LE, 588 .rates = SNDRV_PCM_RATE_KNOT | SNDRV_PCM_RATE_8000_ 96000,607 .rates = SNDRV_PCM_RATE_KNOT | SNDRV_PCM_RATE_8000_192000, 589 608 .rate_min = 4000, 590 609 .rate_max = 192000, … … 721 740 SNDRV_PCM_INFO_PAUSE | SNDRV_PCM_INFO_SYNC_START), 722 741 .formats = SNDRV_PCM_FMTBIT_S32_LE, 723 .rates = SNDRV_PCM_RATE_KNOT | SNDRV_PCM_RATE_8000_ 96000,742 .rates = SNDRV_PCM_RATE_KNOT | SNDRV_PCM_RATE_8000_192000, 724 743 .rate_min = 4000, 725 744 .rate_max = 192000, … … 779 798 snd_pcm_hw_constraint_msbits(runtime, 0, 32, 24); 780 799 781 snd_pcm_hw_constraint_list(runtime, 0, SNDRV_PCM_HW_PARAM_RATE, &hw_constraints_rates_ 96);800 snd_pcm_hw_constraint_list(runtime, 0, SNDRV_PCM_HW_PARAM_RATE, &hw_constraints_rates_192); 782 801 return 0; 783 802 } … … 1797 1816 1798 1817 if ((ice->res_port = request_region(ice->port, 32, "ICE1724 - Controller")) == NULL) { 1818 snd_printk("unable to grab ports 0x%lx-0x%lx\n", ice->port, ice->port + 32 - 1); 1799 1819 snd_vt1724_free(ice); 1800 snd_printk("unable to grab ports 0x%lx-0x%lx\n", ice->port, ice->port + 32 - 1);1801 1820 return -EIO; 1802 1821 } 1803 1822 1804 1823 if ((ice->res_profi_port = request_region(ice->profi_port, 128, "ICE1724 - Professional")) == NULL) { 1824 snd_printk("unable to grab ports 0x%lx-0x%lx\n", ice->profi_port, ice->profi_port + 16 - 1); 1805 1825 snd_vt1724_free(ice); 1806 snd_printk("unable to grab ports 0x%lx-0x%lx\n", ice->profi_port, ice->profi_port + 16 - 1);1807 1826 return -EIO; 1808 1827 } 1809 1828 1810 1829 if (request_irq(pci->irq, snd_vt1724_interrupt, SA_INTERRUPT|SA_SHIRQ, "ICE1724", (void *) ice)) { 1830 snd_printk("unable to grab IRQ %d\n", pci->irq); 1811 1831 snd_vt1724_free(ice); 1812 snd_printk("unable to grab IRQ %d\n", pci->irq);1813 1832 return -EIO; 1814 1833 } -
GPL/branches/alsa-resync1/alsa-kernel/pci/ice1712/revo.c
r250 r262 70 70 tmp &= ~(0x03 << shift); 71 71 tmp |= dfs << shift; 72 snd_akm4xxx_write(ak, 0, reg, tmp); 72 // snd_akm4xxx_write(ak, 0, reg, tmp); 73 snd_akm4xxx_set(ak, 0, reg, tmp); /* the value is written in reset(0) */ 73 74 snd_akm4xxx_reset(ak, 0); 74 75 } … … 135 136 136 137 /* second stage of initialization, analog parts and others */ 137 ak = ice->akm = kmalloc(sizeof(akm4xxx_t) * 2, GFP_KERNEL);138 ak = ice->akm = snd_kcalloc(sizeof(akm4xxx_t) * 2, GFP_KERNEL); 138 139 if (! ak) 139 140 return -ENOMEM; -
GPL/branches/alsa-resync1/alsa-kernel/pci/korg1212/korg1212.c
r260 r262 424 424 MODULE_AUTHOR("Haroldo Gamal <gamal@alternex.com.br>"); 425 425 426 static struct pci_device_id snd_korg1212_ids[] __devinitdata= {426 static struct pci_device_id snd_korg1212_ids[] = { 427 427 { 428 428 .vendor = 0x10b5, -
GPL/branches/alsa-resync1/alsa-kernel/pci/rme96.c
r250 r262 261 261 } rme96_t; 262 262 263 static struct pci_device_id snd_rme96_ids[] __devinitdata= {263 static struct pci_device_id snd_rme96_ids[] = { 264 264 { PCI_VENDOR_ID_XILINX, PCI_DEVICE_ID_DIGI96, 265 265 PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0, }, -
GPL/branches/alsa-resync1/alsa-kernel/pci/rme9652/hdsp.c
r260 r262 475 475 #endif 476 476 477 static struct pci_device_id snd_hdsp_ids[] __devinitdata= {477 static struct pci_device_id snd_hdsp_ids[] = { 478 478 { 479 479 .vendor = PCI_VENDOR_ID_XILINX, … … 3792 3792 { 3793 3793 hdsp_t *hdsp = (hdsp_t *)hw->private_data; 3794 hdsp_peak_rms_t *peak_rms;3795 hdsp_firmware_t *firmware;3796 hdsp_mixer_t *mixer;3797 hdsp_config_info_t info;3798 hdsp_version_t hdsp_version;3799 int i;3800 int err;3801 unsigned long flags;3802 3794 3803 3795 switch (cmd) { 3804 case SNDRV_HDSP_IOCTL_GET_PEAK_RMS: 3796 case SNDRV_HDSP_IOCTL_GET_PEAK_RMS: { 3797 hdsp_peak_rms_t *peak_rms; 3798 3805 3799 if (hdsp->io_type == H9652) { 3806 3800 snd_printk("hardware metering isn't supported yet for hdsp9652 cards\n"); … … 3828 3822 } 3829 3823 break; 3830 case SNDRV_HDSP_IOCTL_GET_CONFIG_INFO: 3824 } 3825 case SNDRV_HDSP_IOCTL_GET_CONFIG_INFO: { 3826 hdsp_config_info_t info; 3827 unsigned long flags; 3828 int i; 3829 3831 3830 if (!(hdsp->state & HDSP_FirmwareLoaded)) { 3832 3831 snd_printk("Firmware needs to be uploaded to the card.\n"); … … 3858 3857 return -EFAULT; 3859 3858 break; 3860 case SNDRV_HDSP_IOCTL_GET_VERSION: 3859 } 3860 case SNDRV_HDSP_IOCTL_GET_VERSION: { 3861 hdsp_version_t hdsp_version; 3862 int err; 3863 3861 3864 if (hdsp->io_type == H9652) return -EINVAL; 3862 3865 if (hdsp->io_type == Undefined) { … … 3871 3874 } 3872 3875 break; 3873 case SNDRV_HDSP_IOCTL_UPLOAD_FIRMWARE: 3876 } 3877 case SNDRV_HDSP_IOCTL_UPLOAD_FIRMWARE: { 3878 hdsp_firmware_t *firmware; 3879 unsigned long *firmware_data; 3880 int err; 3881 3874 3882 if (hdsp->io_type == H9652) return -EINVAL; 3875 3883 /* SNDRV_HDSP_IOCTL_GET_VERSION must have been called */ … … 3878 3886 snd_printk("initializing firmware upload\n"); 3879 3887 firmware = (hdsp_firmware_t *)arg; 3888 if (get_user(firmware_data, &firmware->firmware_data)) { 3889 return -EFAULT; 3890 } 3880 3891 3881 3892 if (hdsp_check_for_iobox (hdsp)) { … … 3883 3894 } 3884 3895 3885 if (copy_from_user(hdsp->firmware_cache, firmware ->firmware_data, sizeof(unsigned long)*24413) != 0) {3896 if (copy_from_user(hdsp->firmware_cache, firmware_data, sizeof(unsigned long)*24413) != 0) { 3886 3897 return -EFAULT; 3887 3898 } … … 3905 3916 } 3906 3917 break; 3907 case SNDRV_HDSP_IOCTL_GET_MIXER: 3918 } 3919 case SNDRV_HDSP_IOCTL_GET_MIXER: { 3920 hdsp_mixer_t *mixer; 3921 3908 3922 mixer = (hdsp_mixer_t *)arg; 3909 3923 if (copy_to_user(mixer->matrix, hdsp->mixer_matrix, sizeof(unsigned short)*HDSP_MATRIX_MIXER_SIZE)) 3910 3924 return -EFAULT; 3911 3925 break; 3926 } 3912 3927 default: 3913 3928 return -EINVAL; … … 4129 4144 case 0xa: 4130 4145 case 0xb: 4146 case 0x32: 4131 4147 hdsp->card_name = "RME Hammerfall DSP"; 4132 4148 break; -
GPL/branches/alsa-resync1/alsa-kernel/pci/rme9652/rme9652.c
r250 r262 345 345 #endif 346 346 347 348 static struct pci_device_id snd_rme9652_ids[] __devinitdata = { 347 static struct pci_device_id snd_rme9652_ids[] = { 349 348 { 350 349 .vendor = 0x10ee, -
GPL/branches/alsa-resync1/alsa-kernel/pci/sonicvibes.c
r250 r262 265 265 }; 266 266 267 static struct pci_device_id snd_sonic_ids[] __devinitdata= {267 static struct pci_device_id snd_sonic_ids[] = { 268 268 { 0x5333, 0xca00, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0, }, 269 269 { 0, } … … 1269 1269 sonic->sb_port = pci_resource_start(pci, 0); 1270 1270 if ((sonic->res_sb_port = request_region(sonic->sb_port, 0x10, "S3 SonicVibes SB")) == NULL) { 1271 snd_printk("unable to grab SB port at 0x%lx-0x%lx\n", sonic->sb_port, sonic->sb_port + 0x10 - 1); 1271 1272 snd_sonicvibes_free(sonic); 1272 snd_printk("unable to grab SB port at 0x%lx-0x%lx\n", sonic->sb_port, sonic->sb_port + 0x10 - 1);1273 1273 return -EBUSY; 1274 1274 } 1275 1275 sonic->enh_port = pci_resource_start(pci, 1); 1276 1276 if ((sonic->res_enh_port = request_region(sonic->enh_port, 0x10, "S3 SonicVibes Enhanced")) == NULL) { 1277 snd_printk("unable to grab PCM port at 0x%lx-0x%lx\n", sonic->enh_port, sonic->enh_port + 0x10 - 1); 1277 1278 snd_sonicvibes_free(sonic); 1278 snd_printk("unable to grab PCM port at 0x%lx-0x%lx\n", sonic->enh_port, sonic->enh_port + 0x10 - 1);1279 1279 return -EBUSY; 1280 1280 } 1281 1281 sonic->synth_port = pci_resource_start(pci, 2); 1282 1282 if ((sonic->res_synth_port = request_region(sonic->synth_port, 4, "S3 SonicVibes Synth")) == NULL) { 1283 snd_printk("unable to grab synth port at 0x%lx-0x%lx\n", sonic->synth_port, sonic->synth_port + 4 - 1); 1283 1284 snd_sonicvibes_free(sonic); 1284 snd_printk("unable to grab synth port at 0x%lx-0x%lx\n", sonic->synth_port, sonic->synth_port + 4 - 1);1285 1285 return -EBUSY; 1286 1286 } 1287 1287 sonic->midi_port = pci_resource_start(pci, 3); 1288 1288 if ((sonic->res_midi_port = request_region(sonic->midi_port, 4, "S3 SonicVibes Midi")) == NULL) { 1289 snd_printk("unable to grab MIDI port at 0x%lx-0x%lx\n", sonic->midi_port, sonic->midi_port + 4 - 1); 1289 1290 snd_sonicvibes_free(sonic); 1290 snd_printk("unable to grab MIDI port at 0x%lx-0x%lx\n", sonic->midi_port, sonic->midi_port + 4 - 1);1291 1291 return -EBUSY; 1292 1292 } 1293 1293 sonic->game_port = pci_resource_start(pci, 4); 1294 1294 if (request_irq(pci->irq, snd_sonicvibes_interrupt, SA_INTERRUPT|SA_SHIRQ, "S3 SonicVibes", (void *)sonic)) { 1295 snd_magic_kfree(sonic);1296 1295 snd_printk("unable to grab IRQ %d\n", pci->irq); 1296 snd_sonicvibes_free(sonic); 1297 1297 return -EBUSY; 1298 1298 } -
GPL/branches/alsa-resync1/alsa-kernel/pci/trident/trident.c
r212 r262 70 70 MODULE_PARM_SYNTAX(wavetable_size, SNDRV_ENABLED ",default:8192,skill:advanced"); 71 71 72 73 static struct pci_device_id snd_trident_ids[] __devinitdata = { 72 static struct pci_device_id snd_trident_ids[] = { 74 73 { 0x1023, 0x2000, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0, }, /* Trident 4DWave DX PCI Audio */ 75 74 { 0x1023, 0x2001, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0, }, /* Trident 4DWave NX PCI Audio */
Note:
See TracChangeset
for help on using the changeset viewer.