aboutsummaryrefslogtreecommitdiffstats
path: root/sound/pci/emu10k1/emupcm.c
diff options
context:
space:
mode:
Diffstat (limited to 'sound/pci/emu10k1/emupcm.c')
-rw-r--r--sound/pci/emu10k1/emupcm.c37
1 files changed, 30 insertions, 7 deletions
diff --git a/sound/pci/emu10k1/emupcm.c b/sound/pci/emu10k1/emupcm.c
index cf9276ddad42..78f62fd404c2 100644
--- a/sound/pci/emu10k1/emupcm.c
+++ b/sound/pci/emu10k1/emupcm.c
@@ -44,7 +44,7 @@ static void snd_emu10k1_pcm_interrupt(struct snd_emu10k1 *emu,
44 if (epcm->substream == NULL) 44 if (epcm->substream == NULL)
45 return; 45 return;
46#if 0 46#if 0
47 printk("IRQ: position = 0x%x, period = 0x%x, size = 0x%x\n", 47 printk(KERN_DEBUG "IRQ: position = 0x%x, period = 0x%x, size = 0x%x\n",
48 epcm->substream->runtime->hw->pointer(emu, epcm->substream), 48 epcm->substream->runtime->hw->pointer(emu, epcm->substream),
49 snd_pcm_lib_period_bytes(epcm->substream), 49 snd_pcm_lib_period_bytes(epcm->substream),
50 snd_pcm_lib_buffer_bytes(epcm->substream)); 50 snd_pcm_lib_buffer_bytes(epcm->substream));
@@ -146,7 +146,11 @@ static int snd_emu10k1_pcm_channel_alloc(struct snd_emu10k1_pcm * epcm, int voic
146 1, 146 1,
147 &epcm->extra); 147 &epcm->extra);
148 if (err < 0) { 148 if (err < 0) {
149 /* printk("pcm_channel_alloc: failed extra: voices=%d, frame=%d\n", voices, frame); */ 149 /*
150 printk(KERN_DEBUG "pcm_channel_alloc: "
151 "failed extra: voices=%d, frame=%d\n",
152 voices, frame);
153 */
150 for (i = 0; i < voices; i++) { 154 for (i = 0; i < voices; i++) {
151 snd_emu10k1_voice_free(epcm->emu, epcm->voices[i]); 155 snd_emu10k1_voice_free(epcm->emu, epcm->voices[i]);
152 epcm->voices[i] = NULL; 156 epcm->voices[i] = NULL;
@@ -737,7 +741,10 @@ static int snd_emu10k1_playback_trigger(struct snd_pcm_substream *substream,
737 struct snd_emu10k1_pcm_mixer *mix; 741 struct snd_emu10k1_pcm_mixer *mix;
738 int result = 0; 742 int result = 0;
739 743
740 /* printk("trigger - emu10k1 = 0x%x, cmd = %i, pointer = %i\n", (int)emu, cmd, substream->ops->pointer(substream)); */ 744 /*
745 printk(KERN_DEBUG "trigger - emu10k1 = 0x%x, cmd = %i, pointer = %i\n",
746 (int)emu, cmd, substream->ops->pointer(substream))
747 */
741 spin_lock(&emu->reg_lock); 748 spin_lock(&emu->reg_lock);
742 switch (cmd) { 749 switch (cmd) {
743 case SNDRV_PCM_TRIGGER_START: 750 case SNDRV_PCM_TRIGGER_START:
@@ -786,7 +793,10 @@ static int snd_emu10k1_capture_trigger(struct snd_pcm_substream *substream,
786 /* hmm this should cause full and half full interrupt to be raised? */ 793 /* hmm this should cause full and half full interrupt to be raised? */
787 outl(epcm->capture_ipr, emu->port + IPR); 794 outl(epcm->capture_ipr, emu->port + IPR);
788 snd_emu10k1_intr_enable(emu, epcm->capture_inte); 795 snd_emu10k1_intr_enable(emu, epcm->capture_inte);
789 /* printk("adccr = 0x%x, adcbs = 0x%x\n", epcm->adccr, epcm->adcbs); */ 796 /*
797 printk(KERN_DEBUG "adccr = 0x%x, adcbs = 0x%x\n",
798 epcm->adccr, epcm->adcbs);
799 */
790 switch (epcm->type) { 800 switch (epcm->type) {
791 case CAPTURE_AC97ADC: 801 case CAPTURE_AC97ADC:
792 snd_emu10k1_ptr_write(emu, ADCCR, 0, epcm->capture_cr_val); 802 snd_emu10k1_ptr_write(emu, ADCCR, 0, epcm->capture_cr_val);
@@ -857,7 +867,11 @@ static snd_pcm_uframes_t snd_emu10k1_playback_pointer(struct snd_pcm_substream *
857 ptr -= runtime->buffer_size; 867 ptr -= runtime->buffer_size;
858 } 868 }
859#endif 869#endif
860 /* printk("ptr = 0x%x, buffer_size = 0x%x, period_size = 0x%x\n", ptr, runtime->buffer_size, runtime->period_size); */ 870 /*
871 printk(KERN_DEBUG
872 "ptr = 0x%x, buffer_size = 0x%x, period_size = 0x%x\n",
873 ptr, runtime->buffer_size, runtime->period_size);
874 */
861 return ptr; 875 return ptr;
862} 876}
863 877
@@ -1546,7 +1560,11 @@ static void snd_emu10k1_fx8010_playback_tram_poke1(unsigned short *dst_left,
1546 unsigned int count, 1560 unsigned int count,
1547 unsigned int tram_shift) 1561 unsigned int tram_shift)
1548{ 1562{
1549 /* printk("tram_poke1: dst_left = 0x%p, dst_right = 0x%p, src = 0x%p, count = 0x%x\n", dst_left, dst_right, src, count); */ 1563 /*
1564 printk(KERN_DEBUG "tram_poke1: dst_left = 0x%p, dst_right = 0x%p, "
1565 "src = 0x%p, count = 0x%x\n",
1566 dst_left, dst_right, src, count);
1567 */
1550 if ((tram_shift & 1) == 0) { 1568 if ((tram_shift & 1) == 0) {
1551 while (count--) { 1569 while (count--) {
1552 *dst_left-- = *src++; 1570 *dst_left-- = *src++;
@@ -1623,7 +1641,12 @@ static int snd_emu10k1_fx8010_playback_prepare(struct snd_pcm_substream *substre
1623 struct snd_emu10k1_fx8010_pcm *pcm = &emu->fx8010.pcm[substream->number]; 1641 struct snd_emu10k1_fx8010_pcm *pcm = &emu->fx8010.pcm[substream->number];
1624 unsigned int i; 1642 unsigned int i;
1625 1643
1626 /* printk("prepare: etram_pages = 0x%p, dma_area = 0x%x, buffer_size = 0x%x (0x%x)\n", emu->fx8010.etram_pages, runtime->dma_area, runtime->buffer_size, runtime->buffer_size << 2); */ 1644 /*
1645 printk(KERN_DEBUG "prepare: etram_pages = 0x%p, dma_area = 0x%x, "
1646 "buffer_size = 0x%x (0x%x)\n",
1647 emu->fx8010.etram_pages, runtime->dma_area,
1648 runtime->buffer_size, runtime->buffer_size << 2);
1649 */
1627 memset(&pcm->pcm_rec, 0, sizeof(pcm->pcm_rec)); 1650 memset(&pcm->pcm_rec, 0, sizeof(pcm->pcm_rec));
1628 pcm->pcm_rec.hw_buffer_size = pcm->buffer_size * 2; /* byte size */ 1651 pcm->pcm_rec.hw_buffer_size = pcm->buffer_size * 2; /* byte size */
1629 pcm->pcm_rec.sw_buffer_size = snd_pcm_lib_buffer_bytes(substream); 1652 pcm->pcm_rec.sw_buffer_size = snd_pcm_lib_buffer_bytes(substream);