Changeset 426 for GPL/trunk/alsa-kernel/pci/emu10k1/p16v.c
- Timestamp:
- May 9, 2009, 11:45:26 AM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
GPL/trunk/alsa-kernel/pci/emu10k1/p16v.c
r305 r426 169 169 170 170 if (epcm) { 171 / /snd_printk("epcm free: %p\n", epcm);171 /* snd_printk(KERN_DEBUG "epcm free: %p\n", epcm); */ 172 172 kfree(epcm); 173 173 } … … 184 184 185 185 epcm = kzalloc(sizeof(*epcm), GFP_KERNEL); 186 / /snd_printk("epcm kcalloc: %p\n", epcm);186 /* snd_printk(KERN_DEBUG "epcm kcalloc: %p\n", epcm); */ 187 187 188 188 if (epcm == NULL) … … 190 190 epcm->emu = emu; 191 191 epcm->substream = substream; 192 //snd_printk("epcm device=%d, channel_id=%d\n", substream->pcm->device, channel_id); 193 192 /* 193 snd_printk(KERN_DEBUG "epcm device=%d, channel_id=%d\n", 194 substream->pcm->device, channel_id); 195 */ 194 196 runtime->private_data = epcm; 195 197 runtime->private_free = snd_p16v_pcm_free_substream; … … 201 203 202 204 channel->use=1; 203 //snd_printk("p16v: open channel_id=%d, channel=%p, use=0x%x\n", channel_id, channel, channel->use); 204 //printk("open:channel_id=%d, chip=%p, channel=%p\n",channel_id, chip, channel); 205 //channel->interrupt = snd_p16v_pcm_channel_interrupt; 206 channel->epcm=epcm; 205 #if 0 /* debug */ 206 snd_printk(KERN_DEBUG 207 "p16v: open channel_id=%d, channel=%p, use=0x%x\n", 208 channel_id, channel, channel->use); 209 printk(KERN_DEBUG "open:channel_id=%d, chip=%p, channel=%p\n", 210 channel_id, chip, channel); 211 #endif /* debug */ 212 /* channel->interrupt = snd_p16v_pcm_channel_interrupt; */ 213 channel->epcm = epcm; 207 214 if ((err = snd_pcm_hw_constraint_integer(runtime, SNDRV_PCM_HW_PARAM_PERIODS)) < 0) 208 215 return err; … … 225 232 226 233 epcm = kzalloc(sizeof(*epcm), GFP_KERNEL); 227 / /snd_printk("epcm kcalloc: %p\n", epcm);234 /* snd_printk(KERN_DEBUG "epcm kcalloc: %p\n", epcm); */ 228 235 229 236 if (epcm == NULL) … … 231 238 epcm->emu = emu; 232 239 epcm->substream = substream; 233 //snd_printk("epcm device=%d, channel_id=%d\n", substream->pcm->device, channel_id); 234 240 /* 241 snd_printk(KERN_DEBUG "epcm device=%d, channel_id=%d\n", 242 substream->pcm->device, channel_id); 243 */ 235 244 runtime->private_data = epcm; 236 245 runtime->private_free = snd_p16v_pcm_free_substream; … … 242 251 243 252 channel->use=1; 244 //snd_printk("p16v: open channel_id=%d, channel=%p, use=0x%x\n", channel_id, channel, channel->use); 245 //printk("open:channel_id=%d, chip=%p, channel=%p\n",channel_id, chip, channel); 246 //channel->interrupt = snd_p16v_pcm_channel_interrupt; 247 channel->epcm=epcm; 253 #if 0 /* debug */ 254 snd_printk(KERN_DEBUG 255 "p16v: open channel_id=%d, channel=%p, use=0x%x\n", 256 channel_id, channel, channel->use); 257 printk(KERN_DEBUG "open:channel_id=%d, chip=%p, channel=%p\n", 258 channel_id, chip, channel); 259 #endif /* debug */ 260 /* channel->interrupt = snd_p16v_pcm_channel_interrupt; */ 261 channel->epcm = epcm; 248 262 if ((err = snd_pcm_hw_constraint_integer(runtime, SNDRV_PCM_HW_PARAM_PERIODS)) < 0) 249 263 return err; … … 335 349 u32 tmp; 336 350 337 //snd_printk("prepare:channel_number=%d, rate=%d, format=0x%x, channels=%d, buffer_size=%ld, period_size=%ld, periods=%u, frames_to_bytes=%d\n",channel, runtime->rate, runtime->format, runtime->channels, runtime->buffer_size, runtime->period_size, runtime->periods, frames_to_bytes(runtime, 1)); 338 //snd_printk("dma_addr=%x, dma_area=%p, table_base=%p\n",runtime->dma_addr, runtime->dma_area, table_base); 339 //snd_printk("dma_addr=%x, dma_area=%p, dma_bytes(size)=%x\n",emu->p16v_buffer.addr, emu->p16v_buffer.area, emu->p16v_buffer.bytes); 351 #if 0 /* debug */ 352 snd_printk(KERN_DEBUG "prepare:channel_number=%d, rate=%d, " 353 "format=0x%x, channels=%d, buffer_size=%ld, " 354 "period_size=%ld, periods=%u, frames_to_bytes=%d\n", 355 channel, runtime->rate, runtime->format, runtime->channels, 356 runtime->buffer_size, runtime->period_size, 357 runtime->periods, frames_to_bytes(runtime, 1)); 358 snd_printk(KERN_DEBUG "dma_addr=%x, dma_area=%p, table_base=%p\n", 359 runtime->dma_addr, runtime->dma_area, table_base); 360 snd_printk(KERN_DEBUG "dma_addr=%x, dma_area=%p, dma_bytes(size)=%x\n", 361 emu->p16v_buffer.addr, emu->p16v_buffer.area, 362 emu->p16v_buffer.bytes); 363 #endif /* debug */ 340 364 tmp = snd_emu10k1_ptr_read(emu, A_SPDIF_SAMPLERATE, channel); 341 365 switch (runtime->rate) { … … 380 404 int channel = substream->pcm->device - emu->p16v_device_offset; 381 405 u32 tmp; 382 //printk("prepare capture:channel_number=%d, rate=%d, format=0x%x, channels=%d, buffer_size=%ld, period_size=%ld, frames_to_bytes=%d\n",channel, runtime->rate, runtime->format, runtime->channels, runtime->buffer_size, runtime->period_size, frames_to_bytes(runtime, 1)); 406 407 /* 408 printk(KERN_DEBUG "prepare capture:channel_number=%d, rate=%d, " 409 "format=0x%x, channels=%d, buffer_size=%ld, period_size=%ld, " 410 "frames_to_bytes=%d\n", 411 channel, runtime->rate, runtime->format, runtime->channels, 412 runtime->buffer_size, runtime->period_size, 413 frames_to_bytes(runtime, 1)); 414 */ 383 415 tmp = snd_emu10k1_ptr_read(emu, A_SPDIF_SAMPLERATE, channel); 384 416 switch (runtime->rate) { … … 460 492 epcm = runtime->private_data; 461 493 channel = substream->pcm->device-emu->p16v_device_offset; 462 / /snd_printk("p16v channel=%d\n",channel);494 /* snd_printk(KERN_DEBUG "p16v channel=%d\n", channel); */ 463 495 epcm->running = running; 464 496 basic |= (0x1<<channel); … … 466 498 snd_pcm_trigger_done(s, substream); 467 499 } 468 / /snd_printk("basic=0x%x, inte=0x%x\n",basic, inte);500 /* snd_printk(KERN_DEBUG "basic=0x%x, inte=0x%x\n", basic, inte); */ 469 501 470 502 switch (cmd) { … … 559 591 printk(KERN_WARNING "buffer capture limited!\n"); 560 592 } 561 //printk("ptr1 = 0x%lx, ptr2=0x%lx, ptr=0x%lx, buffer_size = 0x%x, period_size = 0x%x, bits=%d, rate=%d\n", ptr1, ptr2, ptr, (int)runtime->buffer_size, (int)runtime->period_size, (int)runtime->frame_bits, (int)runtime->rate); 562 593 /* 594 printk(KERN_DEBUG "ptr1 = 0x%lx, ptr2=0x%lx, ptr=0x%lx, " 595 "buffer_size = 0x%x, period_size = 0x%x, bits=%d, rate=%d\n", 596 ptr1, ptr2, ptr, (int)runtime->buffer_size, 597 (int)runtime->period_size, (int)runtime->frame_bits, 598 (int)runtime->rate); 599 */ 563 600 return ptr; 564 601 } … … 593 630 if (chip->p16v_buffer.area) { 594 631 snd_dma_free_pages(&chip->p16v_buffer); 595 //snd_printk("period lables free: %p\n", &chip->p16v_buffer); 632 /* 633 snd_printk(KERN_DEBUG "period lables free: %p\n", 634 &chip->p16v_buffer); 635 */ 596 636 } 597 637 return 0; … … 605 645 int capture=1; 606 646 607 / /snd_printk("snd_p16v_pcm called. device=%d\n", device);647 /* snd_printk("KERN_DEBUG snd_p16v_pcm called. device=%d\n", device); */ 608 648 emu->p16v_device_offset = device; 609 649 if (rpcm) … … 632 672 ((65536 - 64) * 8), ((65536 - 64) * 8))) < 0) 633 673 return err; 634 //snd_printk("preallocate playback substream: err=%d\n", err); 674 /* 675 snd_printk(KERN_DEBUG 676 "preallocate playback substream: err=%d\n", err); 677 */ 635 678 } 636 679 … … 643 686 65536 - 64, 65536 - 64)) < 0) 644 687 return err; 645 //snd_printk("preallocate capture substream: err=%d\n", err); 688 /* 689 snd_printk(KERN_DEBUG 690 "preallocate capture substream: err=%d\n", err); 691 */ 646 692 } 647 693
Note:
See TracChangeset
for help on using the changeset viewer.