Subject: kern/5988: MMAP support for GUS soundcards
To: None <gnats-bugs@gnats.netbsd.org>
From: None <dillema@acm.org>
List: netbsd-bugs
Date: 08/19/1998 21:29:05
>Number: 5988
>Category: kern
>Synopsis: MMAP not supported for GUS Soundcards
>Confidential: no
>Severity: non-critical
>Priority: low
>Responsible: kern-bug-people (Kernel Bug People)
>State: open
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Wed Aug 19 12:35:01 1998
>Last-Modified:
>Originator: Feico Dillema
>Organization:
University of Twente
>Release: NetBSD 1.3G
>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
>Audit-Trail:
>Unformatted: