Subject: kern/14065: Record DMA not supported in the audio driver isa/wss_isa.c
To: None <gnats-bugs@gnats.netbsd.org>
From: None <cliff@snipe444.org>
List: netbsd-bugs
Date: 09/25/2001 14:09:08
>Number: 14065
>Category: kern
>Synopsis: Record DMA not supported in the audio driver isa/wss_isa.c
>Confidential: no
>Severity: serious
>Priority: medium
>Responsible: kern-bug-people
>State: open
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Tue Sep 25 14:10:00 PDT 2001
>Closed-Date:
>Last-Modified:
>Originator:
>Release: NetBSD 1.5.1
>Organization:
>Environment:
System: NetBSD vixen.snipe444.org 1.5.1 NetBSD 1.5.1 (VIXEN) #3: Sat Sep 15 15:33:15 PDT 2001 cliff@vixen.snipe444.org:/usr/src/sys/arch/i386/compile/VIXEN i386
>Description:
In the audio driver dev/isa/wss_isa.c their was an
"XXX recdrq" in the source, as the record dma channel was not enabled.
After looking at the Linux driver, I saw that the dma was
enabled by a single bit. This turned on dma channel 0, unless
the play dma was channel 0, then the enable bit enabled
channel 1.
>How-To-Repeat:
>Fix:
I used the following patch. The hardcoded 0x04 should probably
be a #define.
--- wss_isa.c.orig Tue Sep 25 13:36:19 2001
+++ wss_isa.c Tue Sep 25 13:43:59 2001
@@ -168,13 +168,15 @@
sc->wss_recdrq =
ac->mode > 1 && ia->ia_drq2 != DRQUNK ?
ia->ia_drq2 : ia->ia_drq;
+ if (sc->wss_recdrq != sc->wss_playdrq && wss_recdrq > 1)
+ goto bad;
if (sc->wss_recdrq != sc->wss_playdrq && !isa_drq_isfree(sc->wss_ic,
sc->wss_recdrq))
goto bad;
- /* XXX recdrq */
bus_space_write_1(sc->sc_iot, sc->sc_ioh, WSS_CONFIG,
- (interrupt_bits[ia->ia_irq] | dma_bits[ia->ia_drq]));
+ (interrupt_bits[ia->ia_irq] | dma_bits[ia->ia_drq]
+ | (ac->mode > 1 ? 0x04 : 0)));
return 1;
>Release-Note:
>Audit-Trail:
>Unformatted: