NetBSD Problem Report #1037
From gnats Mon May 8 15:29:52 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 PAA22252 for <gnats-bugs@sun-lamp.cs.berkeley.edu>; Mon, 8 May 1995 15:29:50 -0700
Message-Id: <199505082207.SAA05809@kolvir.blrc.ma.us>
Date: Mon, 8 May 1995 18:07:14 -0400
From: John Kohl <jtk@kolvir.blrc.ma.us>
Reply-To: jtk@kolvir.blrc.ma.us
To: gnats-bugs@NetBSD.ORG
Subject: <sys/audioio.h> doesn't have some names it should have
X-Send-Pr-Version: 3.2
>Number: 1037
>Category: kern
>Synopsis: <sys/audioio.h> has no text names for encodings
>Confidential: no
>Severity: non-critical
>Priority: medium
>Responsible: kern-bug-people
>State: closed
>Class: change-request
>Submitter-Id: net
>Arrival-Date: Mon May 08 15:35:03 +0000 1995
>Closed-Date: Thu Feb 01 00:21:14 +0000 1996
>Last-Modified: Thu Feb 01 00:25:23 +0000 1996
>Originator: John Kohl
>Release: 1.0A (-current)
>Organization:
NetBSD Kernel Hackers `R` Us
>Environment:
System: NetBSD kolvir 1.0A NetBSD 1.0A (KOLVIR) #317: Sun May 7 15:36:22 EDT 1995 jtk@kolvir:/u1/NetBSD-current/src/sys/arch/i386/compile/KOLVIR i386
>Description:
<sys/audioio.h> doesn't have text names defined for the various
encodings, nor for some synthesizer devices.
>How-To-Repeat:
Try to build a program using text names for the encodings (e.g. linear,
ulaw, alaw, ...)
>Fix:
===================================================================
RCS file: sys/RCS/audioio.h,v
retrieving revision 1.1
diff -u -r1.1 sys/audioio.h
--- 1.1 1995/02/21 01:37:22
+++ sys/audioio.h 1995/05/08 22:05:46
@@ -225,6 +225,16 @@
#define AudioNoff "off"
#define AudioNmode "mode"
#define AudioNsource "source"
+#define AudioNfmsynth "fmsynth"
+#define AudioNwave "wave"
+#define AudioNmidi "midi"
+
+#define AudioElinear "linear"
+#define AudioEulaw "ulaw"
+#define AudioEalaw "alaw"
+#define AudioEpcm16 "PCM-16"
+#define AudioEpcm8 "PCM-8"
+#define AudioEadpcm "ADPCM"
#define AudioCInputs "Inputs"
#define AudioCOutputs "Outputs"
===================================================================
RCS file: dev/isa/RCS/sbdsp.c,v
retrieving revision 1.2
diff -u -r1.2 dev/isa/sbdsp.c
--- 1.2 1995/05/07 05:45:33
+++ dev/isa/sbdsp.c 1995/05/08 22:01:27
@@ -1596,7 +1596,7 @@
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 */
+ strcpy(dip->label.name, AudioNfmsynth);
dip->un.v.num_channels = 2;
strcpy(dip->un.v.units.name, AudioNvolume);
break;
>Release-Note:
>Audit-Trail:
From: John Kohl <jtk@kolvir.blrc.ma.us>
To: gnats-bugs@NetBSD.ORG
Subject: Re: kern/1037: <sys/audioio.h> doesn't have some names it should have
Date: Mon, 8 May 1995 18:53:32 -0400
some more info on this bug report: I didn't scan the drivers for the
text, and I found some, and I updated "ulaw" to "mulaw".
I also uncovered another SB bug: it returned its encodings in a
non-contiguous number space.
See updated diffs below.
==John
===================================================================
RCS file: sys/RCS/audioio.h,v
retrieving revision 1.1
diff -u -r1.1 sys/audioio.h
--- 1.1 1995/02/21 01:37:22
+++ sys/audioio.h 1995/05/08 22:49:27
@@ -225,6 +225,16 @@
#define AudioNoff "off"
#define AudioNmode "mode"
#define AudioNsource "source"
+#define AudioNfmsynth "fmsynth"
+#define AudioNwave "wave"
+#define AudioNmidi "midi"
+
+#define AudioElinear "linear"
+#define AudioEmulaw "mulaw"
+#define AudioEalaw "alaw"
+#define AudioEpcm16 "PCM-16"
+#define AudioEpcm8 "PCM-8"
+#define AudioEadpcm "ADPCM"
#define AudioCInputs "Inputs"
#define AudioCOutputs "Outputs"
===================================================================
RCS file: dev/isa/RCS/ad1848.c,v
retrieving revision 1.1
diff -u -r1.1 dev/isa/ad1848.c
--- 1.1 1995/05/08 22:43:57
+++ dev/isa/ad1848.c 1995/05/08 22:50:33
@@ -714,19 +714,19 @@
{
switch (fp->index) {
case 0:
- strcpy(fp->name, "MU-Law");
+ strcpy(fp->name, AudioEmulaw);
fp->format_id = AUDIO_ENCODING_ULAW;
break;
case 1:
- strcpy(fp->name, "A-Law");
+ strcpy(fp->name, AudioEalaw);
fp->format_id = AUDIO_ENCODING_ALAW;
break;
case 2:
- strcpy(fp->name, "pcm16");
+ strcpy(fp->name, AudioEpcm16);
fp->format_id = AUDIO_ENCODING_PCM16;
break;
case 3:
- strcpy(fp->name, "pcm8");
+ strcpy(fp->name, AudioEpcm8);
fp->format_id = AUDIO_ENCODING_PCM8;
break;
default:
===================================================================
RCS file: dev/isa/RCS/sbdsp.c,v
retrieving revision 1.2
diff -u -r1.2 dev/isa/sbdsp.c
--- 1.2 1995/05/07 05:45:33
+++ dev/isa/sbdsp.c 1995/05/08 22:50:27
@@ -301,11 +301,11 @@
switch (fp->index) {
case 0:
- strcpy(fp->name, "MU-Law");
+ strcpy(fp->name, AudioEmulaw);
fp->format_id = AUDIO_ENCODING_ULAW;
break;
- case 2:
- strcpy(fp->name, "pcm16");
+ case 1:
+ strcpy(fp->name, AudioEpcm16);
fp->format_id = AUDIO_ENCODING_PCM16;
break;
default:
@@ -1596,7 +1596,7 @@
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 */
+ strcpy(dip->label.name, AudioNfmsynth);
dip->un.v.num_channels = 2;
strcpy(dip->un.v.units.name, AudioNvolume);
break;
State-Changed-From-To: open->closed
State-Changed-By: scottr
State-Changed-When: Wed Jan 31 19:21:14 EST 1996
State-Changed-Why:
Changes committed prior to the NetBSD 1.1 release.
>Unformatted:
(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.