NetBSD Problem Report #1028

From gnats  Sat May  6 23:04:25 1995
Received: from pain.lcs.mit.edu (pain.lcs.mit.edu [128.52.46.239]) by sun-lamp.cs.berkeley.edu (8.6.10/8.6.10) with ESMTP id XAA24681 for <gnats-bugs@sun-lamp.cs.berkeley.edu>; Sat, 6 May 1995 23:04:25 -0700
Message-Id: <199505070548.BAA00603@kolvir.blrc.ma.us>
Date: Sun, 7 May 1995 01:48:50 -0400
From: John Kohl <jtk@kolvir.blrc.ma.us>
Reply-To: jtk@kolvir.blrc.ma.us
To: gnats-bugs@NetBSD.ORG
Subject: sbpro device number space has holes
X-Send-Pr-Version: 3.2

>Number:         1028
>Category:       kern
>Synopsis:       the sbdsp driver tells the user to look at holes in device index space
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    kern-bug-people
>State:          closed
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Sat May 06 23:05:01 +0000 1995
>Closed-Date:    Mon May 08 22:15:24 +0000 1995
>Last-Modified:  
>Originator:     John Kohl
>Release:        1.0
>Organization:
NetBSD Kernel Hackers `R` Us
>Environment:

System: NetBSD kolvir 1.0A NetBSD 1.0A (KOLVIR) #316: Sun May 7 01:27:31 EDT 1995 jtk@kolvir:/u1/NetBSD-current/src/sys/arch/i386/compile/KOLVIR i386


>Description:
The sbpro driver has holes in its device index space--if you call the
kernel to scan the space, it will tell you to look at an invalid number
before it gets to the end of all its devices.

Also, the FM synth port is an output class port, as is the DAC port.
(the ADC is implicitly seleted by one of the other input ports,
e.g. SB_LINE_IN_PORT, SB_MIC_PORT)

>How-To-Repeat:
Try to look at all the devices

>Fix:
===================================================================
RCS file: RCS/sbdsp.c,v
retrieving revision 1.1
diff -u -r1.1 sbdsp.c
--- 1.1	1995/05/05 04:12:19
+++ sbdsp.c	1995/05/07 05:45:38
@@ -1575,7 +1575,7 @@
 	    break;
 	case SB_DAC_PORT:
 	    dip->type = AUDIO_MIXER_VALUE;
-	    dip->mixer_class = SB_INPUT_CLASS;
+	    dip->mixer_class = SB_OUTPUT_CLASS;
 	    dip->prev = AUDIO_MIXER_LAST;
 	    dip->next = AUDIO_MIXER_LAST;
 	    strcpy(dip->label.name, AudioNdac);
@@ -1593,7 +1593,7 @@
 	    break;
 	case SB_FM_PORT:
 	    dip->type = AUDIO_MIXER_VALUE;
-	    dip->mixer_class = SB_INPUT_CLASS;
+	    dip->mixer_class = SB_OUTPUT_CLASS;
 	    dip->prev = AUDIO_MIXER_LAST;
 	    dip->next = AUDIO_MIXER_LAST;
 	    strcpy(dip->label.name, "fmsynth");	/* XXX move to audioio.h */
@@ -1604,7 +1604,7 @@
 	    dip->type = AUDIO_MIXER_VALUE;
 	    dip->mixer_class = SB_OUTPUT_CLASS;
 	    dip->prev = AUDIO_MIXER_LAST;
-	    dip->next = SB_OUTPUT_MODE;
+	    dip->next = /*TREBLE, BASS not handled, nor is SB_OUTPUT_MODE*/SB_RECORD_SOURCE;
 	    strcpy(dip->label.name, AudioNvolume);
 	    dip->un.v.num_channels = 2;
 	    strcpy(dip->un.v.units.name, AudioNvolume);
>Release-Note:
>Audit-Trail:
State-Changed-From-To: open->closed 
State-Changed-By: brezak 
State-Changed-When: Mon May 8 15:15:24 PDT 1995 
State-Changed-Why:  
Applied suggested patch. 
>Unformatted:

NetBSD Home
NetBSD PR Database Search

(Contact us) $NetBSD: query-full-pr,v 1.49 2026/05/14 01:52:41 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.