Changeset 358
- Timestamp:
- 07/16/08 11:53:49 (6 weeks ago)
- Location:
- GPL/branches/uniaud32-2.0
- Files:
-
- 2 added
- 89 modified
-
alsa-kernel/core/control.c (modified) (2 diffs)
-
alsa-kernel/core/info.c (modified) (2 diffs)
-
alsa-kernel/core/init.c (modified) (11 diffs)
-
alsa-kernel/core/makefile.os2 (modified) (1 diff)
-
alsa-kernel/core/memalloc.c (modified) (2 diffs)
-
alsa-kernel/core/misc.c (modified) (2 diffs)
-
alsa-kernel/core/pcm_native.c (modified) (3 diffs)
-
alsa-kernel/core/seq/oss/seq_oss_synth.c (modified) (1 diff)
-
alsa-kernel/core/seq/seq_clientmgr.c (modified) (2 diffs)
-
alsa-kernel/core/seq/seq_device.c (modified) (4 diffs)
-
alsa-kernel/core/sound.c (modified) (7 diffs)
-
alsa-kernel/core/timer.c (modified) (2 diffs)
-
alsa-kernel/drivers/dummy.c (modified) (4 diffs)
-
alsa-kernel/drivers/mpu401/mpu401_uart.c (modified) (3 diffs)
-
alsa-kernel/include/sound/ac97_codec.h (modified) (2 diffs)
-
alsa-kernel/include/sound/ak4114.h (modified) (1 diff)
-
alsa-kernel/include/sound/ak4xxx-adda.h (modified) (1 diff)
-
alsa-kernel/include/sound/asoundef.h (modified) (1 diff)
-
alsa-kernel/include/sound/config.h (modified) (2 diffs)
-
alsa-kernel/include/sound/control.h (modified) (2 diffs)
-
alsa-kernel/include/sound/core.h (modified) (6 diffs)
-
alsa-kernel/include/sound/cs4231-regs.h (modified) (1 diff)
-
alsa-kernel/include/sound/cs4231.h (modified) (2 diffs)
-
alsa-kernel/include/sound/emu10k1.h (modified) (1 diff)
-
alsa-kernel/include/sound/mpu401.h (modified) (2 diffs)
-
alsa-kernel/include/sound/seq_kernel.h (modified) (1 diff)
-
alsa-kernel/include/sound/soc-dapm.h (modified) (5 diffs)
-
alsa-kernel/include/sound/soc.h (modified) (16 diffs)
-
alsa-kernel/include/sound/uda1341.h (modified) (1 diff)
-
alsa-kernel/include/sound/version.h (modified) (1 diff)
-
alsa-kernel/isa/cs423x/cs4231_lib.c (modified) (8 diffs)
-
alsa-kernel/isa/opti9xx/opti92x-ad1848.c (modified) (10 diffs)
-
alsa-kernel/isa/sb/sb16_csp.c (modified) (10 diffs)
-
alsa-kernel/isa/sb/sb8_main.c (modified) (1 diff)
-
alsa-kernel/isa/sb/sb_common.c (modified) (3 diffs)
-
alsa-kernel/isa/sb/sb_mixer.c (modified) (2 diffs)
-
alsa-kernel/isa/wavefront/wavefront_synth.c (modified) (1 diff)
-
alsa-kernel/pci/ac97/ac97_codec.c (modified) (3 diffs)
-
alsa-kernel/pci/ac97/ac97_patch.c (modified) (22 diffs)
-
alsa-kernel/pci/ac97/ac97_pcm.c (modified) (1 diff)
-
alsa-kernel/pci/ali5451/ali5451.c (modified) (6 diffs)
-
alsa-kernel/pci/atiixp.c (modified) (1 diff)
-
alsa-kernel/pci/au88x0/au88x0.c (modified) (2 diffs)
-
alsa-kernel/pci/au88x0/au88x0_game.c (modified) (1 diff)
-
alsa-kernel/pci/au88x0/au88x0_pcm.c (modified) (3 diffs)
-
alsa-kernel/pci/bt87x.c (modified) (1 diff)
-
alsa-kernel/pci/ca0106/ca0106_main.c (modified) (5 diffs)
-
alsa-kernel/pci/ca0106/ca0106_mixer.c (modified) (3 diffs)
-
alsa-kernel/pci/cmipci.c (modified) (2 diffs)
-
alsa-kernel/pci/cs46xx/cs46xx_lib.c (modified) (2 diffs)
-
alsa-kernel/pci/emu10k1/emu10k1_main.c (modified) (6 diffs)
-
alsa-kernel/pci/emu10k1/emu10k1x.c (modified) (4 diffs)
-
alsa-kernel/pci/emu10k1/emumixer.c (modified) (4 diffs)
-
alsa-kernel/pci/emu10k1/emuproc.c (modified) (1 diff)
-
alsa-kernel/pci/emu10k1/memory.c (modified) (4 diffs)
-
alsa-kernel/pci/ens1370.c (modified) (4 diffs)
-
alsa-kernel/pci/es1938.c (modified) (2 diffs)
-
alsa-kernel/pci/es1968.c (modified) (7 diffs)
-
alsa-kernel/pci/fm801.c (modified) (2 diffs)
-
alsa-kernel/pci/hda/hda_codec.c (modified) (19 diffs)
-
alsa-kernel/pci/hda/hda_codec.h (modified) (5 diffs)
-
alsa-kernel/pci/hda/hda_generic.c (modified) (7 diffs)
-
alsa-kernel/pci/hda/hda_hwdep.c (modified) (2 diffs)
-
alsa-kernel/pci/hda/hda_intel.c (modified) (57 diffs)
-
alsa-kernel/pci/hda/hda_local.h (modified) (3 diffs)
-
alsa-kernel/pci/hda/hda_patch.h (modified) (1 diff)
-
alsa-kernel/pci/hda/hda_proc.c (modified) (3 diffs)
-
alsa-kernel/pci/hda/makefile.os2 (modified) (5 diffs)
-
alsa-kernel/pci/hda/patch_analog.c (modified) (48 diffs)
-
alsa-kernel/pci/hda/patch_atihdmi.c (modified) (3 diffs)
-
alsa-kernel/pci/hda/patch_cmedia.c (modified) (6 diffs)
-
alsa-kernel/pci/hda/patch_conexant.c (modified) (22 diffs)
-
alsa-kernel/pci/hda/patch_realtek.c (modified) (194 diffs)
-
alsa-kernel/pci/hda/patch_si3054.c (modified) (2 diffs)
-
alsa-kernel/pci/hda/patch_sigmatel.c (modified) (72 diffs)
-
alsa-kernel/pci/hda/patch_via.c (modified) (8 diffs)
-
alsa-kernel/pci/intel8x0.c (modified) (11 diffs)
-
alsa-kernel/pci/korg1212/korg1212.c (modified) (1 diff)
-
alsa-kernel/pci/maestro3.c (modified) (11 diffs)
-
alsa-kernel/pci/nm256/nm256.c (modified) (3 diffs)
-
alsa-kernel/pci/rme96.c (modified) (1 diff)
-
alsa-kernel/pci/rme9652/hdsp.c (modified) (4 diffs)
-
alsa-kernel/pci/rme9652/hdspm.c (modified) (8 diffs)
-
alsa-kernel/pci/trident/trident_main.c (modified) (3 diffs)
-
alsa-kernel/pci/trident/trident_memory.c (modified) (1 diff)
-
alsa-kernel/pci/via82xx.c (modified) (3 diffs)
-
alsa-kernel/pci/ymfpci/ymfpci_main.c (modified) (4 diffs)
-
alsa-kernel/synth/emux/emux_synth.c (modified) (1 diff)
-
include/linux/compat.h (added)
-
include/linux/pm_qos_params.h (added)
-
uniaud.inc (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
GPL/branches/uniaud32-2.0/alsa-kernel/core/control.c
r318 r358 693 693 } 694 694 695 int snd_ctl_elem_read(struct snd_card *card, struct snd_ctl_elem_value *control) 695 static int snd_ctl_elem_read(struct snd_card *card, 696 struct snd_ctl_elem_value *control) 696 697 { 697 698 struct snd_kcontrol *kctl; … … 743 744 } 744 745 745 int snd_ctl_elem_write(struct snd_card *card, struct snd_ctl_file *file,746 struct snd_ctl_elem_value *control)746 static int snd_ctl_elem_write(struct snd_card *card, struct snd_ctl_file *file, 747 struct snd_ctl_elem_value *control) 747 748 { 748 749 struct snd_kcontrol *kctl; -
GPL/branches/uniaud32-2.0/alsa-kernel/core/info.c
r305 r358 572 572 struct proc_dir_entry *p; 573 573 574 p = snd_create_proc_entry("asound", S_IFDIR | S_IRUGO | S_IXUGO, &proc_root);574 p = snd_create_proc_entry("asound", S_IFDIR | S_IRUGO | S_IXUGO, NULL); 575 575 if (p == NULL) 576 576 return -ENOMEM; … … 622 622 snd_info_free_entry(snd_oss_root); 623 623 #endif 624 snd_remove_proc_entry( &proc_root, snd_proc_root);624 snd_remove_proc_entry(NULL, snd_proc_root); 625 625 } 626 626 return 0; -
GPL/branches/uniaud32-2.0/alsa-kernel/core/init.c
r318 r358 59 59 MODULE_PARM_DESC(slots, "Module names assigned to the slots."); 60 60 61 /* return non-zero if the given index is already reserved for another61 /* return non-zero if the given index is reserved for the given 62 62 * module via slots option 63 63 */ 64 static int module_slot_m ismatch(struct module *module, int idx)64 static int module_slot_match(struct module *module, int idx) 65 65 { 66 66 #ifndef TARGET_OS2 67 67 #ifdef MODULE 68 char *s1, *s2; 68 const char *s1, *s2; 69 70 int match = 1; 69 71 if (!module || !module->name || !slots[idx]) 70 72 return 0; 71 s1 = slots[idx]; 72 s2 = module->name; 73 s1 = module->name; 74 s2 = slots[idx]; 75 if (*s2 == '!') { 76 match = 0; /* negative match */ 77 s2++; 78 } 73 79 /* compare module name strings 74 80 * hyphens are handled as equivalent with underscore … … 82 88 c2 = '_'; 83 89 if (c1 != c2) 84 return 1;90 return !match; 85 91 if (!c1) 86 92 break; 87 93 } 88 #endif 89 #endif 90 return 0; 94 95 #endif /* MODULE */ 96 #else 97 int match = 1; 98 #endif 99 return match; 91 100 } 92 101 … … 144 153 { 145 154 struct snd_card *card; 146 int err ;155 int err, idx2; 147 156 148 157 if (extra_size < 0) … … 160 169 mutex_lock(&snd_card_mutex); 161 170 if (idx < 0) { 162 int idx2;163 171 for (idx2 = 0; idx2 < SNDRV_CARDS; idx2++) 164 172 /* idx == -1 == 0xffff means: take any free slot */ 165 173 if (~snd_cards_lock & idx & 1<<idx2) { 166 if (module_slot_mismatch(module, idx2)) 167 continue; 168 idx = idx2; 169 if (idx >= snd_ecards_limit) 170 snd_ecards_limit = idx + 1; 171 break; 174 if (module_slot_match(module, idx2)) { 175 idx = idx2; 176 break; 177 } 172 178 } 173 } else { 174 if (idx < snd_ecards_limit) { 175 if (snd_cards_lock & (1 << idx)) 176 err = -EBUSY; /* invalid */ 177 } else { 178 if (idx < SNDRV_CARDS) 179 snd_ecards_limit = idx + 1; /* increase the limit */ 180 else 181 err = -ENODEV; 182 } 183 } 184 if (idx < 0 || err < 0) { 179 } 180 if (idx < 0) { 181 for (idx2 = 0; idx2 < SNDRV_CARDS; idx2++) 182 /* idx == -1 == 0xffff means: take any free slot */ 183 if (~snd_cards_lock & idx & 1<<idx2) { 184 if (!slots[idx2] || !*slots[idx2]) { 185 idx = idx2; 186 break; 187 } 188 } 189 } 190 if (idx < 0) 191 err = -ENODEV; 192 else if (idx < snd_ecards_limit) { 193 if (snd_cards_lock & (1 << idx)) 194 err = -EBUSY; /* invalid */ 195 } else if (idx >= SNDRV_CARDS) 196 err = -ENODEV; 197 if (err < 0) { 185 198 mutex_unlock(&snd_card_mutex); 186 199 snd_printk(KERN_ERR "cannot find the slot for index %d (range 0-%i), error: %d\n", … … 189 202 } 190 203 snd_cards_lock |= 1 << idx; /* lock it */ 204 if (idx >= snd_ecards_limit) 205 snd_ecards_limit = idx + 1; /* increase the limit */ 191 206 mutex_unlock(&snd_card_mutex); 192 207 card->number = idx; … … 271 286 272 287 #ifndef TARGET_OS2 273 panic("%s(%p, %p) failed!", __ FUNCTION__, inode, file);288 panic("%s(%p, %p) failed!", __func__, inode, file); 274 289 #endif 275 290 } … … 347 362 int err; 348 363 364 if (!card) 365 return -EINVAL; 366 349 367 spin_lock(&card->files_lock); 350 368 if (card->shutdown) { … … 358 376 mutex_lock(&snd_card_mutex); 359 377 snd_cards[card->number] = NULL; 378 snd_cards_lock &= ~(1 << card->number); 360 379 mutex_unlock(&snd_card_mutex); 361 380 … … 396 415 397 416 snd_info_card_disconnect(card); 417 #ifndef CONFIG_SYSFS_DEPRECATED 418 if (card->card_dev) { 419 device_unregister(card->card_dev); 420 card->card_dev = NULL; 421 } 422 #endif 423 #ifdef CONFIG_PM 424 wake_up(&card->power_sleep); 425 #endif 398 426 return 0; 399 427 } … … 437 465 /* Not fatal error */ 438 466 } 439 #ifndef CONFIG_SYSFS_DEPRECATED440 if (card->card_dev)441 device_unregister(card->card_dev);442 #endif443 467 kfree(card); 444 468 return 0; 445 469 } 446 470 447 static int snd_card_free_prepare(struct snd_card *card)448 {449 if (card == NULL)450 return -EINVAL;451 (void) snd_card_disconnect(card);452 mutex_lock(&snd_card_mutex);453 snd_cards[card->number] = NULL;454 snd_cards_lock &= ~(1 << card->number);455 mutex_unlock(&snd_card_mutex);456 #ifdef CONFIG_PM457 wake_up(&card->power_sleep);458 #endif459 return 0;460 }461 462 471 int snd_card_free_when_closed(struct snd_card *card) 463 472 { 464 473 int free_now = 0; 465 int ret = snd_card_ free_prepare(card);474 int ret = snd_card_disconnect(card); 466 475 if (ret) 467 476 return ret; … … 483 492 int snd_card_free(struct snd_card *card) 484 493 { 485 int ret = snd_card_ free_prepare(card);494 int ret = snd_card_disconnect(card); 486 495 if (ret) 487 496 return ret; -
GPL/branches/uniaud32-2.0/alsa-kernel/core/makefile.os2
r333 r358 21 21 FILE6 = timer.obj 22 22 FILE7 = rtctimer.obj 23 FILE8 = hwdep.obj info.obj wrappers.obj misc_driver.obj 23 FILE8 = hwdep.obj info.obj wrappers.obj misc_driver.obj vmaster.obj 24 24 FILELAST = 25 25 FILES = $(FILE0) $(FILE1) $(FILE2) $(FILE3) $(FILE4) $(FILE5) $(FILE6) $(FILE7) $(FILE8) $(FILE9) $(FILE10) $(FILE11) $(FILE12) -
GPL/branches/uniaud32-2.0/alsa-kernel/core/memalloc.c
r351 r358 125 125 #endif 126 126 127 #if defined(__i386__)128 /*129 * A hack to allocate large buffers via dma_alloc_coherent()130 *131 * since dma_alloc_coherent always tries GFP_DMA when the requested132 * pci memory region is below 32bit, it happens quite often that even133 * 2 order of pages cannot be allocated.134 *135 * so in the following, we allocate at first without dma_mask, so that136 * allocation will be done without GFP_DMA. if the area doesn't match137 * with the requested region, then realloate with the original dma_mask138 * again.139 *140 * Really, we want to move this type of thing into dma_alloc_coherent()141 * so dma_mask doesn't have to be messed with.142 */143 144 static void *snd_dma_hack_alloc_coherent(struct device *dev, size_t size,145 dma_addr_t *dma_handle,146 gfp_t flags)147 {148 void *ret;149 u64 dma_mask, coherent_dma_mask;150 151 if (dev == NULL || !dev->dma_mask)152 return dma_alloc_coherent(dev, size, dma_handle, flags);153 dma_mask = *dev->dma_mask;154 coherent_dma_mask = dev->coherent_dma_mask;155 *dev->dma_mask = 0xffffffff; /* do without masking */156 dev->coherent_dma_mask = 0xffffffff; /* do without masking */157 ret = dma_alloc_coherent(dev, size, dma_handle, flags);158 *dev->dma_mask = dma_mask; /* restore */159 dev->coherent_dma_mask = coherent_dma_mask; /* restore */160 if (ret) {161 /* obtained address is out of range? */162 if (((unsigned long)*dma_handle + size - 1) & ~dma_mask) {163 /* reallocate with the proper mask */164 dma_free_coherent(dev, size, ret, *dma_handle);165 ret = dma_alloc_coherent(dev, size, dma_handle, flags);166 }167 } else {168 /* wish to success now with the proper mask... */169 if (dma_mask != 0xffffffffUL) {170 /* allocation with GFP_ATOMIC to avoid the long stall */171 flags &= ~GFP_KERNEL;172 flags |= GFP_ATOMIC;173 ret = dma_alloc_coherent(dev, size, dma_handle, flags);174 }175 }176 return ret;177 }178 179 /* redefine dma_alloc_coherent for some architectures */180 #undef dma_alloc_coherent181 #define dma_alloc_coherent snd_dma_hack_alloc_coherent182 183 #endif /* arch */184 127 185 128 /* … … 687 630 #ifdef CONFIG_PROC_FS 688 631 #if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 0) 689 snd_mem_proc = create_proc_entry(SND_MEM_PROC_FILE, 0644, NULL); 690 if (snd_mem_proc) 691 snd_mem_proc->proc_fops = &snd_mem_proc_fops; 632 snd_mem_proc = proc_create(SND_MEM_PROC_FILE, 0644, NULL, 633 &snd_mem_proc_fops); 692 634 #endif 693 635 #endif -
GPL/branches/uniaud32-2.0/alsa-kernel/core/misc.c
r305 r358 40 40 va_list args; 41 41 42 if (format[0] == '<' && format[1] >= '0' && format[1] <= ' 9' && format[2] == '>') {42 if (format[0] == '<' && format[1] >= '0' && format[1] <= '7' && format[2] == '>') { 43 43 char tmp[] = "<0>"; 44 44 tmp[1] = format[1]; … … 61 61 va_list args; 62 62 63 if (format[0] == '<' && format[1] >= '0' && format[1] <= ' 9' && format[2] == '>') {63 if (format[0] == '<' && format[1] >= '0' && format[1] <= '7' && format[2] == '>') { 64 64 char tmp[] = "<0>"; 65 65 tmp[1] = format[1]; -
GPL/branches/uniaud32-2.0/alsa-kernel/core/pcm_native.c
r319 r358 27 27 #include <linux/slab.h> 28 28 #include <linux/time.h> 29 #include <linux/ latency.h>29 #include <linux/pm_qos_params.h> 30 30 #include <linux/uio.h> 31 31 #include <sound/core.h> … … 455 455 runtime->status->state = SNDRV_PCM_STATE_SETUP; 456 456 457 remove_acceptable_latency(substream->latency_id); 457 pm_qos_remove_requirement(PM_QOS_CPU_DMA_LATENCY, 458 substream->latency_id); 458 459 if ((usecs = period_to_usecs(runtime)) >= 0) 459 set_acceptable_latency(substream->latency_id, usecs); 460 pm_qos_add_requirement(PM_QOS_CPU_DMA_LATENCY, 461 substream->latency_id, usecs); 460 462 return 0; 461 463 _error: … … 517 519 result = substream->ops->hw_free(substream); 518 520 runtime->status->state = SNDRV_PCM_STATE_OPEN; 519 remove_acceptable_latency(substream->latency_id); 521 pm_qos_remove_requirement(PM_QOS_CPU_DMA_LATENCY, 522 substream->latency_id); 520 523 return result; 521 524 } -
GPL/branches/uniaud32-2.0/alsa-kernel/core/seq/oss/seq_oss_synth.c
r333 r358 250 250 if (info->nr_voices > 0) { 251 251 info->ch = kcalloc(info->nr_voices, sizeof(struct seq_oss_chinfo), GFP_KERNEL); 252 if (!info->ch) 253 BUG(); 252 if (!info->ch) { 253 snd_printk(KERN_ERR "Cannot malloc\n"); 254 rec->oper.close(&info->arg); 255 module_put(rec->oper.owner); 256 snd_use_lock_free(&rec->use_lock); 257 continue; 258 } 254 259 reset_channels(info); 255 260 } -
GPL/branches/uniaud32-2.0/alsa-kernel/core/seq/seq_clientmgr.c
r318 r358 153 153 } 154 154 spin_unlock_irqrestore(&clients_lock, flags); 155 #ifdef CONFIG_ KMOD156 if (!in_interrupt() && current->fs->root) {155 #ifdef CONFIG_MODULES 156 if (!in_interrupt()) { 157 157 static char client_requested[SNDRV_SEQ_GLOBAL_CLIENTS]; 158 158 static char card_requested[SNDRV_CARDS]; … … 160 160 int idx; 161 161 162 if (! client_requested[clientid] && current->fs->root) {162 if (!client_requested[clientid]) { 163 163 client_requested[clientid] = 1; 164 164 for (idx = 0; idx < 15; idx++) { -
GPL/branches/uniaud32-2.0/alsa-kernel/core/seq/seq_device.c
r305 r358 125 125 */ 126 126 127 #ifdef CONFIG_ KMOD127 #ifdef CONFIG_MODULES 128 128 /* avoid auto-loading during module_init() */ 129 129 static int snd_seq_in_init; … … 141 141 void snd_seq_device_load_drivers(void) 142 142 { 143 #ifdef CONFIG_ KMOD143 #ifdef CONFIG_MODULES 144 144 struct ops_list *ops; 145 145 … … 148 148 &nbs
![(please configure the [header_logo] section in trac.ini)](/uniaud/chrome/site/your_project_logo.png)