From 0725262365d1c17da9099069088c3a4ed445c44e Mon Sep 17 00:00:00 2001 From: Alexander Leidinger Date: Sat, 10 Sep 2005 17:33:58 +0000 Subject: [PATCH] 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 --- sys/dev/sound/isa/sb16.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/sys/dev/sound/isa/sb16.c b/sys/dev/sound/isa/sb16.c index 58cb46ff5def..ca83d20d03c6 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;