- Timestamp:
- Jul 20, 2010, 5:52:49 PM (15 years ago)
- Location:
- GPL/branches/uniaud32-2.1.x
- Files:
-
- 42 edited
-
alsa-kernel/core/memalloc.c (modified) (1 diff)
-
alsa-kernel/core/pcm_lib.c (modified) (2 diffs)
-
alsa-kernel/core/pcm_native.c (modified) (2 diffs)
-
alsa-kernel/core/seq/seq_timer.c (modified) (3 diffs)
-
alsa-kernel/core/sgbuf.c (modified) (1 diff)
-
alsa-kernel/include/sound/adriver.h (modified) (2 diffs)
-
alsa-kernel/pci/ac97/ac97_codec.c (modified) (5 diffs)
-
alsa-kernel/pci/atiixp.c (modified) (8 diffs)
-
alsa-kernel/pci/ca0106/ca0106_proc.c (modified) (13 diffs)
-
alsa-kernel/pci/cmipci.c (modified) (1 diff)
-
alsa-kernel/pci/emu10k1/emu10k1_main.c (modified) (2 diffs)
-
alsa-kernel/pci/emu10k1/emu10k1x.c (modified) (27 diffs)
-
alsa-kernel/pci/emu10k1/memory.c (modified) (3 diffs)
-
alsa-kernel/pci/hda/hda_intel.c (modified) (2 diffs)
-
alsa-kernel/pci/hda/hda_proc.c (modified) (3 diffs)
-
alsa-kernel/pci/hda/patch_conexant.c (modified) (7 diffs)
-
alsa-kernel/pci/hda/patch_sigmatel.c (modified) (2 diffs)
-
alsa-kernel/pci/intel8x0.c (modified) (3 diffs)
-
alsa-kernel/pci/trident/trident_memory.c (modified) (4 diffs)
-
alsa-kernel/synth/emux/soundfont.c (modified) (3 diffs)
-
drv32/init.c (modified) (1 diff)
-
drv32/irq.cpp (modified) (2 diffs)
-
drv32/rmhelp.cpp (modified) (2 diffs)
-
drv32/strategy.c (modified) (8 diffs)
-
include/dbgos2.h (modified) (1 diff)
-
include/linux/kthread.h (modified) (1 diff)
-
include/linux/pci.h (modified) (1 diff)
-
include/linux/workqueue.h (modified) (1 diff)
-
include/proto.h (modified) (1 diff)
-
lib32/debug.c (modified) (1 diff)
-
lib32/fminstrload.c (modified) (6 diffs)
-
lib32/ioctl.c (modified) (7 diffs)
-
lib32/irq.c (modified) (2 diffs)
-
lib32/malloc.cpp (modified) (1 diff)
-
lib32/memory.cpp (modified) (4 diffs)
-
lib32/misc.c (modified) (2 diffs)
-
lib32/ossidc.cpp (modified) (4 diffs)
-
lib32/pci.c (modified) (6 diffs)
-
lib32/sound.c (modified) (38 diffs)
-
lib32/soundmidi.c (modified) (13 diffs)
-
lib32/soundmixer.c (modified) (5 diffs)
-
uniaud.inc (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
GPL/branches/uniaud32-2.1.x/alsa-kernel/core/memalloc.c
r504 r519 216 216 struct snd_dma_buffer *dmab) 217 217 { 218 dprintf(("snd_dma_alloc_pages with size = %d", size));218 dprintf(("snd_dma_alloc_pages with size = %d", size)); 219 219 if (WARN_ON(!size)) 220 220 return -ENXIO; -
GPL/branches/uniaud32-2.1.x/alsa-kernel/core/pcm_lib.c
r499 r519 360 360 __delta: 361 361 delta = (new_hw_ptr - old_hw_ptr) % runtime->boundary; 362 #ifdef CONFIG_SND_PCM_XRUN_DEBUG 362 363 if (xrun_debug(substream, in_interrupt ? 363 364 XRUN_DEBUG_PERIODUPDATE : XRUN_DEBUG_HWPTRUPDATE)) { … … 376 377 (unsigned long)runtime->hw_ptr_base); 377 378 } 379 #endif 378 380 /* something must be really wrong */ 379 381 if (delta >= runtime->buffer_size + runtime->period_size) { -
GPL/branches/uniaud32-2.1.x/alsa-kernel/core/pcm_native.c
r499 r519 3496 3496 #endif /* CONFIG_SND_SUPPORT_OLD_API */ 3497 3497 3498 #if 0 /* DAZ */ 3498 3499 #ifndef CONFIG_MMU 3499 3500 static unsigned long snd_pcm_get_unmapped_area(struct file *file, … … 3519 3520 #else 3520 3521 # define snd_pcm_get_unmapped_area NULL 3522 #endif 3521 3523 #endif 3522 3524 -
GPL/branches/uniaud32-2.1.x/alsa-kernel/core/seq/seq_timer.c
r499 r519 46 46 tmr->tick.resolution += s; 47 47 } 48 if (tmr->tick.resolution <= 0)48 if (tmr->tick.resolution == 0) /* DAZ was 'unsigned <= 0' */ 49 49 tmr->tick.resolution = 1; 50 50 snd_seq_timer_update_tick(&tmr->tick, 0); … … 399 399 400 400 cur_time = tmr->cur_time; 401 if (tmr->running) { 401 if (tmr->running) { 402 402 struct timeval tm; 403 403 int usec; … … 413 413 snd_seq_sanity_real_time(&cur_time); 414 414 } 415 415 416 416 return cur_time; 417 417 } -
GPL/branches/uniaud32-2.1.x/alsa-kernel/core/sgbuf.c
r484 r519 118 118 struct page **pgtable; 119 119 120 #ifdef DEBUG 121 dprintf(("snd_malloc_sgbuf_pages. size %x",size)); 122 #endif 120 dprintf(("snd_malloc_sgbuf_pages. size %x", size)); 123 121 124 122 dmab->area = NULL; -
GPL/branches/uniaud32-2.1.x/alsa-kernel/include/sound/adriver.h
r305 r519 1 DAZ - Apparently this file is not used by the driver on OS2 2 1 3 #ifndef __SOUND_LOCAL_DRIVER_H 2 4 #define __SOUND_LOCAL_DRIVER_H … … 963 965 MODULE_PARM(name, SNDRV_MODULE_TYPE_##type) 964 966 #else 965 #define module_param_array(name, type, nump, perm) 966 #define module_param(name, type, perm) 967 #define module_param_array(name, type, nump, perm) 968 #define module_param(name, type, perm) 967 969 #endif /* TARGET_OS2 */ 968 970 #elif LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 10) -
GPL/branches/uniaud32-2.1.x/alsa-kernel/pci/ac97/ac97_codec.c
r499 r519 1443 1443 1444 1444 /* build Beep controls */ 1445 if (!(ac97->flags & AC97_HAS_NO_PC_BEEP) && 1445 if (!(ac97->flags & AC97_HAS_NO_PC_BEEP) && 1446 1446 ((ac97->flags & AC97_HAS_PC_BEEP) || 1447 1447 snd_ac97_try_volume_mix(ac97, AC97_PC_BEEP))) { … … 2361 2361 power |= AC97_PD_PR2; /* Analog Mixer powerdown (Vref on) */ 2362 2362 snd_ac97_write(ac97, AC97_POWERDOWN, power); 2363 #ifdef CONFIG_SND_AC97_POWER_SAVE 2363 2364 if (ac97_is_power_save_mode(ac97)) { 2364 2365 power |= AC97_PD_PR3; /* Analog Mixer powerdown */ … … 2370 2371 snd_ac97_write(ac97, AC97_POWERDOWN, power); 2371 2372 } 2373 #endif 2372 2374 } 2373 2375 … … 2914 2916 int result; 2915 2917 2916 snd_printdd("ac97_tune_hardware quirk=%lx override=%s pci=(%04x:%04x %04x:%04x) ac97=(%04x:%04x)\n",2918 dprintf(("ac97_tune_hardware: quirk=%lx override=%s pci=(%04x:%04x %04x:%04x) ac97=(%04x:%04x)", 2917 2919 quirk, override, 2918 2920 ac97->pci->vendor, ac97->pci->device, ac97->pci->subsystem_vendor, ac97->pci->subsystem_device, 2919 ac97->subsystem_vendor, ac97->subsystem_device) ;2921 ac97->subsystem_vendor, ac97->subsystem_device)); 2920 2922 /* quirk overriden? */ 2921 2923 if (override && strcmp(override, "-1") && strcmp(override, "default")) { 2922 snd_printdd("ac97 quirk for %s (%04x:%04x)\n", override, ac97->subsystem_vendor, ac97->subsystem_device);2924 rprintf(("ac97 quirk for %s (%04x:%04x)", override, ac97->subsystem_vendor, ac97->subsystem_device)); 2923 2925 result = apply_quirk_str(ac97, override); 2924 2926 if (result < 0) 2925 snd_printk(KERN_ERR "applying quirk type %s failed (%d)\n", override, result);2927 rprintf(("applying quirk type %s failed (%d)", override, result)); 2926 2928 return result; 2927 2929 } … … 2943 2945 } 2944 2946 if ( quirk->codec_id && (quirk->codec_id != ac97->id) ) continue; 2945 snd_printdd("ac97 quirk for %s (%04x:%04x)\n", quirk->name, ac97->subsystem_vendor, ac97->subsystem_device);2947 rprintf(("ac97 quirk for %s (%04x:%04x)", quirk->name, ac97->subsystem_vendor, ac97->subsystem_device)); 2946 2948 result = apply_quirk(ac97, quirk->type); 2947 if (result < 0) snd_printk(KERN_ERR "applying quirk type %d for %s failed (%d)\n", quirk->type, quirk->name, result);2949 if (result < 0) rprintf(("applying quirk type %d for %s failed (%d)", quirk->type, quirk->name, result)); 2948 2950 return result; 2949 2951 } -
GPL/branches/uniaud32-2.1.x/alsa-kernel/pci/atiixp.c
r500 r519 352 352 * a static RING of buffer descriptors is used. 353 353 * 354 * the ring is built in this function, and is set up to the hardware. 354 * the ring is built in this function, and is set up to the hardware. 355 355 */ 356 356 static int atiixp_build_dma_packets(struct atiixp *chip, struct atiixp_dma *dma, … … 375 375 } 376 376 377 if (dma->periods == periods && dma->period_bytes == period_bytes) { 378 writel((u32)dma->desc_buf.addr | ATI_REG_LINKPTR_EN, 379 (char*)chip->remap_addr + dma->ops->llp_offset); 377 if (dma->periods == periods && dma->period_bytes == period_bytes) { 378 writel((u32)dma->desc_buf.addr | ATI_REG_LINKPTR_EN, 379 (char*)chip->remap_addr + dma->ops->llp_offset); 380 380 return 0; 381 381 } … … 476 476 { 477 477 unsigned int data; 478 478 479 479 if (snd_atiixp_acquire_codec(chip) < 0) 480 480 return; … … 491 491 struct atiixp *chip = ac97->private_data; 492 492 return snd_atiixp_codec_read(chip, ac97->num, reg); 493 493 494 494 } 495 495 … … 514 514 /* perform a software reset */ 515 515 atiixp_update(chip, CMD, ATI_REG_CMD_AC_SOFT_RESET, ATI_REG_CMD_AC_SOFT_RESET); 516 #pragma disable_message (302) 516 517 atiixp_read(chip, CMD); 517 518 udelay(10); 518 519 atiixp_update(chip, CMD, ATI_REG_CMD_AC_SOFT_RESET, 0); 519 520 520 521 timeout = 10; 521 522 while (! (atiixp_read(chip, CMD) & ATI_REG_CMD_ACLINK_ACTIVE)) { … … 531 532 } 532 533 } 534 #pragma enable_message (302) 533 535 534 536 /* deassert RESET and assert SYNC to make sure */ … … 589 591 ac97_codec = ac97_probing_bugs(chip->pci); 590 592 if (ac97_codec >= 0) { 591 chip->codec_not_ready_bits |= 593 chip->codec_not_ready_bits |= 592 594 CODEC_CHECK_BITS ^ (1 << (ac97_codec + 10)); 593 595 return 0; … … 937 939 atiixp_update(chip, 6CH_REORDER, ATI_REG_6CH_REORDER_EN, 938 940 substream->runtime->channels >= 6 ? ATI_REG_6CH_REORDER_EN: 0); 939 941 940 942 spin_unlock_irq(&chip->reg_lock); 941 943 return 0; -
GPL/branches/uniaud32-2.1.x/alsa-kernel/pci/ca0106/ca0106_proc.c
r499 r519 6 6 * FEATURES currently supported: 7 7 * See ca0106_main.c for features. 8 * 8 * 9 9 * Changelog: 10 10 * Support interrupts per period. … … 272 272 } 273 273 274 static void snd_ca0106_proc_iec958(struct snd_info_entry *entry, 274 static void snd_ca0106_proc_iec958(struct snd_info_entry *entry, 275 275 struct snd_info_buffer *buffer) 276 276 { … … 283 283 (value & 0x200000) ? "SPDIF Locked" : "No SPDIF Lock", 284 284 (value & 0x400000) ? "Audio Valid" : "No valid audio" ); 285 snd_iprintf(buffer, "Estimated sample rate: %u\n", 285 snd_iprintf(buffer, "Estimated sample rate: %u\n", 286 286 ((value & 0xfffff) * 48000) / 0x8000 ); 287 287 if (value & 0x200000) { … … 294 294 } 295 295 296 static void snd_ca0106_proc_reg_write32(struct snd_info_entry *entry, 296 static void snd_ca0106_proc_reg_write32(struct snd_info_entry *entry, 297 297 struct snd_info_buffer *buffer) 298 298 { … … 304 304 if (sscanf(line, "%x %x", ®, &val) != 2) 305 305 continue; 306 if (reg < 0x40 && val <= 0xffffffff) {306 if (reg < 0x40 /* && val <= 0xffffffff DAZ */) { 307 307 spin_lock_irqsave(&emu->emu_lock, flags); 308 308 outl(val, emu->port + (reg & 0xfffffffc)); … … 312 312 } 313 313 314 static void snd_ca0106_proc_reg_read32(struct snd_info_entry *entry, 314 static void snd_ca0106_proc_reg_read32(struct snd_info_entry *entry, 315 315 struct snd_info_buffer *buffer) 316 316 { … … 328 328 } 329 329 330 static void snd_ca0106_proc_reg_read16(struct snd_info_entry *entry, 330 static void snd_ca0106_proc_reg_read16(struct snd_info_entry *entry, 331 331 struct snd_info_buffer *buffer) 332 332 { … … 344 344 } 345 345 346 static void snd_ca0106_proc_reg_read8(struct snd_info_entry *entry, 346 static void snd_ca0106_proc_reg_read8(struct snd_info_entry *entry, 347 347 struct snd_info_buffer *buffer) 348 348 { … … 360 360 } 361 361 362 static void snd_ca0106_proc_reg_read1(struct snd_info_entry *entry, 362 static void snd_ca0106_proc_reg_read1(struct snd_info_entry *entry, 363 363 struct snd_info_buffer *buffer) 364 364 { … … 378 378 } 379 379 380 static void snd_ca0106_proc_reg_read2(struct snd_info_entry *entry, 380 static void snd_ca0106_proc_reg_read2(struct snd_info_entry *entry, 381 381 struct snd_info_buffer *buffer) 382 382 { … … 396 396 } 397 397 398 static void snd_ca0106_proc_reg_write(struct snd_info_entry *entry, 398 static void snd_ca0106_proc_reg_write(struct snd_info_entry *entry, 399 399 struct snd_info_buffer *buffer) 400 400 { … … 405 405 if (sscanf(line, "%x %x %x", ®, &channel_id, &val) != 3) 406 406 continue; 407 if (reg < 0x80 && val <= 0xffffffff &&channel_id <= 3)407 if (reg < 0x80 && /* val <= 0xffffffff && DAZ */ channel_id <= 3) 408 408 snd_ca0106_ptr_write(emu, reg, channel_id, val); 409 409 } 410 410 } 411 411 412 static void snd_ca0106_proc_i2c_write(struct snd_info_entry *entry, 412 static void snd_ca0106_proc_i2c_write(struct snd_info_entry *entry, 413 413 struct snd_info_buffer *buffer) 414 414 { … … 450 450 entry->mode |= S_IWUSR; 451 451 } 452 if(! snd_card_proc_new(emu->card, "ca0106_regs2", &entry)) 452 if(! snd_card_proc_new(emu->card, "ca0106_regs2", &entry)) 453 453 snd_info_set_text_ops(entry, emu, snd_ca0106_proc_reg_read2); 454 454 return 0; -
GPL/branches/uniaud32-2.1.x/alsa-kernel/pci/cmipci.c
r499 r519 957 957 if (rem < rec->dma_size) 958 958 goto ok; 959 } 959 } 960 960 printk(KERN_ERR "cmipci: invalid PCM pointer: %#x\n", rem); 961 961 return SNDRV_PCM_POS_XRUN; -
GPL/branches/uniaud32-2.1.x/alsa-kernel/pci/emu10k1/emu10k1_main.c
r426 r519 712 712 } 713 713 714 #if kthread_create != 0 /* DAZ to stop compiler warning */ 714 715 static int emu1010_firmware_thread(void *data) 715 716 { … … 773 774 return 0; 774 775 } 776 #endif 775 777 776 778 /* -
GPL/branches/uniaud32-2.1.x/alsa-kernel/pci/emu10k1/emu10k1x.c
r499 r519 108 108 /********************************************************************************************************/ 109 109 #define PLAYBACK_LIST_ADDR 0x00 /* Base DMA address of a list of pointers to each period/size */ 110 /* One list entry: 4 bytes for DMA address, 110 /* One list entry: 4 bytes for DMA address, 111 111 * 4 bytes for period_size << 16. 112 112 * One list entry is 8 bytes long. … … 187 187 * - channel 2 is the center/lfe channel 188 188 * Volume is controlled by the AC97 for the front and rear channels by 189 * the PCM Playback Volume, Sigmatel Surround Playback Volume and 189 * the PCM Playback Volume, Sigmatel Surround Playback Volume and 190 190 * Surround Playback Volume. The Sigmatel 4-Speaker Stereo switch affects 191 191 * the front/rear channel mixing in the REAR OUT jack. When using the … … 200 200 int number; 201 201 int use; 202 202 203 203 struct emu10k1x_pcm *epcm; 204 204 }; … … 256 256 /* hardware definition */ 257 257 static struct snd_pcm_hardware snd_emu10k1x_playback_hw = { 258 .info = (SNDRV_PCM_INFO_MMAP | 258 .info = (SNDRV_PCM_INFO_MMAP | 259 259 SNDRV_PCM_INFO_INTERLEAVED | 260 260 SNDRV_PCM_INFO_BLOCK_TRANSFER | … … 275 275 276 276 static struct snd_pcm_hardware snd_emu10k1x_capture_hw = { 277 .info = (SNDRV_PCM_INFO_MMAP | 277 .info = (SNDRV_PCM_INFO_MMAP | 278 278 SNDRV_PCM_INFO_INTERLEAVED | 279 279 SNDRV_PCM_INFO_BLOCK_TRANSFER | … … 293 293 }; 294 294 295 static unsigned int snd_emu10k1x_ptr_read(struct emu10k1x * emu, 296 unsigned int reg, 295 static unsigned int snd_emu10k1x_ptr_read(struct emu10k1x * emu, 296 unsigned int reg, 297 297 unsigned int chn) 298 298 { 299 299 unsigned long flags; 300 300 unsigned int regptr, val; 301 301 302 302 regptr = (reg << 16) | chn; 303 303 … … 309 309 } 310 310 311 static void snd_emu10k1x_ptr_write(struct emu10k1x *emu, 312 unsigned int reg, 313 unsigned int chn, 311 static void snd_emu10k1x_ptr_write(struct emu10k1x *emu, 312 unsigned int reg, 313 unsigned int chn, 314 314 unsigned int data) 315 315 { … … 397 397 epcm->emu = chip; 398 398 epcm->substream = substream; 399 399 400 400 runtime->private_data = epcm; 401 401 runtime->private_free = snd_emu10k1x_pcm_free_substream; 402 402 403 403 runtime->hw = snd_emu10k1x_playback_hw; 404 404 … … 531 531 return 0; 532 532 533 if (ptr3 != ptr4) 533 if (ptr3 != ptr4) 534 534 ptr1 = snd_emu10k1x_ptr_read(emu, PLAYBACK_POINTER, channel); 535 535 ptr2 = bytes_to_frames(runtime, ptr1); … … 653 653 switch (cmd) { 654 654 case SNDRV_PCM_TRIGGER_START: 655 snd_emu10k1x_intr_enable(emu, INTE_CAP_0_LOOP | 655 snd_emu10k1x_intr_enable(emu, INTE_CAP_0_LOOP | 656 656 INTE_CAP_0_HALF_LOOP); 657 657 snd_emu10k1x_ptr_write(emu, TRIGGER_CHANNEL, 0, snd_emu10k1x_ptr_read(emu, TRIGGER_CHANNEL, 0)|TRIGGER_CAPTURE); … … 660 660 case SNDRV_PCM_TRIGGER_STOP: 661 661 epcm->running = 0; 662 snd_emu10k1x_intr_disable(emu, INTE_CAP_0_LOOP | 662 snd_emu10k1x_intr_disable(emu, INTE_CAP_0_LOOP | 663 663 INTE_CAP_0_HALF_LOOP); 664 664 snd_emu10k1x_ptr_write(emu, TRIGGER_CHANNEL, 0, snd_emu10k1x_ptr_read(emu, TRIGGER_CHANNEL, 0) & ~(TRIGGER_CAPTURE)); … … 707 707 unsigned long flags; 708 708 unsigned short val; 709 709 710 710 spin_lock_irqsave(&emu->emu_lock, flags); 711 711 outb(reg, emu->port + AC97ADDRESS); … … 720 720 struct emu10k1x *emu = ac97->private_data; 721 721 unsigned long flags; 722 722 723 723 spin_lock_irqsave(&emu->emu_lock, flags); 724 724 outb(reg, emu->port + AC97ADDRESS); … … 736 736 .read = snd_emu10k1x_ac97_read, 737 737 }; 738 738 739 739 if ((err = snd_ac97_bus(chip->card, 0, &ops, NULL, &pbus)) < 0) 740 740 return err; … … 800 800 snd_emu10k1x_pcm_interrupt(chip, cap_voice); 801 801 else 802 snd_emu10k1x_intr_disable(chip, 802 snd_emu10k1x_intr_disable(chip, 803 803 INTE_CAP_0_LOOP | 804 804 INTE_CAP_0_HALF_LOOP); … … 810 810 if (pvoice->use) 811 811 snd_emu10k1x_pcm_interrupt(chip, pvoice); 812 else 812 else 813 813 snd_emu10k1x_intr_disable(chip, mask); 814 814 } … … 836 836 int err; 837 837 int capture = 0; 838 838 839 839 if (rpcm) 840 840 *rpcm = NULL; … … 844 844 if ((err = snd_pcm_new(emu->card, "emu10k1x", device, 1, capture, &pcm)) < 0) 845 845 return err; 846 846 847 847 pcm->private_data = emu; 848 848 … … 873 873 874 874 snd_pcm_lib_preallocate_pages_for_all(pcm, SNDRV_DMA_TYPE_DEV, 875 snd_dma_pci_data(emu->pci), 875 snd_dma_pci_data(emu->pci), 876 876 32*1024, 32*1024); 877 877 878 878 if (rpcm) 879 879 *rpcm = pcm; 880 880 881 881 return 0; 882 882 } … … 916 916 spin_lock_init(&chip->emu_lock); 917 917 spin_lock_init(&chip->voice_lock); 918 918 919 919 chip->port = pci_resource_start(pci, 0); 920 920 if ((chip->res_port = request_region(chip->port, 8, 921 "EMU10K1X")) == NULL) { 921 "EMU10K1X")) == NULL) { 922 922 snd_printk(KERN_ERR "emu10k1x: cannot allocate the port 0x%lx\n", chip->port); 923 923 snd_emu10k1x_free(chip); … … 932 932 } 933 933 chip->irq = pci->irq; 934 934 935 935 if(snd_dma_alloc_pages(SNDRV_DMA_TYPE_DEV, snd_dma_pci_data(pci), 936 936 4 * 1024, &chip->dma_buffer) < 0) { … … 973 973 */ 974 974 snd_emu10k1x_ptr_write(chip, SPCS0, 0, 975 chip->spdif_bits[0] = 975 chip->spdif_bits[0] = 976 976 SPCS_CLKACCY_1000PPM | SPCS_SAMPLERATE_48 | 977 977 SPCS_CHANNELNUM_LEFT | SPCS_SOURCENUM_UNSPEC | … … 979 979 0x00000000 | SPCS_EMPHASIS_NONE | SPCS_COPYRIGHT); 980 980 snd_emu10k1x_ptr_write(chip, SPCS1, 0, 981 chip->spdif_bits[1] = 981 chip->spdif_bits[1] = 982 982 SPCS_CLKACCY_1000PPM | SPCS_SAMPLERATE_48 | 983 983 SPCS_CHANNELNUM_LEFT | SPCS_SOURCENUM_UNSPEC | … … 985 985 0x00000000 | SPCS_EMPHASIS_NONE | SPCS_COPYRIGHT); 986 986 snd_emu10k1x_ptr_write(chip, SPCS2, 0, 987 chip->spdif_bits[2] = 987 chip->spdif_bits[2] = 988 988 SPCS_CLKACCY_1000PPM | SPCS_SAMPLERATE_48 | 989 989 SPCS_CHANNELNUM_LEFT | SPCS_SOURCENUM_UNSPEC | … … 1006 1006 } 1007 1007 1008 static void snd_emu10k1x_proc_reg_read(struct snd_info_entry *entry, 1008 static void snd_emu10k1x_proc_reg_read(struct snd_info_entry *entry, 1009 1009 struct snd_info_buffer *buffer) 1010 1010 { … … 1034 1034 } 1035 1035 1036 static void snd_emu10k1x_proc_reg_write(struct snd_info_entry *entry, 1036 static void snd_emu10k1x_proc_reg_write(struct snd_info_entry *entry, 1037 1037 struct snd_info_buffer *buffer) 1038 1038 { … … 1045 1045 continue; 1046 1046 1047 if (reg < 0x49 && val <= 0xffffffff &&channel_id <= 2)1047 if (reg < 0x49 && /* val <= 0xffffffff && DAZ */ channel_id <= 2) 1048 1048 snd_emu10k1x_ptr_write(emu, reg, channel_id, val); 1049 1049 } -
GPL/branches/uniaud32-2.1.x/alsa-kernel/pci/emu10k1/memory.c
r499 r519 304 304 if (snd_BUG_ON(!emu)) 305 305 return NULL; 306 if (snd_BUG_ON(runtime->dma_bytes <= 0 ||306 if (snd_BUG_ON(runtime->dma_bytes == 0 || 307 307 runtime->dma_bytes >= MAXPAGES * EMUPAGESIZE)) 308 308 return NULL; … … 370 370 { 371 371 struct snd_emu10k1_memblk *blk; 372 struct snd_util_memhdr *hdr = hw->memhdr; 372 struct snd_util_memhdr *hdr = hw->memhdr; 373 373 374 374 mutex_lock(&hdr->block_mutex); … … 396 396 snd_emu10k1_synth_free(struct snd_emu10k1 *emu, struct snd_util_memblk *memblk) 397 397 { 398 struct snd_util_memhdr *hdr = emu->memhdr; 398 struct snd_util_memhdr *hdr = emu->memhdr; 399 399 struct snd_emu10k1_memblk *blk = (struct snd_emu10k1_memblk *)memblk; 400 400 unsigned long flags; -
GPL/branches/uniaud32-2.1.x/alsa-kernel/pci/hda/hda_intel.c
r517 r519 2558 2558 gcap &= ~ICH6_GCAP_64OK; 2559 2559 2560 #pragma disable_message (135,302) 2560 2561 /* allow 64bit DMA address if supported by H/W */ 2561 2562 if ((gcap & ICH6_GCAP_64OK) && !pci_set_dma_mask(pci, DMA_BIT_MASK(64))) … … 2565 2566 pci_set_consistent_dma_mask(pci, DMA_BIT_MASK(32)); 2566 2567 } 2568 #pragma enable_message (135,302) 2567 2569 2568 2570 /* read number of streams from GCAP register instead of using -
GPL/branches/uniaud32-2.1.x/alsa-kernel/pci/hda/hda_proc.c
r499 r519 1 1 /* 2 2 * Universal Interface for Intel High Definition Audio Codec 3 * 3 * 4 4 * Generic proc interface 5 5 * … … 72 72 i++; /* Update our search position */ 73 73 return i; 74 } 74 } 75 75 #endif 76 76 77 #ifndef TARGET_OS2 77 78 static char *bits_names(unsigned int bits, char *names[], int size) 78 79 { … … 89 90 return buf; 90 91 } 92 #endif 91 93 92 94 static const char *get_wid_type_name(unsigned int wid_value) -
GPL/branches/uniaud32-2.1.x/alsa-kernel/pci/hda/patch_conexant.c
r499 r519 549 549 return err; 550 550 spec->multiout.share_spdif = 1; 551 } 551 } 552 552 if (spec->dig_in_nid) { 553 553 err = snd_hda_create_spdif_in_ctls(codec,spec->dig_in_nid); … … 790 790 spec->hp_present = snd_hda_jack_detect(codec, 0x11); 791 791 792 bits = (spec->hp_present || !spec->cur_eapd) ? HDA_AMP_MUTE : 0; 792 bits = (spec->hp_present || !spec->cur_eapd) ? HDA_AMP_MUTE : 0; 793 793 snd_hda_codec_amp_stereo(codec, 0x10, HDA_OUTPUT, 0, 794 794 HDA_AMP_MUTE, bits); … … 898 898 { 0x13, AC_VERB_SET_CONNECT_SEL, 0x0 }, 899 899 /* EAPD */ 900 {0x10, AC_VERB_SET_EAPD_BTLENABLE, 0x2 }, /* default on */ 900 {0x10, AC_VERB_SET_EAPD_BTLENABLE, 0x2 }, /* default on */ 901 901 {0} /* end */ 902 902 }; … … 1455 1455 {0x18, AC_VERB_SET_DIGI_CONVERT_1, 0}, 1456 1456 1457 /* Ensure mic1, mic2, line1 pin widgets take input from the 1457 /* Ensure mic1, mic2, line1 pin widgets take input from the 1458 1458 * OUT1 sum bus when acting as an output. 1459 1459 */ … … 1786 1786 {0x1c, AC_VERB_SET_CONNECT_SEL, 0x0}, 1787 1787 /* EAPD */ 1788 {0x1a, AC_VERB_SET_EAPD_BTLENABLE, 0x2}, /* default on */ 1788 {0x1a, AC_VERB_SET_EAPD_BTLENABLE, 0x2}, /* default on */ 1789 1789 {0x16, AC_VERB_SET_UNSOLICITED_ENABLE, AC_USRSP_EN|CONEXANT_HP_EVENT}, 1790 1790 {0} /* end */ … … 2977 2977 struct conexant_spec *spec; 2978 2978 int board_config; 2979 int rc; 2979 2980 2980 2981 spec = kzalloc(sizeof(*spec), GFP_KERNEL); … … 3053 3054 spec->dell_vostro = 1; 3054 3055 spec->mic_boost = 3; /* default 30dB gain */ 3055 snd_hda_attach_beep_device(codec, 0x13);3056 rc = snd_hda_attach_beep_device(codec, 0x13); 3056 3057 3057 3058 /* no S/PDIF out */ -
GPL/branches/uniaud32-2.1.x/alsa-kernel/pci/hda/patch_sigmatel.c
r503 r519 4799 4799 4800 4800 if ((codec->subsystem_id >> 16) == PCI_VENDOR_ID_HP) { 4801 while ((dev = dmi_find_device(DMI_DEV_TYPE_OEM_STRING, 4802 NULL, dev))) {4801 #if dmi_find_device != 0 /* DAZ to stop a compler warning */ 4802 while (dev = dmi_find_device(DMI_DEV_TYPE_OEM_STRING, NULL, dev)) { 4803 4803 if (sscanf(dev->name, "HP_Mute_LED_%d_%d", 4804 4804 &spec->gpio_led_polarity, … … 4813 4813 } 4814 4814 } 4815 #endif 4815 4816 4816 4817 /* -
GPL/branches/uniaud32-2.1.x/alsa-kernel/pci/intel8x0.c
r499 r519 2407 2407 iputdword(chip, ICHREG(GLOB_STA), cnt & status); 2408 2408 2409 #ifdef CONFIG_SND_AC97_POWER_SAVE 2409 2410 if (snd_intel8x0_ich_chip_can_cold_reset(chip)) 2410 2411 err = snd_intel8x0_ich_chip_cold_reset(chip); 2411 2412 else 2413 #endif 2412 2414 err = snd_intel8x0_ich_chip_reset(chip); 2413 2415 if (err < 0) … … 2796 2798 t *= 1000000; 2797 2799 t += (stop_time.tv_nsec - start_time.tv_nsec) / 1000; 2798 printk(KERN_INFO "%s: measured %lu usecs (%lu samples)\n", __func__, t, pos);2800 dprintf(("%s: measured %lu usecs (%lu samples)\n", __func__, t, pos)); 2799 2801 if (t == 0) { 2800 2802 snd_printk(KERN_ERR "intel8x0: ?? calculation error..\n"); … … 2817 2819 chip->ac97_bus->clock = (chip->ac97_bus->clock * 48000) / pos; 2818 2820 __end: 2819 printk(KERN_INFO "intel8x0: clocking to %d\n", chip->ac97_bus->clock);2821 dprintf(("intel8x0: clocking to %d\n", chip->ac97_bus->clock)); 2820 2822 snd_ac97_update_power(chip->ac97[0], AC97_PCM_FRONT_DAC_RATE, 0); 2821 2823 } -
GPL/branches/uniaud32-2.1.x/alsa-kernel/pci/trident/trident_memory.c
r399 r519 196 196 int idx, page; 197 197 198 #pragma disable_message (136) 198 199 if (snd_BUG_ON(runtime->dma_bytes <= 0 || 199 200 runtime->dma_bytes > SNDRV_TRIDENT_MAX_PAGES * 200 201 SNDRV_TRIDENT_PAGE_SIZE)) 201 202 return NULL; 203 #pragma enable_message (136) 202 204 hdr = trident->tlb.memhdr; 203 205 if (snd_BUG_ON(!hdr)) … … 212 214 return NULL; 213 215 } 214 216 215 217 /* set TLB entries */ 216 218 idx = 0; … … 245 247 unsigned long ptr; 246 248 249 #pragma disable_message (136) 247 250 if (snd_BUG_ON(runtime->dma_bytes <= 0 || 248 251 runtime->dma_bytes > SNDRV_TRIDENT_MAX_PAGES * 249 252 SNDRV_TRIDENT_PAGE_SIZE)) 250 253 return NULL; 254 #pragma enable_message (136) 251 255 hdr = trident->tlb.memhdr; 252 256 if (snd_BUG_ON(!hdr)) … … 259 263 return NULL; 260 264 } 261 265 262 266 /* set TLB entries */ 263 267 addr = runtime->dma_addr; -
GPL/branches/uniaud32-2.1.x/alsa-kernel/synth/emux/soundfont.c
r499 r519 249 249 parm.type |= SNDRV_SFNT_PAT_SHARED; 250 250 sf = newsf(sflist, parm.type, NULL); 251 } else 251 } else 252 252 sf = newsf(sflist, parm.type, parm.name); 253 253 if (sf == NULL) { … … 543 543 count -= sizeof(hdr); 544 544 545 #pragma disable_message (136) 545 546 if (hdr.nvoices <= 0 || hdr.nvoices >= 100) { 547 #pragma enable_message (136) 546 548 printk(KERN_ERR "Soundfont error: Illegal voice number %d\n", 547 549 hdr.nvoices); … … 1066 1068 (patch.env_rate[5], patch.env_offset[4], 1067 1069 patch.env_offset[5]); 1068 zone->v.parm.volatkhld = 1070 zone->v.parm.volatkhld = 1069 1071 (snd_sf_calc_parm_hold(hold) << 8) | 1070 1072 snd_sf_calc_parm_attack(attack); -
GPL/branches/uniaud32-2.1.x/drv32/init.c
r504 r519 218 218 } 219 219 if (!HeapInit(HEAP_SIZE)) { 220 dprintf(("HeapInit failed!"));220 rprintf(("HeapInit failed!")); 221 221 } 222 222 -
GPL/branches/uniaud32-2.1.x/drv32/irq.cpp
r458 r519 67 67 BYTE LowIRQ; 68 68 BYTE HighIRQ; 69 BYTE Pin; 69 BYTE Pin; 70 70 } sISRHigh[8]; //FIX me to MAX_DEVICES or same 71 71 … … 136 136 ULONG ulIrqNo; 137 137 138 // enable interrupts that have higher priority we should 138 // enable interrupts that have higher priority we should 139 139 // allow higher priority interrupts 140 sti(); 140 sti(); 141 141 if( process_interrupt(ulSlotNo, &ulIrqNo) ) { 142 // We've cleared all service requests. 143 // Clear (disable) Interrupts, Send EOI 142 // We've cleared all service requests. 143 // Clear (disable) Interrupts, Send EOI 144 144 // and clear the carry flag (tells OS/2 kernel that Int was handled). 145 // Note carry flag is handled in setup.asm 145 // Note carry flag is handled in setup.asm 146 146 cli(); 147 147 DevEOI( (WORD16)ulIrqNo ); -
GPL/branches/uniaud32-2.1.x/drv32/rmhelp.cpp
r421 r519 150 150 //****************************************************************************** 151 151 //PS+++ see to irq.cpp 152 #ifdef ACPI 152 #ifdef ACPI 153 153 #ifdef __cplusplus 154 154 extern "C" { … … 159 159 BYTE LowIRQ; 160 160 BYTE HighIRQ; 161 BYTE Pin; 161 BYTE Pin; 162 162 }; 163 163 extern struct SaveIRQForSlot sISRHigh[]; -
GPL/branches/uniaud32-2.1.x/drv32/strategy.c
r504 r519 24 24 25 25 #define INCL_NOPMAPI 26 #define INCL_DOSINFOSEG // Need Global info seg in rm.cpp algorithms26 #define INCL_DOSINFOSEG // Need Global info seg in rm.cpp algorithms 27 27 #include <os2.h> 28 28 … … 51 51 } 52 52 numOS2Opens++; 53 return RPDONE;53 return RPDONE; 54 54 } 55 55 //****************************************************************************** … … 66 66 ULONG StratInit(RP __far* _rp) 67 67 { 68 ULONG rc;69 70 RPInit __far* rp = (RPInit __far*)_rp;71 rc = DiscardableInit(rp);72 dprintf(("StratInit End rc=%d", rc));73 return rc;68 ULONG rc; 69 70 RPInit __far* rp = (RPInit __far*)_rp; 71 rc = DiscardableInit(rp); 72 dprintf(("StratInit End rc=%d", rc)); 73 return rc; 74 74 } 75 75 //****************************************************************************** … … 77 77 #ifdef ACPI 78 78 // See desription in irq.cpp 79 #include "irqos2.h" //PS+++79 #include "irqos2.h" //PS+++ 80 80 #ifdef __cplusplus 81 81 extern "C" { 82 82 #endif 83 ULONG InitCompleteWas = 0; //PS+++ Indication of InitComplete call83 ULONG InitCompleteWas = 0; //PS+++ Indication of InitComplete call 84 84 struct SaveIRQForSlot 85 85 { 86 ULONG ulSlotNo;87 BYTE LowIRQ;88 BYTE HighIRQ;89 BYTE Pin;86 ULONG ulSlotNo; 87 BYTE LowIRQ; 88 BYTE HighIRQ; 89 BYTE Pin; 90 90 }; 91 91 extern struct SaveIRQForSlot sISRHigh[]; 92 extern int SaveIRQCounter;92 extern int SaveIRQCounter; 93 93 #ifdef __cplusplus 94 94 } … … 102 102 #ifdef ACPI 103 103 //PS+++ Begin 104 ULONG i, rc = 0;105 106 InitCompleteWas = 1;107 for (i = 0; i < SaveIRQCounter; i++)108 {109 dprintf(("Close IRQ%d - Open IRQ%d",(ULONG)sISRHigh[i].LowIRQ,(ULONG)sISRHigh[i].HighIRQ));110 if (sISRHigh[i].HighIRQ)111 {112 ALSA_FreeIrq(sISRHigh[i].LowIRQ);113 if (!ALSA_SetIrq(sISRHigh[i].HighIRQ, sISRHigh[i].ulSlotNo, 1))114 {115 return (RPERR_COMMAND | RPDONE);116 }117 }118 }104 ULONG i, rc = 0; 105 106 InitCompleteWas = 1; 107 for (i = 0; i < SaveIRQCounter; i++) 108 { 109 dprintf(("Close IRQ%d - Open IRQ%d",(ULONG)sISRHigh[i].LowIRQ,(ULONG)sISRHigh[i].HighIRQ)); 110 if (sISRHigh[i].HighIRQ) 111 { 112 ALSA_FreeIrq(sISRHigh[i].LowIRQ); 113 if (!ALSA_SetIrq(sISRHigh[i].HighIRQ, sISRHigh[i].ulSlotNo, 1)) 114 { 115 return (RPERR_COMMAND | RPDONE); 116 } 117 } 118 } 119 119 #endif 120 120 //PS++ End 121 #ifdef DEBUG 122 dprintf(("StratInitComplete")); 123 #endif 121 dprintf(("StratInitComplete")); 124 122 return(RPDONE); 125 123 } … … 130 128 #pragma on (unreferenced) 131 129 { 132 RPShutdown __far *rp = (RPShutdown __far *)_rp; 133 134 #ifdef DEBUG 135 dprintf(("StratShutdown %d", rp->Function)); 136 #endif 137 if(rp->Function == 1) {//end of shutdown 138 OSS32_Shutdown(); 139 } 130 RPShutdown __far *rp = (RPShutdown __far *)_rp; 131 132 dprintf(("StratShutdown Start %d", rp->Function)); 133 if(rp->Function == 1) {//end of shutdown 134 OSS32_Shutdown(); 135 } 136 dprintf(("StratShutdown End")); 140 137 return(RPDONE); 141 138 } … … 155 152 RPHandler StratDispatch[] = 156 153 { 157 StratInit, // 00 (BC): Initialization158 StratError, // 01 (B ): Media check159 StratError, // 02 (B ): Build BIOS parameter block160 StratError, // 03 ( ): Unused161 StratRead, // 04 (BC): Read162 StratError, // 05 ( C): Nondestructive read with no wait163 StratError, // 06 ( C): Input status164 StratError, // 07 ( C): Input flush165 StratWrite, // 08 (BC): Write166 StratError, // 09 (BC): Write verify167 StratError, // 0A ( C): Output status168 StratError, // 0B ( C): Output flush169 StratError, // 0C ( ): Unused170 StratOpen, // 0D (BC): Open171 StratClose, // 0E (BC): Close172 StratError, // 0F (B ): Removable media check173 StratIOCtl, // 10 (BC): IO Control174 StratError, // 11 (B ): Reset media175 StratError, // 12 (B ): Get logical unit176 StratError, // 13 (B ): Set logical unit177 StratError, // 14 ( C): Deinstall character device driver178 StratError, // 15 ( ): Unused179 StratError, // 16 (B ): Count partitionable fixed disks180 StratError, // 17 (B ): Get logical unit mapping of fixed disk181 StratError, // 18 ( ): Unused182 StratError, // 19 ( ): Unused183 StratError, // 1A ( ): Unused184 StratError, // 1B ( ): Unused185 StratShutdown, // 1C (BC): Notify start or end of system shutdown186 StratError, // 1D (B ): Get driver capabilities187 StratError, // 1E ( ): Unused188 StratInitComplete // 1F (BC): Notify end of initialization154 StratInit, // 00 (BC): Initialization 155 StratError, // 01 (B ): Media check 156 StratError, // 02 (B ): Build BIOS parameter block 157 StratError, // 03 ( ): Unused 158 StratRead, // 04 (BC): Read 159 StratError, // 05 ( C): Nondestructive read with no wait 160 StratError, // 06 ( C): Input status 161 StratError, // 07 ( C): Input flush 162 StratWrite, // 08 (BC): Write 163 StratError, // 09 (BC): Write verify 164 StratError, // 0A ( C): Output status 165 StratError, // 0B ( C): Output flush 166 StratError, // 0C ( ): Unused 167 StratOpen, // 0D (BC): Open 168 StratClose, // 0E (BC): Close 169 StratError, // 0F (B ): Removable media check 170 StratIOCtl, // 10 (BC): IO Control 171 StratError, // 11 (B ): Reset media 172 StratError, // 12 (B ): Get logical unit 173 StratError, // 13 (B ): Set logical unit 174 StratError, // 14 ( C): Deinstall character device driver 175 StratError, // 15 ( ): Unused 176 StratError, // 16 (B ): Count partitionable fixed disks 177 StratError, // 17 (B ): Get logical unit mapping of fixed disk 178 StratError, // 18 ( ): Unused 179 StratError, // 19 ( ): Unused 180 StratError, // 1A ( ): Unused 181 StratError, // 1B ( ): Unused 182 StratShutdown, // 1C (BC): Notify start or end of system shutdown 183 StratError, // 1D (B ): Get driver capabilities 184 StratError, // 1E ( ): Unused 185 StratInitComplete // 1F (BC): Notify end of initialization 189 186 }; 190 187 //****************************************************************************** … … 199 196 { 200 197 if (rp->Command < sizeof(StratDispatch)/sizeof(StratDispatch[0])) 201 return(StratDispatch[rp->Command](rp));198 return(StratDispatch[rp->Command](rp)); 202 199 else return(RPERR_COMMAND | RPDONE); 203 200 } -
GPL/branches/uniaud32-2.1.x/include/dbgos2.h
r504 r519 32 32 extern int wrOffset; 33 33 extern char *szprintBuf; 34 //void _cdecl DP D(int level,char *x, ...) ; /* not debugging: nothing */35 void _cdecl DPE(char *x, ...) ; /* not debugging: nothing */ 34 //void _cdecl DPE(char *x, ...) ; /* not debugging: nothing */ 35 int _cdecl printk(const char * fmt, ...); 36 36 #ifdef __cplusplus 37 37 } 38 38 #endif 39 39 40 40 41 /* rprintf always prints to the log buffer, and to SIO if enabled */ 41 #define rprintf(a) DPEa42 #define rprintf(a) printk a 42 43 43 44 /* the dprintf functions only print if DEBUG is defined */ 44 45 #ifdef DEBUG 45 46 #define DBG_MAX_BUF_SIZE 0x100000 46 #define dprintf(a) DPEa47 #define dprintf1(a) if(DebugLevel > 0) DPEa48 #define dprintf2(a) if(DebugLevel > 1) DPEa49 #define dprintf3(a) if(DebugLevel > 2) DPEa47 #define dprintf(a) printk a 48 #define dprintf1(a) if(DebugLevel > 0) printk a 49 #define dprintf2(a) if(DebugLevel > 1) printk a 50 #define dprintf3(a) if(DebugLevel > 2) printk a 50 51 #define DebugInt3() ; //_asm int 3 51 52 //#define DebInt3() _asm int 3; -
GPL/branches/uniaud32-2.1.x/include/linux/kthread.h
r305 r519 7 7 #define kthread_create(fn, data, namefmt, ...) NULL 8 8 #define kthread_run(fn, data, namefmt, ...) NULL 9 #define kthread_stop(kt) 09 #define kthread_stop(kt) 10 10 #define kthread_should_stop() 1 11 11 -
GPL/branches/uniaud32-2.1.x/include/linux/pci.h
r499 r519 702 702 #undef pci_disable_msi 703 703 #define pci_disable_msi(dev) 704 extern int snd_pci_dev_present(const struct pci_device_id *ids); 704 705 #define pci_dev_present(x) snd_pci_dev_present(x) 705 706 extern void * __ioremap(unsigned long offset, unsigned long size, unsigned long flags); -
GPL/branches/uniaud32-2.1.x/include/linux/workqueue.h
r499 r519 33 33 int queue_work(struct workqueue_struct *wq, struct work_struct *work); 34 34 void flush_workqueue(struct workqueue_struct *wq); 35 int queue_delayed_work(struct workqueue_struct *wq, struct delayed_work *dwork, unsigned long delay); 36 int cancel_delayed_work(struct delayed_work *dwork); 35 37 36 38 #define INIT_WORK(_work, _func, _data) \ -
GPL/branches/uniaud32-2.1.x/include/proto.h
r479 r519 4 4 extern int _snd_pcm_hw_param_set(struct snd_pcm_hw_params *params, snd_pcm_hw_param_t var, unsigned int val, int dir); 5 5 extern int in_interrupt(void); 6 extern int in_atomic(void); 6 7 /* 7 8 * Uniaud API support -
GPL/branches/uniaud32-2.1.x/lib32/debug.c
r504 r519 250 250 } 251 251 252 char BuildString[1024];253 254 #if 0255 //------------------------- PrintfOut -256 void _cdecl DPD(int level, char *DbgStr, ...)257 {258 char *BuildPtr=BuildString;259 char *pStr=(char *) DbgStr;260 char *SubStr;261 union {262 void *VoidPtr;263 USHORT *WordPtr;264 ULONG *LongPtr;265 ULONG *StringPtr;266 } Parm;267 USHORT wBuildOption;268 269 Parm.VoidPtr=(void *) &DbgStr;270 Parm.StringPtr++; // skip size of string pointer271 272 while (*pStr)273 {274 // don't overflow target275 if (BuildPtr >= (char *) &BuildString[1024-2])276 break;277 278 switch (*pStr)279 {280 case '%':281 wBuildOption=0;282 pStr++;283 if (*pStr=='0')284 {285 wBuildOption|=LEADING_ZEROES;286 pStr++;287 }288 if (*pStr=='u') // always unsigned289 pStr++;290 if (*pStr=='#')291 pStr++;292 293 switch(*pStr)294 {295 case 'x':296 case 'X':297 case 'p':298 case 'P':299 BuildPtr=HexLongToASCII(BuildPtr, *Parm.LongPtr++,wBuildOption);300 pStr++;301 continue;302 303 case 'd':304 BuildPtr=DecLongToASCII(BuildPtr, *Parm.LongPtr++,wBuildOption);305 pStr++;306 continue;307 308 case 's':309 SubStr=(char *)*Parm.StringPtr;310 while (*BuildPtr++ = *SubStr++);311 Parm.StringPtr++;312 BuildPtr--; // remove the \0313 pStr++;314 continue;315 316 case 'l':317 pStr++;318 switch (*pStr)319 {320 case 'x':321 case 'X':322 BuildPtr=HexLongToASCII(BuildPtr, *Parm.LongPtr++,wBuildOption);323 pStr++;324 continue;325 326 case 'd':327 BuildPtr=DecLongToASCII(BuildPtr, *Parm.LongPtr++,wBuildOption);328 pStr++;329 continue;330 } // end switch331 continue; // dunno what he wants332 333 case 0:334 continue;335 } // end switch336 break;337 338 case '\\':339 pStr++;340 switch (*pStr)341 {342 case 'n':343 *BuildPtr++=LF;344 pStr++;345 continue;346 347 case 'r':348 *BuildPtr++=CR;349 pStr++;350 continue;351 352 case 0:353 continue;354 break;355 } // end switch356 357 break;358 } // end switch359 360 *BuildPtr++=*pStr++;361 } // end while362 363 *BuildPtr=0; // cauterize the string364 StringOut((char *) BuildString);365 }366 #endif367 368 void _cdecl DPE(char *DbgStr, ...)369 {370 char *BuildPtr=BuildString;371 char *pStr = (char *) DbgStr;372 char *SubStr;373 union {374 void *VoidPtr;375 USHORT *WordPtr;376 ULONG *LongPtr;377 ULONG *StringPtr;378 } Parm;379 USHORT wBuildOption;380 381 Parm.VoidPtr=(void *) &DbgStr;382 Parm.StringPtr++; // skip size of string pointer383 384 while (*pStr)385 {386 // don't overflow target387 if (BuildPtr >= (char *) &BuildString[1024-2])388 break;389 390 switch (*pStr)391 {392 case '%':393 wBuildOption=0;394 pStr++;395 if (*pStr=='0')396 {397 wBuildOption|=LEADING_ZEROES;398 pStr++;399 }400 // if (*pStr=='u') // always unsigned401 // pStr++;402 403 switch(*pStr)404 {405 case 'x':406 case 'X':407 case 'p':408 case 'P':409 BuildPtr=HexLongToASCII(BuildPtr, *Parm.LongPtr++,wBuildOption);410 pStr++;411 continue;412 413 case 'd':414 case 'u':415 BuildPtr=DecLongToASCII(BuildPtr, *Parm.LongPtr++,wBuildOption);416 pStr++;417 continue;418 419 case 's':420 SubStr=(char *)*Parm.StringPtr;421 while (*BuildPtr++ = *SubStr++);422 Parm.StringPtr++;423 BuildPtr--; // remove the \0424 pStr++;425 continue;426 427 case 'c':428 *BuildPtr++ = (char)*Parm.LongPtr;429 Parm.LongPtr++;430 pStr++;431 continue;432 433 case 'l':434 pStr++;435 switch (*pStr)436 {437 case 'x':438 case 'X':439 BuildPtr=HexLongToASCII(BuildPtr, *Parm.LongPtr++,wBuildOption);440 pStr++;441 continue;442 443 case 'd':444 BuildPtr=DecLongToASCII(BuildPtr, *Parm.LongPtr++,wBuildOption);445 pStr++;446 continue;447 } // end switch448 continue; // dunno what he wants449 450 case 0:451 continue;452 } // end switch453 break;454 455 case '\\':456 pStr++;457 switch (*pStr)458 {459 case 'n':460 *BuildPtr++=LF;461 pStr++;462 continue;463 464 case 'r':465 *BuildPtr++=CR;466 pStr++;467 continue;468 469 case 0:470 continue;471 break;472 } // end switch473 474 break;475 } // end switch476 477 *BuildPtr++=*pStr++;478 } // end while479 480 *BuildPtr=0; // cauterize the string481 StringOut((char *) BuildString);482 }483 484 252 struct snd_info_buffer { 485 253 char *buffer; /* pointer to begin of buffer */ -
GPL/branches/uniaud32-2.1.x/lib32/fminstrload.c
r305 r519 42 42 #include "instrfm.h" 43 43 44 #define assert(a) 44 #define assert(a) 45 45 46 46 typedef struct sbi_header … … 101 101 { 102 102 midihandle *pHandle = (midihandle *)streamid; 103 103 104 104 if(pHandle == NULL || pHandle->magic != MAGIC_MIDI_ALSA32) { 105 105 DebugInt3(); … … 119 119 //load drums 120 120 load_sb(pHandle, drumsopl3, sizeof(drumsopl3), 128); 121 121 122 122 return OSSERR_SUCCESS; 123 123 } … … 226 226 * Parse standard .sb or .o3 file 227 227 */ 228 static void load_sb (midihandle *pHandle, char *pFile, int filesize, int bank) 228 static void load_sb (midihandle *pHandle, char *pFile, int filesize, int bank) 229 229 { 230 230 int len, i, offset = 0; … … 245 245 if (!strncmp (sbi_instr.header.key, "SBI\032", 4) || !strncmp (sbi_instr.header.key, "2OP\032", 4)) { 246 246 fm_instr_type = FM_PATCH_OPL2; 247 } 248 else 247 } 248 else 249 249 if (!strncmp (sbi_instr.header.key, "4OP\032", 4)) { 250 250 fm_instr_type = FM_PATCH_OPL3; 251 } 251 } 252 252 else { 253 253 fm_instr_type = 0; … … 374 374 memset(*ptr, 0, sizeof(snd_instr_header_t) + len); 375 375 (*ptr)->len = len; 376 376 377 377 return 0; 378 378 } -
GPL/branches/uniaud32-2.1.x/lib32/ioctl.c
r479 r519 284 284 if(pcminfo == NULL) { 285 285 DebugInt3(); 286 printk("GetUniaudPcmCaps: out of memory\n");286 rprintf(("GetUniaudPcmCaps: out of memory")); 287 287 return OSSERR_OUT_OF_MEMORY; 288 288 } … … 302 302 if(ret != OSSERR_SUCCESS) 303 303 { 304 printk("GetUniaudPcmCaps: wave open error %i %s at pcm %i\n", ret,305 (j == 0) ?"PLAY":"REC", i) ;304 rprintf(("GetUniaudPcmCaps: wave open error %i %s at pcm %i", ret, 305 (j == 0) ?"PLAY":"REC", i)); 306 306 continue; 307 307 // goto fail; … … 309 309 pHandle = (soundhandle *)streamid; 310 310 if(pHandle == NULL || pHandle->magic != MAGIC_WAVE_ALSA32) { 311 printk("GetUniaudPcmCaps: invalid stream id \n");311 rprintf(("GetUniaudPcmCaps: invalid stream id")); 312 312 ret = OSSERR_INVALID_STREAMID; 313 313 // goto fail; … … 317 317 pHandle->file.f_flags = O_NONBLOCK; 318 318 319 printk("GetUniaudPcmCaps: cp1. phandle %x\n", pHandle);319 dprintf(("GetUniaudPcmCaps: cp1. phandle %x", pHandle)); 320 320 ret = pHandle->file.f_op->ioctl(&pHandle->inode, &pHandle->file, SNDRV_PCM_IOCTL_INFO, (ULONG)pcminfo); 321 321 if(ret != 0) { 322 printk("GetUniaudPcmCaps: SNDRV_PCM_IOCTL_INFO error %i\n", ret);322 rprintf(("GetUniaudPcmCaps: SNDRV_PCM_IOCTL_INFO error %i", ret)); 323 323 ret = UNIXToOSSError(ret); 324 324 continue; … … 335 335 pWaveCaps->nrStreams = pcminfo->subdevices_count; 336 336 337 printk("GetUniaudPcmCaps: cp2. nr of streams: %i\n", pWaveCaps->nrStreams);337 dprintf(("GetUniaudPcmCaps: cp2. nr of streams: %i", pWaveCaps->nrStreams)); 338 338 //get all hardware parameters 339 339 _snd_pcm_hw_params_any(params); 340 340 ret = pHandle->file.f_op->ioctl(&pHandle->inode, &pHandle->file, SNDRV_PCM_IOCTL_HW_REFINE, (ULONG)params); 341 341 if(ret != 0) { 342 printk("GetUniaudPcmCaps: SNDRV_PCM_IOCTL_HW_REFINE error %i\n", ret);342 rprintf(("GetUniaudPcmCaps: SNDRV_PCM_IOCTL_HW_REFINE error %i", ret)); 343 343 ret = UNIXToOSSError(ret); 344 344 //goto fail; 345 345 continue; 346 346 } 347 printk("GetUniaudPcmCaps: cp3\n");347 //dprintf("GetUniaudPcmCaps: cp3")); 348 348 349 349 pWaveCaps->ulMinChannels = hw_param_interval(params, SNDRV_PCM_HW_PARAM_CHANNELS)->min; 350 350 pWaveCaps->ulMaxChannels = hw_param_interval(params, SNDRV_PCM_HW_PARAM_CHANNELS)->max; 351 printk("chan: from %i to %i\n", pWaveCaps->ulMinChannels,pWaveCaps->ulMaxChannels);351 dprintf(("chan: from %i to %i\n", pWaveCaps->ulMinChannels,pWaveCaps->ulMaxChannels)); 352 352 pWaveCaps->ulChanFlags = 0; 353 353 if(pWaveCaps->ulMinChannels == 1) { … … 368 368 369 369 mask = hw_param_mask(params, SNDRV_PCM_HW_PARAM_RATE_MASK); 370 //mask = hw_param_mask(params, SNDRV_PCM_HW_PARAM_FORMAT);370 //mask = hw_param_mask(params, SNDRV_PCM_HW_PARAM_FORMAT); 371 371 pWaveCaps->ulRateFlags = mask->bits[0]; 372 372 … … 403 403 pcms = pcm_instances(deviceid); 404 404 405 printk("pcms = %i\n", pcms); //uncommented405 dprintf(("FillCaps: pcms=%i\n", pcms)); 406 406 if (!pcmcaps[deviceid]) 407 407 { -
GPL/branches/uniaud32-2.1.x/lib32/irq.c
r504 r519 87 87 { 88 88 if(RMRequestIRQ(/*hResMgr,*/ irq , (x0 & SA_SHIRQ) != 0) == FALSE) { 89 dprintf(("RMRequestIRQ failed for irq %d", irq));89 rprintf(("RMRequestIRQ failed for irq %d", irq)); 90 90 // return 0; 91 91 } … … 113 113 } 114 114 115 dprintf(("request_irq: Unable to register irq handler for irq %d\n", irq & 0xff ));115 rprintf(("request_irq: Unable to register irq handler for irq %d\n", irq & 0xff )); 116 116 return 1; 117 117 } -
GPL/branches/uniaud32-2.1.x/lib32/malloc.cpp
r504 r519 415 415 for (pmb=pmbFree->pmbNext; pmb; pmb=pmb->pmbNext) { 416 416 if (after(pmb) == pmbFree) { 417 // d dprintf("HEAP: compact found pointer %p (size=%ui) before pmbFree %p\n", (void __far *) pmb, pmb->uSize, (void __far *) pmbFree);417 // dprintf(("HEAP: compact found pointer %p (size=%ui) before pmbFree %p\n", (void __far *) pmb, pmb->uSize, (void __far *) pmbFree)); 418 418 pmb->ulSize += HDR_SIZE + pmbFree->ulSize; 419 419 remove(pmbFree); 420 420 if (++sFreed == 2) break; 421 421 } else if (after(pmbFree) == pmb) { 422 // d dprintf("HEAP: compact found pointer %p (size=%ui) after pmbFree %p\n", (void __far *) pmb, pmb->uSize, (void __far *) pmbFree);422 // dprintf(("HEAP: compact found pointer %p (size=%ui) after pmbFree %p\n", (void __far *) pmb, pmb->uSize, (void __far *) pmbFree); 423 423 pmbFree->ulSize += HDR_SIZE + pmb->ulSize; 424 424 remove(pmb); -
GPL/branches/uniaud32-2.1.x/lib32/memory.cpp
r504 r519 264 264 //oops, this didn't work, fail 265 265 VMFree((LINEAR)addr); 266 dprintf(("get_free_dma_pages failed %x size:%x st:%x end:%x, trying wasteful method instead", physaddr,size,startpage,endpage));266 dprintf(("get_free_dma_pages failed %x size:%x st:%x end:%x, trying wasteful method instead", physaddr, size, startpage, endpage)); 267 267 return 0; 268 268 } … … 279 279 //only done to save size of memory block 280 280 AddBaseAddress(addr, addr, size); 281 dprintf(("get_free_dma_pages %d -> %x (phys %x)", size, (ULONG)addr, virt_to_phys((void *)addr)));282 281 ulget_free_pagesMemUsed += size; 283 dprintf(("get_free_dma_pages: total alloc size %d", ulget_free_pagesMemUsed)); 282 dprintf(("get_free_dma_pages: size=%x adr=%x (phys %x) total alloc size=%x", 283 size, (ULONG)addr, virt_to_phys((void *)addr), ulget_free_pagesMemUsed)); 284 284 } 285 285 … … 354 354 } 355 355 if(addr) { 356 dprintf(("get_free_pages %d (%d) -> %x (phys %x)", allocsize, size, (ULONG)addr, virt_to_phys((void *)addr)));356 //dprintf(("get_free_pages %d (%d) -> %x (phys %x)", allocsize, size, (ULONG)addr, virt_to_phys((void *)addr))); 357 357 ulget_free_pagesMemUsed += allocsize; 358 dprintf(("get_free_pages: total alloc size %d", ulget_free_pagesMemUsed));358 //dprintf(("get_free_pages: total alloc size %d", ulget_free_pagesMemUsed)); 359 359 } 360 360 return (void *)addr; … … 373 373 } 374 374 else { 375 dprintf(("free_pages %x size %d", (ULONG)addr, size));375 //dprintf(("free_pages %x size %d", (ULONG)addr, size)); 376 376 ulget_free_pagesMemUsed -= size; 377 dprintf(("free_pages: total alloc size %d", ulget_free_pagesMemUsed));377 //dprintf(("free_pages: total alloc size %d", ulget_free_pagesMemUsed)); 378 378 } 379 379 //dprintf(("free_pages %x", addr)); -
GPL/branches/uniaud32-2.1.x/lib32/misc.c
r506 r519 40 40 #include <dbgos2.h> 41 41 42 void StringOut(char *DbgStr); 43 42 44 struct new_utsname system_utsname = {0}; 43 45 struct resource ioport_resource = {NULL, 0, 0, IORESOURCE_IO, NULL, NULL, NULL}; … … 75 77 } 76 78 77 dprintf( (pszLastALSAError) ); 79 StringOut(pszLastALSAError); 80 // rprintf( (pszLastALSAError) ); 78 81 if(++iLastError > 1) { 79 82 iLastError = 0; -
GPL/branches/uniaud32-2.1.x/lib32/ossidc.cpp
r517 r519 109 109 110 110 if(DevSetTimer(TimerHandler16) != 0) { 111 dprintf(("DevSetTimer failed!!"));111 rprintf(("DevSetTimer failed!!")); 112 112 DebugInt3(); 113 113 return OSSERR_INIT_FAILED; … … 165 165 return OSSERR_SUCCESS; 166 166 } 167 dprintf(("OSS32_Initialize. FAILED"));167 rprintf(("OSS32_Initialize. FAILED")); 168 168 return OSSERR_INIT_FAILED; 169 169 } … … 173 173 OSSRET OSS32_Shutdown() 174 174 { 175 dprintf(("OSS32_Shutdown 1")); 175 176 CallOSS16(IDC16_EXIT, 0, 0); 177 dprintf(("OSS32_Shutdown 2")); 176 178 177 179 for(int i=0;i<nrCardsDetected;i++) { … … 179 181 } 180 182 183 dprintf(("OSS32_Shutdown 3")); 181 184 call_module_exit(alsa_mpu401_uart_exit); 185 dprintf(("OSS32_Shutdown 4")); 182 186 call_module_exit(alsa_opl3_seq_exit); 187 dprintf(("OSS32_Shutdown 5")); 183 188 call_module_exit(alsa_opl3_exit); 189 dprintf(("OSS32_Shutdown 6")); 184 190 call_module_exit(alsa_seq_exit); 191 dprintf(("OSS32_Shutdown 7")); 185 192 call_module_exit(alsa_rawmidi_exit); 193 dprintf(("OSS32_Shutdown 8")); 186 194 call_module_exit(alsa_timer_exit); 195 dprintf(("OSS32_Shutdown 9")); 187 196 call_module_exit(alsa_hwdep_exit); 197 dprintf(("OSS32_Shutdown 10")); 188 198 call_module_exit(alsa_pcm_exit); 199 dprintf(("OSS32_Shutdown 11")); 189 200 call_module_exit(alsa_sound_exit); 201 dprintf(("OSS32_Shutdown 12")); 190 202 191 203 return OSSERR_SUCCESS; -
GPL/branches/uniaud32-2.1.x/lib32/pci.c
r517 r519 477 477 u16 pci_command; 478 478 479 printk("pci_enable_device %x\n", dev);479 dprintf(("pci_enable_device %x\n", dev)); 480 480 481 481 pci_read_config_word(dev, PCI_COMMAND, &pci_command); … … 495 495 496 496 iNumCards = 0; 497 ulLast = 0; 498 pcidev=&pci_devices[0]; 497 498 /* find an empty slot */ 499 for (iTmp=0; iTmp<MAX_PCI_DEVICES; iTmp++) { 500 if (pci_devices[iTmp].devfn == 0) break; 501 } 502 if (iTmp >= MAX_PCI_DEVICES) return 0; 503 pcidev = &pci_devices[iTmp]; 499 504 500 505 for( iTableIx = 0; driver->id_table[iTableIx].vendor; iTableIx++) { 501 502 if (pcidev->devfn) { /* find an empty slot */ 503 for (iTmp=0; iTmp<MAX_PCI_DEVICES; iTmp++) { 504 if (pci_devices[iTmp].devfn == 0) break; 505 } 506 if (iTmp >= MAX_PCI_DEVICES) break; 507 pcidev=&pci_devices[iTmp]; 508 } 509 510 506 ulLast = 0; 511 507 while( (ulLast = pci_query_device(&driver->id_table[iTableIx], pcidev, ulLast)) ) { 508 509 512 510 RMInit(); 513 511 dprintf(("pci_register_driver: found=%x:%x searching for %x:%x\n", … … 521 519 RMDone((pcidev->device << 16) | pcidev->vendor); 522 520 iNumCards++; 521 522 /* find another empty slot */ 523 for (iTmp=0; iTmp<MAX_PCI_DEVICES; iTmp++) { 524 if (pci_devices[iTmp].devfn == 0) break; 525 } 526 if (iTmp >= MAX_PCI_DEVICES) break; 527 pcidev = &pci_devices[iTmp]; 523 528 } else pcidev->devfn = 0; 524 529 … … 612 617 int gfp = GFP_ATOMIC; 613 618 int order; 614 #ifdef DEBUG615 619 dprintf(("pci_alloc_consistent %d mask %x", size, (hwdev) ? hwdev->dma_mask : 0)); 616 #endif617 620 if (hwdev == NULL || hwdev->dma_mask != 0xffffffff) { 618 621 //try not to exhaust low memory (< 16mb) so allocate from the high region first … … 965 968 struct pci_driver *driver; 966 969 967 dprintf(("OSS32_APMSuspend "));970 dprintf(("OSS32_APMSuspend 1")); 968 971 969 972 fSuspended = TRUE; … … 980 983 } 981 984 985 dprintf(("OSS32_APMSuspend 2")); 982 986 return OSSERR_SUCCESS; 983 987 } -
GPL/branches/uniaud32-2.1.x/lib32/sound.c
r516 r519 281 281 } 282 282 } else { 283 printk("HDA audio detected - don't support 5512 - 32000 Hz audio sample rates\n");283 dprintf(("HDA audio detected - don't support 5512 - 32000 Hz audio sample rates\n")); 284 284 } 285 285 if(fuRates & SNDRV_PCM_RATE_44100) { … … 331 331 int max_ch; 332 332 333 #ifdef DEBUG334 333 dprintf(("OSS32_QueryDevCaps")); 335 #endif336 334 // max_ch = GetMaxChannels(deviceid, OSS32_CAPS_WAVE_PLAYBACK); 337 335 … … 340 338 if(pcminfo == NULL) { 341 339 DebugInt3(); 342 printk("OSS32_QueryDevCaps: out of memory\n");340 rprintf(("OSS32_QueryDevCaps: out of memory\n")); 343 341 return OSSERR_OUT_OF_MEMORY; 344 342 } 345 343 params = (struct snd_pcm_hw_params *)(pcminfo+1); 346 344 347 printk("Number of cards: %i",nrCardsDetected); 348 printk("dev id: %i",deviceid); 345 dprintf(("Number of cards=%i dev id=%i", nrCardsDetected, deviceid)); 349 346 pDevCaps->nrDevices = 1;//nrCardsDetected; 350 347 // pDevCaps->nrDevices = nrCardsDetected; … … 359 356 if(ret != OSSERR_SUCCESS) 360 357 { 361 printk("OSS32_QueryDevCaps: wave open error %i\n", ret);358 rprintf(("OSS32_QueryDevCaps: wave open error %i\n", ret)); 362 359 DebugInt3(); 363 360 goto fail; … … 365 362 pHandle = (soundhandle *)streamid; 366 363 if(pHandle == NULL || pHandle->magic != MAGIC_WAVE_ALSA32) { 367 printk("OSS32_QueryDevCaps: invalid stream id \n");364 rprintf(("OSS32_QueryDevCaps: invalid stream id \n")); 368 365 ret = OSSERR_INVALID_STREAMID; 369 366 goto fail; … … 374 371 ret = pHandle->file.f_op->ioctl(&pHandle->inode, &pHandle->file, SNDRV_PCM_IOCTL_INFO, (ULONG)pcminfo); 375 372 if(ret != 0) { 376 printk("OSS32_QueryDevCaps: SNDRV_PCM_IOCTL_INFO error %i\n", ret);373 rprintf(("OSS32_QueryDevCaps: SNDRV_PCM_IOCTL_INFO error %i\n", ret)); 377 374 ret = UNIXToOSSError(ret); 378 375 goto fail; … … 384 381 else strncpy(pDevCaps->szDeviceName, pcminfo->id, sizeof(pDevCaps->szDeviceName)); 385 382 } 386 printk("Device name: %s", pDevCaps->szDeviceName);383 dprintf(("Device name: %s", pDevCaps->szDeviceName)); 387 384 pWaveCaps->nrStreams = pcminfo->subdevices_count; 388 385 … … 391 388 ret = pHandle->file.f_op->ioctl(&pHandle->inode, &pHandle->file, SNDRV_PCM_IOCTL_HW_REFINE, (ULONG)params); 392 389 if(ret != 0) { 393 printk("OSS32_QueryDevCaps: SNDRV_PCM_IOCTL_HW_REFINE error %i\n", ret);390 rprintf(("OSS32_QueryDevCaps: SNDRV_PCM_IOCTL_HW_REFINE error %i\n", ret)); 394 391 ret = UNIXToOSSError(ret); 395 392 goto fail; … … 468 465 if(OSS32_MixQueryName(deviceid, &pDevCaps->szMixerName, sizeof(pDevCaps->szMixerName)) != OSSERR_SUCCESS) { 469 466 DebugInt3(); 470 printk("OSS32_QueryDevCaps: OSS32_MixQueryName error\n");467 rprintf(("OSS32_QueryDevCaps: OSS32_MixQueryName error\n")); 471 468 goto fail; 472 469 } 473 printk("OSS32_QueryDevCaps: devname: [%s]\n", pDevCaps->szDeviceName);470 dprintf(("OSS32_QueryDevCaps: devname: [%s]\n", pDevCaps->szDeviceName)); 474 471 kfree(pcminfo); 475 472 streamid = 0; … … 479 476 480 477 fail: 481 printk("OSS32_QueryDevCaps failed\n");478 rprintf(("OSS32_QueryDevCaps failed\n")); 482 479 DebugInt3(); 483 480 if(streamid) OSS32_WaveClose(streamid); … … 497 494 else 498 495 { 499 printk("ERROR: invalid stream id pointer passed\n");496 rprintf(("ERROR: invalid stream id pointer\n")); 500 497 return OSSERR_OUT_OF_MEMORY; 501 498 } … … 503 500 if(alsa_fops == NULL) { 504 501 DebugInt3(); 505 #ifdef DEBUG 506 dprintf(("OSS32_WaveOpen: no devices")); 507 #endif 508 printk("OSS32_WaveOpen: no devices\n"); 502 rprintf(("OSS32_WaveOpen: no devices")); 509 503 510 504 return OSSERR_NO_DEVICE_AVAILABLE; 511 505 } 512 506 513 // printk("dev id: %i\n",deviceid);507 //dprintf(("dev id: %i\n",deviceid)); 514 508 515 509 pHandle = kmalloc(sizeof(soundhandle), GFP_KERNEL); 516 510 if(pHandle == NULL) { 517 511 DebugInt3(); 518 printk("OSS32_WaveOpen: out of memory\n");512 rprintf(("OSS32_WaveOpen: out of memory\n")); 519 513 return OSSERR_OUT_OF_MEMORY; 520 514 } … … 540 534 DebugInt3(); 541 535 kfree(pHandle); 542 printk("OSS32_WaveOpen: invalid parameter\n");536 rprintf(("OSS32_WaveOpen: invalid parameter\n")); 543 537 return OSSERR_INVALID_PARAMETER; 544 538 } 545 539 546 540 ret = alsa_fops->open(&pHandle->inode, &pHandle->file); 547 printk("OSS32_WaveOpen. ret: %i\n", ret);541 //dprintf(("OSS32_WaveOpen. ret: %i\n", ret)); 548 542 /* check if PCM already opened (stupid uniaud16.sys doesnt closes it) */ 549 543 if (ret == -16) … … 564 558 kfree(opened_handles[i].handle); //free handle data 565 559 ret = alsa_fops->open(&pHandle->inode, &pHandle->file); 566 printk("OSS32_WaveOpen. Reopen ret: %i\n", ret);560 dprintf(("OSS32_WaveOpen. Reopen ret: %i\n", ret)); 567 561 } 568 562 else … … 592 586 kfree(pHandle); 593 587 DebugInt3(); 594 printk("OSS32_WaveOpen: open error: %i\n",ret);588 rprintf(("OSS32_WaveOpen: open error: %i\n",ret)); 595 589 return UNIXToOSSError(ret); 596 590 } … … 599 593 *pStreamId = (ULONG)pHandle; 600 594 // filling opened handles table 601 printk("OSS32_WaveOpen. streamid %X\n",(ULONG)pHandle);595 dprintf(("OSS32_WaveOpen. streamid %X\n",(ULONG)pHandle)); 602 596 return OSSERR_SUCCESS; 603 597 } … … 612 606 if(pHandle == NULL || pHandle->magic != MAGIC_WAVE_ALSA32) { 613 607 DebugInt3(); 614 printk("OSS32_WaveClose. invalid streamid %X\n",(ULONG)pHandle);608 rprintf(("OSS32_WaveClose. invalid streamid %X\n",(ULONG)pHandle)); 615 609 return OSSERR_INVALID_STREAMID; 616 610 } … … 623 617 if (opened_handles[i].handle == pHandle) 624 618 { 625 printk("Found phandle for closing: %x reuse flag: %i\n", pHandle, opened_handles[i].reuse);619 dprintf(("Found phandle for closing: %x reuse flag: %i\n", pHandle, opened_handles[i].reuse)); 626 620 if (!opened_handles[i].reuse) 627 621 { … … 643 637 { 644 638 //all already closed 645 printk("phandle %x not found\n", pHandle);639 dprintf(("phandle %x not found\n", pHandle)); 646 640 // return OSSERR_SUCCESS; 647 641 } … … 649 643 650 644 if(ret) { 651 printk("Error closing wave. rc = %i\n", ret);645 dprintf(("Error closing wave. rc = %i\n", ret)); 652 646 DebugInt3(); 653 647 return UNIXToOSSError(ret); 654 648 } 655 printk("OSS32_WaveClose. streamid %X\n",(ULONG)pHandle);649 dprintf(("OSS32_WaveClose. streamid %X\n", (ULONG)pHandle)); 656 650 return OSSERR_SUCCESS; 657 651 } … … 663 657 int ret; 664 658 665 #ifdef DEBUG666 659 dprintf(("OSS32_WavePrepare")); 667 #endif668 660 669 661 if(pHandle == NULL || pHandle->magic != MAGIC_WAVE_ALSA32) { 670 662 DebugInt3(); 671 //#ifdef DEBUG 672 printk("vladest: OSS32_WavePrepare: invalid streamID\n"); 673 //#endif 663 rprintf(("vladest: OSS32_WavePrepare: invalid streamID\n")); 674 664 675 665 return OSSERR_INVALID_STREAMID; … … 680 670 ret = pHandle->file.f_op->ioctl(&pHandle->inode, &pHandle->file, SNDRV_PCM_IOCTL_PREPARE, 0); 681 671 if (ret) 682 printk("Wave prepare ret = %i, streamid %X\n",ret,(ULONG)pHandle);672 rprintf(("Wave prepare ret = %i, streamid %X\n",ret,(ULONG)pHandle)); 683 673 684 674 return UNIXToOSSError(ret);; … … 699 689 ret = pHandle->file.f_op->ioctl(&pHandle->inode, &pHandle->file, SNDRV_PCM_IOCTL_START, 0); 700 690 if (ret) 701 printk("Wave start ret = %i, streamid %X\n",ret,(ULONG)pHandle);691 rprintf(("Wave start ret = %i, streamid %X\n",ret,(ULONG)pHandle)); 702 692 703 693 return UNIXToOSSError(ret);; … … 719 709 ret = pHandle->file.f_op->ioctl(&pHandle->inode, &pHandle->file, SNDRV_PCM_IOCTL_DROP, 0); 720 710 if (ret) 721 printk("Wave stop ret = %i. streamid %X\n",ret,(ULONG)pHandle);711 rprintf(("Wave stop ret = %i. streamid %X\n",ret,(ULONG)pHandle)); 722 712 723 713 return UNIXToOSSError(ret);; … … 739 729 ret = pHandle->file.f_op->ioctl(&pHandle->inode, &pHandle->file, SNDRV_PCM_IOCTL_PAUSE, 0); 740 730 if (ret) 741 printk("Wave pause ret = %i, streamid %X\n",ret,(ULONG)pHandle);731 rprintf(("Wave pause ret = %i, streamid %X\n",ret,(ULONG)pHandle)); 742 732 743 733 return UNIXToOSSError(ret);; … … 759 749 ret = pHandle->file.f_op->ioctl(&pHandle->inode, &pHandle->file, SNDRV_PCM_IOCTL_PAUSE, 1); 760 750 if (ret) 761 printk("Wave resume ret = %i, streamid %X\n",ret,(ULONG)pHandle);751 rprintf(("Wave resume ret = %i, streamid %X\n",ret,(ULONG)pHandle)); 762 752 763 753 return UNIXToOSSError(ret);; … … 801 791 } 802 792 if ((int)pHwParams->ulNumChannels <= 0) { 803 printk("OSS32_WaveSetHwParams error. Invalid number of channels: %i\n", pHwParams->ulNumChannels);793 rprintf(("OSS32_WaveSetHwParams error. Invalid number of channels: %i\n", pHwParams->ulNumChannels)); 804 794 DebugInt3(); 805 795 return OSSERR_INVALID_PARAMETER; … … 840 830 ret = pHandle->file.f_op->ioctl(&pHandle->inode, &pHandle->file, SNDRV_PCM_IOCTL_HW_REFINE, (ULONG)__Stack32ToFlat(¶ms)); 841 831 if(ret != 0) { 842 dprintf(("invalid format %lx\n", OSSToALSADataType[pHwParams->ulDataType]));832 rprintf(("invalid format %lx\n", OSSToALSADataType[pHwParams->ulDataType])); 843 833 return UNIXToOSSError(ret); 844 834 } … … 847 837 ret = pHandle->file.f_op->ioctl(&pHandle->inode, &pHandle->file, SNDRV_PCM_IOCTL_HW_REFINE, (ULONG)__Stack32ToFlat(¶ms)); 848 838 if(ret != 0) { 849 dprintf(("invalid number of sample bits %d\n", pHwParams->ulBitsPerSample));839 rprintf(("invalid number of sample bits %d\n", pHwParams->ulBitsPerSample)); 850 840 return UNIXToOSSError(ret); 851 841 } … … 854 844 ret = pHandle->file.f_op->ioctl(&pHandle->inode, &pHandle->file, SNDRV_PCM_IOCTL_HW_REFINE, (ULONG)__Stack32ToFlat(¶ms)); 855 845 if(ret != 0) { 856 dprintf(("invalid number of frame bits %d\n", pHwParams->ulBitsPerSample*pHwParams->ulNumChannels));846 rprintf(("invalid number of frame bits %d\n", pHwParams->ulBitsPerSample*pHwParams->ulNumChannels)); 857 847 return UNIXToOSSError(ret); 858 848 } … … 871 861 ret = pHandle->file.f_op->ioctl(&pHandle->inode, &pHandle->file, SNDRV_PCM_IOCTL_HW_REFINE, (ULONG)__Stack32ToFlat(¶ms)); 872 862 if(ret != 0) { 873 dprintf(("32_WSetHwPms (first pass) error %d bps:%d fmt: %d ch: %d sr: %d\n",863 rprintf(("32_WSetHwPms (first pass) error %d bps:%d fmt: %d ch: %d sr: %d\n", 874 864 ret, 875 865 pHwParams->ulBitsPerSample, … … 947 937 } 948 938 else { 949 dprintf(("32_WSHwPrms error. Invalid periodsize (=0). closing file\n"));939 rprintf(("32_WSHwPrms error. Invalid periodsize (=0). closing file\n")); 950 940 DebugInt3(); 951 941 return OSSERR_INVALID_PARAMETER; … … 964 954 //so we make sure it's an even number. 965 955 if(nrperiods == 1) { 966 dprintf(("32_WSHwPrms error. Invalid Num periods(=1). closing file\n"));956 rprintf(("32_WSHwPrms error. Invalid Num periods(=1). closing file\n")); 967 957 DebugInt3(); 968 958 return OSSERR_INVALID_PARAMETER; … … 1006 996 ret = pHandle->file.f_op->ioctl(&pHandle->inode, &pHandle->file, SNDRV_PCM_IOCTL_PREPARE, 0); 1007 997 fTryAgain = TRUE; 1008 dprintf((" Error -77 from first IOCTL HW Parms"));998 rprintf((" Error -77 from first IOCTL HW Parms")); 1009 999 goto tryagain; 1010 1000 } … … 1024 1014 } 1025 1015 } 1026 dprintf(("Error %ld second time.. Bailing", ret));1016 rprintf(("Error %ld second time.. Bailing", ret)); 1027 1017 return UNIXToOSSError(ret); 1028 1018 } … … 1056 1046 (status.state != SNDRV_PCM_STATE_RUNNING) && 1057 1047 (status.state != SNDRV_PCM_STATE_DRAINING))) { 1058 dprintf(("Device is not in proper state: %lx. Calling prepare\n", status.state));1048 rprintf(("Device is not in proper state: %lx. Calling prepare\n", status.state)); 1059 1049 ret = pHandle->file.f_op->ioctl(&pHandle->inode, &pHandle->file, SNDRV_PCM_IOCTL_PREPARE, 0); 1060 1050 } … … 1149 1139 while (ulSize && ulJ && iRet) 1150 1140 { 1151 for ( i=0; i < 1000; i++)1141 for (ulI=0; ulI < 1000; ulI++) 1152 1142 { 1153 1143 iRet1 = pHandle->file.f_op->ioctl(&pHandle->inode, &pHandle->file, SNDRV_PCM_IOCTL_STATUS, (ULONG)__Stack32ToFlat(&status)); … … 1157 1147 rprintf(("Internal Error: Xrun\n")); 1158 1148 } 1159 if ( i> 998) {1149 if (ulI > 998) { 1160 1150 // printk("timeout stat %x avail:%d hw:%d app:%d\n",status.state,samples_to_bytes(status.avail),samples_to_bytes(status.hw_ptr), samples_to_bytes(status.appl_ptr)); 1161 1151 iRet1 = pHandle->file.f_op->ioctl(&pHandle->inode, &pHandle->file, SNDRV_PCM_IOCTL_PREPARE, 0); -
GPL/branches/uniaud32-2.1.x/lib32/soundmidi.c
r305 r519 108 108 ret = alsa_fops->open(&pHandle->inode, &pHandle->file); 109 109 if(ret) { 110 dprintf(("Midi Open %d failed with error %d", streamtype, ret));110 rprintf(("Midi Open %d failed with error %d", streamtype, ret)); 111 111 kfree(pHandle); 112 112 return UNIXToOSSError(ret); … … 116 116 117 117 pHandle->state |= MIDISTATE_OPENED; 118 printk("Opened MIDI %x\n",(ULONG)pHandle);119 if(streamtype == OSS32_STREAM_FM_MIDIOUT) 118 dprintf(("Opened MIDI %x\n",(ULONG)pHandle)); 119 if(streamtype == OSS32_STREAM_FM_MIDIOUT) 120 120 { 121 121 //get the client id 122 122 ret = pHandle->file.f_op->ioctl(&pHandle->inode, &pHandle->file, SNDRV_SEQ_IOCTL_CLIENT_ID, (ULONG)&pHandle->clientid); 123 123 if(ret) { 124 dprintf(("Get client id failed with error %d", ret));124 rprintf(("Get client id failed with error %d", ret)); 125 125 kfree(pHandle); 126 126 return UNIXToOSSError(ret); 127 127 } 128 128 129 129 //find the FM device 130 for(i=64;i<64+((deviceid+1)<<3);i++) 130 for(i=64;i<64+((deviceid+1)<<3);i++) 131 131 { 132 132 memset((PVOID)__Stack32ToFlat(&clientinfo), 0, sizeof(clientinfo)); … … 143 143 } 144 144 if(i == 64+((deviceid+1)<<3)) { 145 dprintf(("Couldn't find OPL3 device"));145 rprintf(("Couldn't find OPL3 device")); 146 146 ret = pHandle->file.f_op->release(&pHandle->inode, &pHandle->file); 147 147 kfree(pHandle); … … 159 159 ret = pHandle->file.f_op->ioctl(&pHandle->inode, &pHandle->file, SNDRV_SEQ_IOCTL_CREATE_PORT, (ULONG)__Stack32ToFlat(&portinfo)); 160 160 if(ret) { 161 dprintf(("subscribe error %d", ret));161 rprintf(("subscribe error %d", ret)); 162 162 kfree(pHandle); 163 163 return UNIXToOSSError(ret); … … 165 165 pHandle->clientport = portinfo.addr.port; 166 166 pHandle->state |= MIDISTATE_PORTCREATED; 167 167 168 168 //subscribe to FM device port 169 169 memset(&subs, 0, sizeof(subs)); … … 174 174 ret = pHandle->file.f_op->ioctl(&pHandle->inode, &pHandle->file, SNDRV_SEQ_IOCTL_SUBSCRIBE_PORT, (ULONG)__Stack32ToFlat(&subs)); 175 175 if(ret) { 176 dprintf(("subscribe error %d", ret));176 rprintf(("subscribe error %d", ret)); 177 177 kfree(pHandle); 178 178 return UNIXToOSSError(ret); 179 179 } 180 180 pHandle->state |= MIDISTATE_SUBSCRIBED; 181 181 182 182 #if 0 183 183 //Load FM instruments (only done once) … … 200 200 return OSSERR_INVALID_STREAMID; 201 201 } 202 printk("Closing MIDI %x\n",(ULONG)streamid);202 dprintf(("Closing MIDI %x\n",(ULONG)streamid)); 203 203 204 204 //set operation to non-blocking … … 214 214 ret = pHandle->file.f_op->ioctl(&pHandle->inode, &pHandle->file, SNDRV_SEQ_IOCTL_UNSUBSCRIBE_PORT, (ULONG)__Stack32ToFlat(&subs)); 215 215 if(ret) { 216 dprintf(("unsubscribe error %d", ret));216 rprintf(("unsubscribe error %d", ret)); 217 217 DebugInt3(); 218 218 } 219 219 } 220 220 221 221 //delete port 222 222 if(pHandle->state & MIDISTATE_SUBSCRIBED) { 223 223 struct snd_seq_port_info portinfo; 224 224 225 225 memset(&portinfo, 0, sizeof(portinfo)); 226 226 strcpy(portinfo.name, "Unamed port"); … … 248 248 OSSRET OSS32_MidiWrite(OSSSTREAMID streamid, ULONG midiByte) 249 249 { 250 printk("MIDI write %x\n",(ULONG)streamid);250 dprintf(("MIDI write %x\n",(ULONG)streamid)); 251 251 return OSSERR_INVALID_STREAMID; 252 252 } … … 269 269 if (ret > 0) 270 270 { 271 printk("MIDI read %i bytes from %x. first byte is: %x\n",ret, (ULONG)streamid, (char*)buffer[0]);271 dprintf(("MIDI read %i bytes from %x. first byte is: %x\n",ret, (ULONG)streamid, (char*)buffer[0])); 272 272 *pTransferred = ret; 273 273 return OSSERR_SUCCESS; … … 279 279 OSSRET OSS32_MidiQueryCaps(OSSSTREAMID streamid, POSS32_MIDICAPS pCaps) 280 280 { 281 printk("MIDI query caps %x\n",(ULONG)streamid);281 dprintf(("MIDI query caps %x\n",(ULONG)streamid)); 282 282 return OSSERR_INVALID_STREAMID; 283 283 } … … 295 295 return OSSERR_INVALID_STREAMID; 296 296 } 297 printk("MIDI command %x\n",(ULONG)streamid);297 dprintf(("MIDI command %x\n",(ULONG)streamid)); 298 298 299 299 //set operation to non-blocking … … 334 334 335 335 if(transferred < 0) { 336 dprintf(("OSS32_MidiNoteOn failed!!"));336 rprintf(("OSS32_MidiNoteOn failed!!")); 337 337 DebugInt3(); 338 338 return UNIXToOSSError(transferred); -
GPL/branches/uniaud32-2.1.x/lib32/soundmixer.c
r506 r519 474 474 } 475 475 if(idx == -1) { 476 dprintf(("Unknown control %d", line));476 rprintf(("Unknown control %d", line)); 477 477 ret = OSSERR_INVALID_PARAMETER; 478 478 goto fail; … … 512 512 } 513 513 514 printk("OSS32_MixSetVolume of %s streamid %X to (%d,%d)(%d,%d) caps %d\n",514 dprintf(("OSS32_MixSetVolume of %s streamid %X to (%d,%d)(%d,%d) caps %d", 515 515 pHandle->pids[idx].name, (ULONG)pHandle, 516 GET_VOLUME_L(volume), GET_VOLUME_R(volume), lVol, rVol, pElemInfo->value.integer.max) ;516 GET_VOLUME_L(volume), GET_VOLUME_R(volume), lVol, rVol, pElemInfo->value.integer.max)); 517 517 518 518 #if 1 … … 525 525 cnt++; 526 526 527 printk("OSS32_MixSetVolume old cnt=%X line=%x lVol=%x rVol=%x\n", cnt, line, lVol, rVol);527 dprintf(("OSS32_MixSetVolume old cnt=%X line=%x lVol=%x rVol=%x", cnt, line, lVol, rVol)); 528 528 // if (((cnt == 1 && (lVol==0 && rVol==0)) || (lVol>0 && rVol>0)) || 529 529 if (cnt == 1 || line != OSS32_MIX_VOLUME_PCM) 530 530 { 531 printk("OSS32_MixSetVolume Ioctl\n");531 dprintf(("OSS32_MixSetVolume Ioctl")); 532 532 ret = pHandle->file.f_op->ioctl(&pHandle->inode, &pHandle->file, SNDRV_CTL_IOCTL_ELEM_WRITE, (ULONG)pElem); 533 533 … … 539 539 pElem->value.integer.value[0] = FALSE; //switch, not mute control (inversed) 540 540 pElem->value.integer.value[1] = FALSE; 541 printk("OSS32_MixSetVolume Ioctl mute\n");541 dprintf(("OSS32_MixSetVolume Ioctl mute")); 542 542 ret = pHandle->file.f_op->ioctl(&pHandle->inode, &pHandle->file, SNDRV_CTL_IOCTL_ELEM_WRITE, (ULONG)pElem); 543 543 } … … 548 548 pElem = NULL; 549 549 if(ret) { 550 printk("ret = %i\n", ret);550 rprintf(("OSS32_MixSetVolume ret=%x", ret)); 551 551 DebugInt3(); 552 552 return UNIXToOSSError(ret); -
GPL/branches/uniaud32-2.1.x/uniaud.inc
r517 r519 13 13 # ex RC3 GA FIXPACK2 beta_47 14 14 # Comment out to avoid a fixpack line in bldlevel 15 FIXPACK = BETA SVNr51 715 FIXPACK = BETA SVNr519 16 16 17 17 # ALSA BUILD VERSION
Note:
See TracChangeset
for help on using the changeset viewer.
