NetBSD Problem Report #14065

Received: (qmail 2109 invoked from network); 25 Sep 2001 21:09:11 -0000
Message-Id: <200109252109.f8PL98A16964@vixen.snipe444.org>
Date: Tue, 25 Sep 2001 14:09:08 -0700 (PDT)
From: cliff@snipe444.org
Reply-To: cliff@snipe444.org
To: gnats-bugs@gnats.netbsd.org
Subject: Record DMA not supported in the audio driver isa/wss_isa.c 
X-Send-Pr-Version: 3.95

>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 21:10:00 +0000 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:

NetBSD Home
NetBSD PR Database Search

(Contact us) $NetBSD: query-full-pr,v 1.39 2013/11/01 18:47:49 spz Exp $
$NetBSD: gnats_config.sh,v 1.8 2006/05/07 09:23:38 tsutsui Exp $
Copyright © 1994-2007 The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.