summaryrefslogtreecommitdiffstats
path: root/sys
diff options
context:
space:
mode:
authornetchild <netchild@FreeBSD.org>2005-09-10 17:33:58 +0000
committernetchild <netchild@FreeBSD.org>2005-09-10 17:33:58 +0000
commit75b8646c9b1e2e74dffbc0d6e6fd36be4ae555bf (patch)
tree770935e3b7148034edc7893a1db092b2563670e0 /sys
parent7bdd5fbb1cb592f83faf06d49d6403302c17f0dc (diff)
downloadFreeBSD-src-75b8646c9b1e2e74dffbc0d6e6fd36be4ae555bf.zip
FreeBSD-src-75b8646c9b1e2e74dffbc0d6e6fd36be4ae555bf.tar.gz
Fix panic caused by full duplex operation.
From the PR: ---snip--- The vibra16X supports full duplex. I traced the Windows driver, and what is does is that it programs one DMA channel 8-bit, and the other 16-bit. There might be some kind of auto detection logic here, because it always uses 8-bit for playback, even if I play 16-bit sound ... ---snip--- PR: 80977 Submitted by: Hans Petter Selasky <hselasky@c2i.net>
Diffstat (limited to 'sys')
-rw-r--r--sys/dev/sound/isa/sb16.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/sys/dev/sound/isa/sb16.c b/sys/dev/sound/isa/sb16.c
index 58cb46f..ca83d20 100644
--- a/sys/dev/sound/isa/sb16.c
+++ b/sys/dev/sound/isa/sb16.c
@@ -494,7 +494,7 @@ static void
sb_intr(void *arg)
{
struct sb_info *sb = (struct sb_info *)arg;
- int reason = 3, c;
+ int reason, c;
/*
* The Vibra16X has separate flags for 8 and 16 bit transfers, but
@@ -570,8 +570,9 @@ sb_setup(struct sb_info *sb)
sb_reset_dsp(sb);
if (sb->bd_flags & BD_F_SB16X) {
+ /* full-duplex doesn't work! */
pprio = sb->pch.run? 1 : 0;
- sndbuf_dmasetup(sb->pch.buffer, pprio? sb->drq1 : NULL);
+ sndbuf_dmasetup(sb->pch.buffer, pprio? sb->drq1 : sb->drq2);
sb->pch.dch = pprio? 1 : 0;
sndbuf_dmasetup(sb->rch.buffer, pprio? sb->drq2 : sb->drq1);
sb->rch.dch = pprio? 2 : 1;
OpenPOWER on IntegriCloud