diff options
Diffstat (limited to 'sound/isa/gus/gus_pcm.c')
-rw-r--r-- | sound/isa/gus/gus_pcm.c | 26 |
1 files changed, 20 insertions, 6 deletions
diff --git a/sound/isa/gus/gus_pcm.c b/sound/isa/gus/gus_pcm.c index 38510aeb21c6..edb11eefdfe3 100644 --- a/sound/isa/gus/gus_pcm.c +++ b/sound/isa/gus/gus_pcm.c | |||
@@ -82,7 +82,10 @@ static int snd_gf1_pcm_block_change(struct snd_pcm_substream *substream, | |||
82 | 82 | ||
83 | count += offset & 31; | 83 | count += offset & 31; |
84 | offset &= ~31; | 84 | offset &= ~31; |
85 | // snd_printk("block change - offset = 0x%x, count = 0x%x\n", offset, count); | 85 | /* |
86 | snd_printk(KERN_DEBUG "block change - offset = 0x%x, count = 0x%x\n", | ||
87 | offset, count); | ||
88 | */ | ||
86 | memset(&block, 0, sizeof(block)); | 89 | memset(&block, 0, sizeof(block)); |
87 | block.cmd = SNDRV_GF1_DMA_IRQ; | 90 | block.cmd = SNDRV_GF1_DMA_IRQ; |
88 | if (snd_pcm_format_unsigned(runtime->format)) | 91 | if (snd_pcm_format_unsigned(runtime->format)) |
@@ -135,7 +138,11 @@ static void snd_gf1_pcm_trigger_up(struct snd_pcm_substream *substream) | |||
135 | curr = begin + (pcmp->bpos * pcmp->block_size) / runtime->channels; | 138 | curr = begin + (pcmp->bpos * pcmp->block_size) / runtime->channels; |
136 | end = curr + (pcmp->block_size / runtime->channels); | 139 | end = curr + (pcmp->block_size / runtime->channels); |
137 | end -= snd_pcm_format_width(runtime->format) == 16 ? 2 : 1; | 140 | end -= snd_pcm_format_width(runtime->format) == 16 ? 2 : 1; |
138 | // snd_printk("init: curr=0x%x, begin=0x%x, end=0x%x, ctrl=0x%x, ramp=0x%x, rate=0x%x\n", curr, begin, end, voice_ctrl, ramp_ctrl, rate); | 141 | /* |
142 | snd_printk(KERN_DEBUG "init: curr=0x%x, begin=0x%x, end=0x%x, " | ||
143 | "ctrl=0x%x, ramp=0x%x, rate=0x%x\n", | ||
144 | curr, begin, end, voice_ctrl, ramp_ctrl, rate); | ||
145 | */ | ||
139 | pan = runtime->channels == 2 ? (!voice ? 1 : 14) : 8; | 146 | pan = runtime->channels == 2 ? (!voice ? 1 : 14) : 8; |
140 | vol = !voice ? gus->gf1.pcm_volume_level_left : gus->gf1.pcm_volume_level_right; | 147 | vol = !voice ? gus->gf1.pcm_volume_level_left : gus->gf1.pcm_volume_level_right; |
141 | spin_lock_irqsave(&gus->reg_lock, flags); | 148 | spin_lock_irqsave(&gus->reg_lock, flags); |
@@ -205,9 +212,11 @@ static void snd_gf1_pcm_interrupt_wave(struct snd_gus_card * gus, | |||
205 | ramp_ctrl = (snd_gf1_read8(gus, SNDRV_GF1_VB_VOLUME_CONTROL) & ~0xa4) | 0x03; | 212 | ramp_ctrl = (snd_gf1_read8(gus, SNDRV_GF1_VB_VOLUME_CONTROL) & ~0xa4) | 0x03; |
206 | #if 0 | 213 | #if 0 |
207 | snd_gf1_select_voice(gus, pvoice->number); | 214 | snd_gf1_select_voice(gus, pvoice->number); |
208 | printk("position = 0x%x\n", (snd_gf1_read_addr(gus, SNDRV_GF1_VA_CURRENT, voice_ctrl & 4) >> 4)); | 215 | printk(KERN_DEBUG "position = 0x%x\n", |
216 | (snd_gf1_read_addr(gus, SNDRV_GF1_VA_CURRENT, voice_ctrl & 4) >> 4)); | ||
209 | snd_gf1_select_voice(gus, pcmp->pvoices[1]->number); | 217 | snd_gf1_select_voice(gus, pcmp->pvoices[1]->number); |
210 | printk("position = 0x%x\n", (snd_gf1_read_addr(gus, SNDRV_GF1_VA_CURRENT, voice_ctrl & 4) >> 4)); | 218 | printk(KERN_DEBUG "position = 0x%x\n", |
219 | (snd_gf1_read_addr(gus, SNDRV_GF1_VA_CURRENT, voice_ctrl & 4) >> 4)); | ||
211 | snd_gf1_select_voice(gus, pvoice->number); | 220 | snd_gf1_select_voice(gus, pvoice->number); |
212 | #endif | 221 | #endif |
213 | pcmp->bpos++; | 222 | pcmp->bpos++; |
@@ -299,7 +308,11 @@ static int snd_gf1_pcm_poke_block(struct snd_gus_card *gus, unsigned char *buf, | |||
299 | unsigned int len; | 308 | unsigned int len; |
300 | unsigned long flags; | 309 | unsigned long flags; |
301 | 310 | ||
302 | // printk("poke block; buf = 0x%x, pos = %i, count = %i, port = 0x%x\n", (int)buf, pos, count, gus->gf1.port); | 311 | /* |
312 | printk(KERN_DEBUG | ||
313 | "poke block; buf = 0x%x, pos = %i, count = %i, port = 0x%x\n", | ||
314 | (int)buf, pos, count, gus->gf1.port); | ||
315 | */ | ||
303 | while (count > 0) { | 316 | while (count > 0) { |
304 | len = count; | 317 | len = count; |
305 | if (len > 512) /* limit, to allow IRQ */ | 318 | if (len > 512) /* limit, to allow IRQ */ |
@@ -680,7 +693,8 @@ static int snd_gf1_pcm_playback_open(struct snd_pcm_substream *substream) | |||
680 | runtime->private_free = snd_gf1_pcm_playback_free; | 693 | runtime->private_free = snd_gf1_pcm_playback_free; |
681 | 694 | ||
682 | #if 0 | 695 | #if 0 |
683 | printk("playback.buffer = 0x%lx, gf1.pcm_buffer = 0x%lx\n", (long) pcm->playback.buffer, (long) gus->gf1.pcm_buffer); | 696 | printk(KERN_DEBUG "playback.buffer = 0x%lx, gf1.pcm_buffer = 0x%lx\n", |
697 | (long) pcm->playback.buffer, (long) gus->gf1.pcm_buffer); | ||
684 | #endif | 698 | #endif |
685 | if ((err = snd_gf1_dma_init(gus)) < 0) | 699 | if ((err = snd_gf1_dma_init(gus)) < 0) |
686 | return err; | 700 | return err; |