NetBSD Problem Report #5988

Received: (qmail 4753 invoked from network); 19 Aug 1998 19:29:33 -0000
Message-Id: <199808191929.VAA00421@zila.denet.nl>
Date: Wed, 19 Aug 1998 21:29:05 +0200 (CEST)
From: dillema@acm.org
Reply-To: dillema@acm.org
To: gnats-bugs@gnats.netbsd.org
Subject: MMAP support for GUS soundcards 
X-Send-Pr-Version: 3.95

>Number:         5988
>Category:       kern
>Synopsis:       MMAP not supported for GUS Soundcards
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    kern-bug-people
>State:          closed
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Wed Aug 19 12:35:01 +0000 1998
>Closed-Date:    Wed Sep 09 04:33:55 +0000 1998
>Last-Modified:  Wed Sep 09 04:34:07 +0000 1998
>Originator:     Feico Dillema
>Release:        NetBSD 1.3G
>Organization:
University of Twente
>Environment:
System: NetBSD zila 1.3G NetBSD 1.3G (ZILA.i4b) #1: Wed Aug 19 18:34:17 CEST 1998 root@zila:/usr/src/sys/arch/i386/compile/ZILA.i4b i386

with Gus Max UltraSound Soundcard

>Description:
	MMAP support is absent in the gus driver. 
	audioctl -a lists:

	properties=full_duplex

	i.e. no `mmap'

>How-To-Repeat:

	Start `quake' ? ;-}

>Fix:

	Fix is simply adding a couple of lines to gus.c to enable
	mmap support. The code is there, so the fix is trivial.
	Here is my patch:

--- gus.c.orig  Wed Aug 19 19:55:35 1998
+++ gus.c       Wed Aug 19 21:18:15 1998
@@ -603,10 +603,10 @@
        gus_mixer_set_port,
        gus_mixer_get_port,
        gus_mixer_query_devinfo,
-       NULL,
-       NULL,
-       NULL,
-        NULL,
+        ad1848_malloc,
+        ad1848_free,
+        ad1848_round,
+        ad1848_mappage,
        gus_get_props,
 };

@@ -638,10 +638,10 @@
        gusmax_mixer_set_port,
        gusmax_mixer_get_port,
        gusmax_mixer_query_devinfo,
-       NULL,
-       NULL,
-       NULL,
-       NULL,
+        ad1848_malloc,
+        ad1848_free,
+        ad1848_round,
+        ad1848_mappage,
        gusmax_get_props,
 };

@@ -3551,7 +3551,8 @@
        void *addr;
 {
        struct gus_softc *sc = addr;
-       return sc->sc_recdrq == sc->sc_drq ? 0 : AUDIO_PROP_FULLDUPLEX;
+       return (AUDIO_PROP_MMAP | 
+               (sc->sc_recdrq == sc->sc_drq ? 0 : AUDIO_PROP_FULLDUPLEX));
 }

 STATIC int

>Release-Note:
>Audit-Trail:
State-Changed-From-To: open->closed 
State-Changed-By: thorpej 
State-Changed-When: Tue Sep 8 21:33:55 PDT 1998 
State-Changed-Why:  
Fix applied. 
>Unformatted:

NetBSD Home
NetBSD PR Database Search

(Contact us) $NetBSD: query-full-pr,v 1.51 2026/08/10 02:28:17 riastradh Exp $
$NetBSD: gnats_config.sh,v 1.10 2026/05/13 22:00:09 riastradh Exp $
Copyright © 1994-2026 The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.