Respect the law: Use A-law and mu-law as spellings as far as easily possible.

Inspired by Igor Sobrado in PR 19680.
This commit is contained in:
wiz 2003-04-06 18:20:07 +00:00
parent b30bba2160
commit 68caa698b2
27 changed files with 140 additions and 140 deletions

View File

@ -8,14 +8,14 @@
# Sun/NeXT audio data
0 string .snd Sun/NeXT audio data:
>12 belong 1 8-bit ISDN u-law,
>12 belong 1 8-bit ISDN mu-law,
>12 belong 2 8-bit linear PCM [REF-PCM],
>12 belong 3 16-bit linear PCM,
>12 belong 4 24-bit linear PCM,
>12 belong 5 32-bit linear PCM,
>12 belong 6 32-bit IEEE floating point,
>12 belong 7 64-bit IEEE floating point,
>12 belong 23 8-bit ISDN u-law compressed (CCITT G.721 ADPCM voice data encoding),
>12 belong 23 8-bit ISDN mu-law compressed (CCITT G.721 ADPCM voice data encoding),
>12 belong 24 compressed (8-bit G.722 ADPCM)
>12 belong 25 compressed (3-bit G.723 ADPCM),
>12 belong 26 compressed (5-bit G.723 ADPCM),
@ -28,14 +28,14 @@
# DEC systems (e.g. DECstation 5000) use a variant of the Sun/NeXT format
# that uses little-endian encoding and has a different magic number
0 lelong 0x0064732E DEC audio data:
>12 lelong 1 8-bit ISDN u-law,
>12 lelong 1 8-bit ISDN mu-law,
>12 lelong 2 8-bit linear PCM [REF-PCM],
>12 lelong 3 16-bit linear PCM,
>12 lelong 4 24-bit linear PCM,
>12 lelong 5 32-bit linear PCM,
>12 lelong 6 32-bit IEEE floating point,
>12 lelong 7 64-bit IEEE floating point,
>12 lelong 23 8-bit ISDN u-law compressed (CCITT G.721 ADPCM voice data encoding),
>12 lelong 23 8-bit ISDN mu-law compressed (CCITT G.721 ADPCM voice data encoding),
>20 lelong 1 mono,
>20 lelong 2 stereo,
>20 lelong 4 quad,

View File

@ -40,8 +40,8 @@
>>20 leshort 1 \b, Microsoft PCM
>>>34 leshort >0 \b, %d bit
>>20 leshort 2 \b, Microsoft ADPCM
>>20 leshort 6 \b, ITU G.711 a-law
>>20 leshort 7 \b, ITU G.711 u-law
>>20 leshort 6 \b, ITU G.711 A-law
>>20 leshort 7 \b, ITU G.711 mu-law
>>20 leshort 17 \b, IMA ADPCM
>>20 leshort 20 \b, ITU G.723 ADPCM (Yamaha)
>>20 leshort 49 \b, GSM 6.10

View File

@ -1,4 +1,4 @@
.\" $NetBSD: audio.4,v 1.50 2002/03/13 00:55:02 uwe Exp $
.\" $NetBSD: audio.4,v 1.51 2003/04/06 18:20:08 wiz Exp $
.\"
.\" Copyright (c) 1996 The NetBSD Foundation, Inc.
.\" All rights reserved.
@ -81,7 +81,7 @@ while it is in use.
When
.Pa /dev/audio
is opened, it automatically directs the underlying driver to manipulate
monaural 8-bit mulaw samples.
monaural 8-bit mu-law samples.
In addition, if it is opened read-only
(write-only) the device is set to half-duplex record (play) mode with
recording (playing) unpaused and playing (recording) paused.
@ -372,9 +372,9 @@ The encoding parameter can have the following values:
.Pp
.Bl -tag -width AUDIO_ENCODING_SLINEAR_BE -compact
.It Dv AUDIO_ENCODING_ULAW
mulaw encoding, 8 bits/sample
mu-law encoding, 8 bits/sample
.It Dv AUDIO_ENCODING_ALAW
alaw encoding, 8 bits/sample
A-law encoding, 8 bits/sample
.It Dv AUDIO_ENCODING_SLINEAR
two's complement signed linear encoding with the platform byte order
.It Dv AUDIO_ENCODING_ULINEAR

View File

@ -1,4 +1,4 @@
.\" $NetBSD: bba.4,v 1.4 2003/03/30 21:20:17 wiz Exp $
.\" $NetBSD: bba.4,v 1.5 2003/04/06 18:20:08 wiz Exp $
.\"
.\" Copyright (c) 2000 The NetBSD Foundation, Inc.
.\" All rights reserved.
@ -50,7 +50,7 @@ and DEC Personal DECstation
.Ns ( Nx Ns /pmax )
systems. The baseboard
audio driver is based on the AMD 79c30 ISDN and audio interface. The
interface is only capable of playing and recording 8kHz u-law audio.
interface is only capable of playing and recording 8kHz mu-law audio.
.Sh SEE ALSO
.Xr audio 4 ,
.Xr ioasic 4

View File

@ -1,4 +1,4 @@
.\" $NetBSD: isdntel.4,v 1.2 2002/07/29 00:42:57 wiz Exp $
.\" $NetBSD: isdntel.4,v 1.3 2003/04/06 18:20:09 wiz Exp $
.\"
.\" Copyright (c) 1997, 1999 Hellmuth Michaelis. All rights reserved.
.\"
@ -23,7 +23,7 @@
.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
.\" SUCH DAMAGE.
.\"
.\" $Id: isdntel.4,v 1.2 2002/07/29 00:42:57 wiz Exp $
.\" $Id: isdntel.4,v 1.3 2003/04/06 18:20:09 wiz Exp $
.\"
.\" $FreeBSD$
.\"
@ -63,7 +63,7 @@ so the
.Nm
driver does the bit-reversion process in any case.
.Pp
Additionally, the user can specify to do A-law to u-law, u-law to A-law
Additionally, the user can specify to do A-law to mu-law, mu-law to A-law
or no conversion at all in the
.Nm
driver by using the
@ -86,40 +86,40 @@ parameters are available:
.Pp
.Bl -tag -width Ds -compact -offset indent
.It Ar CVT_NONE
do no A-law/u-law audio format conversion. The conversion path looks like
do no A-law/mu-law audio format conversion. The conversion path looks like
this:
.Pp
USER \*[Lt]--\*[Gt] bitreversing \*[Lt]--\*[Gt] ISDN-line
.Pp
.It Ar CVT_ALAW2ULAW
set set audio format conversion to do an audio conversion from A-law
(on the ISDN line) to u-law (in the userland).
(on the ISDN line) to mu-law (in the userland).
The
.Xr read 2
conversion path looks like this:
.Pp
USER \*[Lt]-- u-law/A-law \*[Lt]-- bitreversing \*[Lt]-- ISDN-line
USER \*[Lt]-- mu-law/A-law \*[Lt]-- bitreversing \*[Lt]-- ISDN-line
.Pp
and the
.Xr write 2
conversion path looks like this:
.Pp
USER --\*[Gt] u-law/A-law --\*[Gt] bitreversing --\*[Gt] ISDN-line
USER --\*[Gt] mu-law/A-law --\*[Gt] bitreversing --\*[Gt] ISDN-line
.Pp
.It Ar CVT_ULAW2ALAW
set set audio format conversion to do an audio conversion from u-law
set set audio format conversion to do an audio conversion from mu-law
(on the ISDN line) to A-law (in the userland).
The
.Xr read 2
conversion path looks like this:
.Pp
USER \*[Lt]-- A-law/u-law \*[Lt]-- bitreversing \*[Lt]-- ISDN-line
USER \*[Lt]-- A-law/mu-law \*[Lt]-- bitreversing \*[Lt]-- ISDN-line
.Pp
and the
.Xr write 2
conversion path looks like this:
.Pp
USER --\*[Gt] A-law/u-law --\*[Gt] bitreversing --\*[Gt] ISDN-line
USER --\*[Gt] A-law/mu-law --\*[Gt] bitreversing --\*[Gt] ISDN-line
.Pp
.El
.Sh SEE ALSO
@ -128,7 +128,7 @@ USER --\*[Gt] A-law/u-law --\*[Gt] bitreversing --\*[Gt] ISDN-line
.Xr isdntel 8 ,
.Xr isdntelctl 8
.Sh STANDARDS
A-Law and u-Law are specified in ITU Recommendation G.711.
A-law and mu-law are specified in ITU Recommendation G.711.
.Sh AUTHORS
The
.Nm

View File

@ -1,4 +1,4 @@
.\" $NetBSD: audioamd.4,v 1.3 2001/04/21 14:35:32 wiz Exp $
.\" $NetBSD: audioamd.4,v 1.4 2003/04/06 18:20:09 wiz Exp $
.\"
.\" Copyright (c) 2000 The NetBSD Foundation, Inc.
.\" All rights reserved.
@ -48,7 +48,7 @@ The
driver provides support for the baseboard audio found on
sun4c and sun4m systems. The baseboard audio driver is based on the
AMD 79c30 ISDN and audio interface. The interface is only capable of
playing and recording 8kHz u-law audio.
playing and recording 8kHz mu-law audio.
.Sh SEE ALSO
.Xr audio 4 ,
.Xr sbus 4

View File

@ -1,4 +1,4 @@
.\" $NetBSD: audio.9,v 1.23 2002/10/14 13:43:14 wiz Exp $
.\" $NetBSD: audio.9,v 1.24 2003/04/06 18:20:09 wiz Exp $
.\"
.\" Copyright (c) 1999, 2000 The NetBSD Foundation, Inc.
.\" All rights reserved.
@ -97,7 +97,7 @@ struct audio_hw_if {
struct audio_params {
u_long sample_rate; /* sample rate */
u_int encoding; /* ulaw, linear, etc */
u_int encoding; /* mu-law, linear, etc */
u_int precision; /* bits/sample */
u_int channels; /* mono(1), stereo(2) */
/* Software en/decode functions, set if SW coding required by HW */
@ -209,7 +209,7 @@ and
structures contain the encoding parameters that should be set.
.Pp
If the hardware requires software assistance with some encoding
(e.g., it might be lacking mulaw support) it should fill the
(e.g., it might be lacking mu-law support) it should fill the
.Va sw_code ,
.Va factor
and
@ -218,8 +218,8 @@ fields of these structures with translation information, and
set to hw_* fields what format the hardware actually uses.
For example, if
.Va play
requests [8000Hz, mulaw, 8bit, 1ch] and the hardware supports
not 8bit mulaw but 16bit slinear_le, the driver should set
requests [8000Hz, mu-law, 8bit, 1ch] and the hardware supports
not 8bit mu-law but 16bit slinear_le, the driver should set
.Va mulaw_to_slinear16_le
to
.Va sw_code ,

View File

@ -1,4 +1,4 @@
/* $NetBSD: aucc.c,v 1.32 2002/10/02 04:55:48 thorpej Exp $ */
/* $NetBSD: aucc.c,v 1.33 2003/04/06 18:20:10 wiz Exp $ */
/*
* Copyright (c) 1999 Bernardo Innocenti
@ -35,14 +35,14 @@
/* TODO:
*
* - ulaw -> 14bit conversion
* - mu-law -> 14bit conversion
* - channel allocation is wrong for 14bit mono
* - convert the... err... conversion routines to 68k asm for best performance
* XXX: NO. aucc audio is limited by chipmem speed, anyway. You dont
* want to make life difficult for amigappc work.
* -is
*
* - rely on auconv.c routines for ulaw/alaw conversions
* - rely on auconv.c routines for mu-law/A-law conversions
* - perhaps use a calibration table for better 14bit output
* - set 31KHz AGA video mode to allow 44.1KHz even if grfcc is missing
* in the kernel
@ -53,7 +53,7 @@
#if NAUCC > 0
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: aucc.c,v 1.32 2002/10/02 04:55:48 thorpej Exp $");
__KERNEL_RCSID(0, "$NetBSD: aucc.c,v 1.33 2003/04/06 18:20:10 wiz Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@ -149,7 +149,7 @@ struct audio_device aucc_device = {
struct aucc_softc *aucc=NULL;
unsigned char ulaw_to_lin[] = {
unsigned char mulaw_to_lin[] = {
0x82, 0x86, 0x8a, 0x8e, 0x92, 0x96, 0x9a, 0x9e,
0xa2, 0xa6, 0xaa, 0xae, 0xb2, 0xb6, 0xba, 0xbe,
0xc1, 0xc3, 0xc5, 0xc7, 0xc9, 0xcb, 0xcd, 0xcf,
@ -217,10 +217,10 @@ static void aucc_decode_ulinear8_2ch(u_char **, u_char *, int);
static void aucc_decode_ulinear8_3ch(u_char **, u_char *, int);
static void aucc_decode_ulinear8_4ch(u_char **, u_char *, int);
static void aucc_decode_ulaw_1ch(u_char **, u_char *, int);
static void aucc_decode_ulaw_2ch(u_char **, u_char *, int);
static void aucc_decode_ulaw_3ch(u_char **, u_char *, int);
static void aucc_decode_ulaw_4ch(u_char **, u_char *, int);
static void aucc_decode_mulaw_1ch(u_char **, u_char *, int);
static void aucc_decode_mulaw_2ch(u_char **, u_char *, int);
static void aucc_decode_mulaw_3ch(u_char **, u_char *, int);
static void aucc_decode_mulaw_4ch(u_char **, u_char *, int);
static void aucc_decode_slinear16_1ch(u_char **, u_char *, int);
static void aucc_decode_slinear16_2ch(u_char **, u_char *, int);
@ -335,7 +335,7 @@ init_aucc(struct aucc_softc *sc)
sc->sc_precision=8;
sc->sc_14bit = 0;
sc->sc_encoding=AUDIO_ENCODING_ULAW;
sc->sc_decodefunc = aucc_decode_ulaw_1ch;
sc->sc_decodefunc = aucc_decode_mulaw_1ch;
/* clear interrupts and dma: */
custom.intena = AUCC_ALLINTF;
@ -475,16 +475,16 @@ aucc_set_params(void *addr, int setmode, int usemode, struct audio_params *p,
case AUDIO_ENCODING_ULAW:
switch (p->channels) {
case 1:
sc->sc_decodefunc = aucc_decode_ulaw_1ch;
sc->sc_decodefunc = aucc_decode_mulaw_1ch;
break;
case 2:
sc->sc_decodefunc = aucc_decode_ulaw_2ch;
sc->sc_decodefunc = aucc_decode_mulaw_2ch;
break;
case 3:
sc->sc_decodefunc = aucc_decode_ulaw_3ch;
sc->sc_decodefunc = aucc_decode_mulaw_3ch;
break;
case 4:
sc->sc_decodefunc = aucc_decode_ulaw_4ch;
sc->sc_decodefunc = aucc_decode_mulaw_4ch;
break;
default:
return EINVAL;
@ -1105,42 +1105,42 @@ aucc_decode_ulinear8_4ch(u_char **dmap, u_char *p, int i)
static void
aucc_decode_ulaw_1ch(u_char **dmap, u_char *p, int i)
aucc_decode_mulaw_1ch(u_char **dmap, u_char *p, int i)
{
u_char *ch0 = dmap[0];
while (i--)
*ch0++ = ulaw_to_lin[*p++];
*ch0++ = mulaw_to_lin[*p++];
}
static void
aucc_decode_ulaw_2ch(u_char **dmap, u_char *p, int i)
aucc_decode_mulaw_2ch(u_char **dmap, u_char *p, int i)
{
u_char *ch0 = dmap[0];
u_char *ch1 = dmap[1];
while (i--) {
*ch0++ = ulaw_to_lin[*p++];
*ch1++ = ulaw_to_lin[*p++];
*ch0++ = mulaw_to_lin[*p++];
*ch1++ = mulaw_to_lin[*p++];
}
}
static void
aucc_decode_ulaw_3ch(u_char **dmap, u_char *p, int i)
aucc_decode_mulaw_3ch(u_char **dmap, u_char *p, int i)
{
u_char *ch0 = dmap[0];
u_char *ch1 = dmap[1];
u_char *ch2 = dmap[2];
while (i--) {
*ch0++ = ulaw_to_lin[*p++];
*ch1++ = ulaw_to_lin[*p++];
*ch2++ = ulaw_to_lin[*p++];
*ch0++ = mulaw_to_lin[*p++];
*ch1++ = mulaw_to_lin[*p++];
*ch2++ = mulaw_to_lin[*p++];
}
}
static void
aucc_decode_ulaw_4ch(u_char **dmap, u_char *p, int i)
aucc_decode_mulaw_4ch(u_char **dmap, u_char *p, int i)
{
u_char *ch0 = dmap[0];
u_char *ch1 = dmap[1];
@ -1148,10 +1148,10 @@ aucc_decode_ulaw_4ch(u_char **dmap, u_char *p, int i)
u_char *ch3 = dmap[3];
while (i--) {
*ch0++ = ulaw_to_lin[*p++];
*ch1++ = ulaw_to_lin[*p++];
*ch2++ = ulaw_to_lin[*p++];
*ch3++ = ulaw_to_lin[*p++];
*ch0++ = mulaw_to_lin[*p++];
*ch1++ = mulaw_to_lin[*p++];
*ch2++ = mulaw_to_lin[*p++];
*ch3++ = mulaw_to_lin[*p++];
}
}

View File

@ -1,4 +1,4 @@
/* $NetBSD: repulse.c,v 1.7 2002/10/08 18:01:42 kent Exp $ */
/* $NetBSD: repulse.c,v 1.8 2003/04/06 18:20:10 wiz Exp $ */
/*-
* Copyright (c) 2001 The NetBSD Foundation, Inc.
@ -37,7 +37,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: repulse.c,v 1.7 2002/10/08 18:01:42 kent Exp $");
__KERNEL_RCSID(0, "$NetBSD: repulse.c,v 1.8 2003/04/06 18:20:10 wiz Exp $");
#include <sys/types.h>
#include <sys/param.h>
@ -701,7 +701,7 @@ rep_set_params(void *addr, int setmode, int usemode,
else if (p->precision == 16 && p->channels == 2)
sc->sc_captfun = rep_read_16_stereo;
}
/* TBD: ulaw, alaw */
/* TBD: mu-law, A-law */
}
return 0;
}

View File

@ -1,4 +1,4 @@
/* $NetBSD: vraiu.c,v 1.3 2002/10/02 05:26:53 thorpej Exp $ */
/* $NetBSD: vraiu.c,v 1.4 2003/04/06 18:20:10 wiz Exp $ */
/*
* Copyright (c) 2001 HAMAJIMA Katsuomi. All rights reserved.
@ -147,8 +147,8 @@ static void vraiu_slinear8_1(struct vraiu_softc *, u_short *, void *, int);
static void vraiu_slinear8_2(struct vraiu_softc *, u_short *, void *, int);
static void vraiu_ulinear8_1(struct vraiu_softc *, u_short *, void *, int);
static void vraiu_ulinear8_2(struct vraiu_softc *, u_short *, void *, int);
static void vraiu_ulaw_1(struct vraiu_softc *, u_short *, void *, int);
static void vraiu_ulaw_2(struct vraiu_softc *, u_short *, void *, int);
static void vraiu_mulaw_1(struct vraiu_softc *, u_short *, void *, int);
static void vraiu_mulaw_2(struct vraiu_softc *, u_short *, void *, int);
static void vraiu_slinear16_1(struct vraiu_softc *, u_short *, void *, int);
static void vraiu_slinear16_2(struct vraiu_softc *, u_short *, void *, int);
static void vraiu_slinear16sw_1(struct vraiu_softc *, u_short *, void *, int);
@ -255,7 +255,7 @@ vraiu_attach(struct device *parent, struct device *self, void *aux)
sc->sc_channels = 1;
sc->sc_precision = 8;
sc->sc_encoding = AUDIO_ENCODING_ULAW;
sc->sc_decodefunc = vraiu_ulaw_1;
sc->sc_decodefunc = vraiu_mulaw_1;
DPRINTFN(1, ("vraiu_attach: reset AIU\n"))
bus_space_write_2(sc->sc_iot, sc->sc_ioh, SEQ_REG_W, AIURST);
/* attach audio subsystem */
@ -391,10 +391,10 @@ vraiu_set_params(void *self, int setmode, int usemode,
case AUDIO_ENCODING_ULAW:
switch (play->channels) {
case 1:
sc->sc_decodefunc = vraiu_ulaw_1;
sc->sc_decodefunc = vraiu_mulaw_1;
break;
case 2:
sc->sc_decodefunc = vraiu_ulaw_2;
sc->sc_decodefunc = vraiu_mulaw_2;
break;
default:
DPRINTFN(0, ("vraiu_set_params: channel error"
@ -704,7 +704,7 @@ vraiu_get_props(void *self)
return 0;
}
unsigned char ulaw_to_lin[] = {
unsigned char mulaw_to_lin[] = {
0x02, 0x06, 0x0a, 0x0e, 0x12, 0x16, 0x1a, 0x1e,
0x22, 0x26, 0x2a, 0x2e, 0x32, 0x36, 0x3a, 0x3e,
0x41, 0x43, 0x45, 0x47, 0x49, 0x4b, 0x4d, 0x4f,
@ -824,11 +824,11 @@ vraiu_ulinear8_2(struct vraiu_softc *sc, u_short *dmap, void *p, int n)
}
static void
vraiu_ulaw_1(struct vraiu_softc *sc, u_short *dmap, void *p, int n)
vraiu_mulaw_1(struct vraiu_softc *sc, u_short *dmap, void *p, int n)
{
u_char *q = (u_char*)p;
DPRINTFN(3, ("vraiu_ulaw_1\n"));
DPRINTFN(3, ("vraiu_mulaw_1\n"));
#ifdef DIAGNOSTIC
if (n > AUDIO_BUF_SIZE/2) {
@ -838,17 +838,17 @@ vraiu_ulaw_1(struct vraiu_softc *sc, u_short *dmap, void *p, int n)
}
#endif
while (n--) {
short i = ulaw_to_lin[*q++];
short i = mulaw_to_lin[*q++];
*dmap++ = i << 2;
}
}
static void
vraiu_ulaw_2(struct vraiu_softc *sc, u_short *dmap, void *p, int n)
vraiu_mulaw_2(struct vraiu_softc *sc, u_short *dmap, void *p, int n)
{
u_char *q = (u_char*)p;
DPRINTFN(3, ("vraiu_ulaw_2\n"));
DPRINTFN(3, ("vraiu_mulaw_2\n"));
#ifdef DIAGNOSTIC
if (n > AUDIO_BUF_SIZE) {
@ -859,8 +859,8 @@ vraiu_ulaw_2(struct vraiu_softc *sc, u_short *dmap, void *p, int n)
#endif
n /= 2;
while (n--) {
short i = ulaw_to_lin[*q++];
short j = ulaw_to_lin[*q++];
short i = mulaw_to_lin[*q++];
short j = mulaw_to_lin[*q++];
*dmap++ = (i + j) << 1;
}
}

View File

@ -1,4 +1,4 @@
/* $NetBSD: audio.c,v 1.174 2003/03/31 18:47:58 jdolecek Exp $ */
/* $NetBSD: audio.c,v 1.175 2003/04/06 18:20:11 wiz Exp $ */
/*
* Copyright (c) 1991-1993 Regents of the University of California.
@ -61,7 +61,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: audio.c,v 1.174 2003/03/31 18:47:58 jdolecek Exp $");
__KERNEL_RCSID(0, "$NetBSD: audio.c,v 1.175 2003/04/06 18:20:11 wiz Exp $");
#include "audio.h"
#if NAUDIO > 0
@ -196,7 +196,7 @@ const struct cdevsw audio_cdevsw = {
nostop, notty, audiopoll, audiommap, audiokqfilter,
};
/* The default audio mode: 8 kHz mono ulaw */
/* The default audio mode: 8 kHz mono mu-law */
const struct audio_params audio_default =
{ 8000, AUDIO_ENCODING_ULAW, 8, 1, 0, 1, 1 };

View File

@ -1,4 +1,4 @@
/* $NetBSD: audio_if.h,v 1.50 2003/03/31 18:47:59 jdolecek Exp $ */
/* $NetBSD: audio_if.h,v 1.51 2003/04/06 18:20:12 wiz Exp $ */
/*
* Copyright (c) 1994 Havard Eidnes.
@ -55,7 +55,7 @@ struct audio_softc;
struct audio_params {
u_long sample_rate; /* sample rate */
u_int encoding; /* e.g. ulaw, linear, etc */
u_int encoding; /* e.g. mu-law, linear, etc */
u_int precision; /* bits/sample */
u_int channels; /* mono(1), stereo(2) */
/* Software en/decode functions, set if SW coding required by HW */
@ -76,7 +76,7 @@ struct audio_params {
u_int hw_channels;
};
/* The default audio mode: 8 kHz mono ulaw */
/* The default audio mode: 8 kHz mono mu-law */
extern const struct audio_params audio_default;
struct malloc_type;

View File

@ -1,4 +1,4 @@
/* $NetBSD: ad1848reg.h,v 1.9 1999/09/30 23:30:15 itohy Exp $ */
/* $NetBSD: ad1848reg.h,v 1.10 2003/04/06 18:20:12 wiz Exp $ */
/*
* Copyright (c) 1994 John Brezak
@ -137,7 +137,7 @@
#define FMT_PCM8 0x00 /* 8-bit unsigned */
#define FMT_ULAW 0x20 /* 8-bit mu-law */
#define FMT_TWOS_COMP 0x40 /* 16-bit signed */
#define FMT_ALAW 0x60 /* 8-bit alaw */
#define FMT_ALAW 0x60 /* 8-bit A-law */
#define FMT_ADPCM 0xa0 /* IMA ADPCM */
#define FMT_TWOS_COMP_BE 0xc0 /* 16-bit signed, big endian */

View File

@ -36,7 +36,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: daic.c,v 1.13 2003/02/04 23:26:36 martin Exp $");
__KERNEL_RCSID(0, "$NetBSD: daic.c,v 1.14 2003/04/06 18:20:12 wiz Exp $");
/*
* daic.c: MI driver for Diehl active ISDN cards (S, SX, SXn, SCOM, QUADRO)
@ -125,7 +125,7 @@ static u_int8_t parm_none[] = { 0 };
/* assign request for the global d-channel instance */
static u_int8_t parm_global_assign[] = {
/* BC len cap rate a-law */
/* BC len cap rate A-law */
0x04, 0x03, 0x80, 0x90, 0xa3, /* 64k speech */
0x04, 0x02, 0x88, 0x90, /* 64k data */
0x04, 0x03, 0x89, 0x90, 0xa3, /* restricted digital info */

View File

@ -1,4 +1,4 @@
/* $NetBSD: interwave.c,v 1.16 2003/02/01 06:23:37 thorpej Exp $ */
/* $NetBSD: interwave.c,v 1.17 2003/04/06 18:20:13 wiz Exp $ */
/*
* Copyright (c) 1997, 1999 The NetBSD Foundation, Inc.
@ -36,7 +36,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: interwave.c,v 1.16 2003/02/01 06:23:37 thorpej Exp $");
__KERNEL_RCSID(0, "$NetBSD: interwave.c,v 1.17 2003/04/06 18:20:13 wiz Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@ -641,7 +641,7 @@ iw_query_encoding(addr, fp)
*/
/*
* except in wavetable synth. there we have only ulaw and 8 and 16
* except in wavetable synth. there we have only mu-law and 8 and 16
* bit linear data
*/

View File

@ -1,7 +1,7 @@
#ifndef INTERWAVEREG_H
#define INTERWAVEREG_H
/* $NetBSD: interwavereg.h,v 1.4 2001/04/30 01:34:04 lukem Exp $ */
/* $NetBSD: interwavereg.h,v 1.5 2003/04/06 18:20:13 wiz Exp $ */
/*
* Copyright (c) 1997 The NetBSD Foundation, Inc.
@ -331,8 +331,8 @@
#define BIT16_BIG 0xC0 /* 16-bit signed, big endian */
#define IMA_ADPCM 0xA0 /* IMA-compliant ADPCM */
#define BIT8_ALAW 0x60 /* 8-bit A-law */
#define BIT16_LITTLE 0x40 /* 16-bit signed, lillte endian */
#define BIT8_ULAW 0x20 /* 8-bit u-law */
#define BIT16_LITTLE 0x40 /* 16-bit signed, little endian */
#define BIT8_ULAW 0x20 /* 8-bit mu-law */
#define BIT8_LINEAR 0x00 /* 8-bit unsigned */
#define REC_DFORMAT 0x1C
#define PLAY_DFORMAT 0x08

View File

@ -1,4 +1,4 @@
/* $NetBSD: aria.c,v 1.16 2002/12/10 05:05:11 thorpej Exp $ */
/* $NetBSD: aria.c,v 1.17 2003/04/06 18:20:13 wiz Exp $ */
/*-
* Copyright (c) 1995, 1996, 1998 Roland C. Dowdeswell. All rights reserved.
@ -40,8 +40,8 @@
* with O_RDONLY and O_WRONLY at the same time. But I
* do not see support for this in /sys/dev/audio.c, so
* I cannot effectively code it.
* o We should nicely deal with the cards that can do mulaw
* and alaw output.
* o We should nicely deal with the cards that can do mu-law
* and A-law output.
* o Rework the mixer interface.
* o Deal with the lvls better. We need to do better mapping
* between logarithmic scales and the one byte that
@ -50,7 +50,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: aria.c,v 1.16 2002/12/10 05:05:11 thorpej Exp $");
__KERNEL_RCSID(0, "$NetBSD: aria.c,v 1.17 2003/04/06 18:20:13 wiz Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@ -110,7 +110,7 @@ struct aria_softc {
u_short sc_gain[2]; /* left/right gain (play) */
u_long sc_rate; /* Sample rate for input and output */
u_int sc_encoding; /* audio encoding -- ulaw/linear */
u_int sc_encoding; /* audio encoding -- mu-law/linear */
int sc_chans; /* # of channels */
int sc_precision; /* # bits per sample */

View File

@ -1,4 +1,4 @@
/* $NetBSD: gus.c,v 1.78 2002/10/11 19:14:06 fvdl Exp $ */
/* $NetBSD: gus.c,v 1.79 2003/04/06 18:20:13 wiz Exp $ */
/*-
* Copyright (c) 1996, 1999 The NetBSD Foundation, Inc.
@ -46,7 +46,7 @@
* Maybe use the double-speed sampling/hardware deinterleave trick
* from the GUS SDK?) A 486/33 isn't quite fast enough to keep
* up with 44.1kHz 16-bit stereo output without some drop-outs.
* . use CS4231 for 16-bit sampling, for a-law and mu-law playback.
* . use CS4231 for 16-bit sampling, for A-law and mu-law playback.
* . actually test full-duplex sampling(recording) and playback.
*/
@ -95,7 +95,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: gus.c,v 1.78 2002/10/11 19:14:06 fvdl Exp $");
__KERNEL_RCSID(0, "$NetBSD: gus.c,v 1.79 2003/04/06 18:20:13 wiz Exp $");
#include "gus.h"
#if NGUS > 0
@ -1050,7 +1050,7 @@ gusattach(parent, self, aux)
/*
* Set some default values
* XXX others start with 8kHz mono mulaw
* XXX others start with 8kHz mono mu-law
*/
sc->sc_irate = sc->sc_orate = 44100;

View File

@ -1,4 +1,4 @@
/* $NetBSD: mulaw.c,v 1.20 2002/03/09 05:39:00 tacha Exp $ */
/* $NetBSD: mulaw.c,v 1.21 2003/04/06 18:20:12 wiz Exp $ */
/*
* Copyright (c) 1991-1993 Regents of the University of California.
@ -35,14 +35,14 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: mulaw.c,v 1.20 2002/03/09 05:39:00 tacha Exp $");
__KERNEL_RCSID(0, "$NetBSD: mulaw.c,v 1.21 2003/04/06 18:20:12 wiz Exp $");
#include <sys/types.h>
#include <sys/audioio.h>
#include <dev/mulaw.h>
/*
* This table converts a (8 bit) mulaw value to a 16 bit value.
* This table converts a (8 bit) mu-law value to a 16 bit value.
* The 16 bits are represented as an array of two bytes for easier access
* to the individual bytes.
*/

View File

@ -1,4 +1,4 @@
/* $NetBSD: mulaw.h,v 1.14 2002/03/09 05:39:00 tacha Exp $ */
/* $NetBSD: mulaw.h,v 1.15 2003/04/06 18:20:12 wiz Exp $ */
/*-
* Copyright (c) 1996 The NetBSD Foundation, Inc.
@ -49,17 +49,17 @@ extern void ulinear8_to_mulaw(void *, u_char *buf, int cnt);
/* Convert 8-bit mu-law to/from 8 bit signed linear. */
extern void mulaw_to_slinear8(void *, u_char *buf, int cnt);
extern void slinear8_to_mulaw(void *, u_char *buf, int cnt);
/* Convert 8-bit a-law to 16 bit unsigned linear. */
/* Convert 8-bit A-law to 16 bit unsigned linear. */
extern void alaw_to_ulinear16_le(void *, u_char *buf, int cnt);
extern void alaw_to_ulinear16_be(void *, u_char *buf, int cnt);
/* Convert 8-bit a-law to/from 16 bit signed linear. */
/* Convert 8-bit A-law to/from 16 bit signed linear. */
extern void alaw_to_slinear16_le(void *, u_char *buf, int cnt);
extern void alaw_to_slinear16_be(void *, u_char *buf, int cnt);
extern void slinear16_to_alaw_le(void *, u_char *buf, int cnt);
extern void slinear16_to_alaw_be(void *, u_char *buf, int cnt);
/* Convert 8-bit a-law to/from 8 bit unsigned linear. */
/* Convert 8-bit A-law to/from 8 bit unsigned linear. */
extern void alaw_to_ulinear8(void *, u_char *buf, int cnt);
extern void ulinear8_to_alaw(void *, u_char *buf, int cnt);
/* Convert 8-bit a-law to/from 8 bit signed linear. */
/* Convert 8-bit A-law to/from 8 bit signed linear. */
extern void alaw_to_slinear8(void *, u_char *buf, int cnt);
extern void slinear8_to_alaw(void *, u_char *buf, int cnt);

View File

@ -27,7 +27,7 @@
* i4b_tel.c - device driver for ISDN telephony
* --------------------------------------------
*
* $Id: i4b_tel.c,v 1.12 2002/11/26 19:49:01 christos Exp $
* $Id: i4b_tel.c,v 1.13 2003/04/06 18:20:13 wiz Exp $
*
* $FreeBSD$
*
@ -36,7 +36,7 @@
*---------------------------------------------------------------------------*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: i4b_tel.c,v 1.12 2002/11/26 19:49:01 christos Exp $");
__KERNEL_RCSID(0, "$NetBSD: i4b_tel.c,v 1.13 2003/04/06 18:20:13 wiz Exp $");
#include "isdntel.h"
@ -485,14 +485,14 @@ isdntelioctl(dev_t dev, u_long cmd, caddr_t data, int flag, struct proc *p)
sc->wcvttab = 0;
break;
case CVT_ALAW2ULAW:
/* ISDN: a-law */
/* user: u-law */
/* ISDN: A-law */
/* user: mu-law */
sc->rcvttab = a2u_tab;
sc->wcvttab = u2a_tab;
break;
case CVT_ULAW2ALAW:
/* ISDN: u-law */
/* user: a-law */
/* ISDN: mu-law */
/* user: A-law */
sc->rcvttab = u2a_tab;
sc->wcvttab = a2u_tab;
break;
@ -1319,7 +1319,7 @@ tel_get_softc(int unit)
*===========================================================================*/
/*---------------------------------------------------------------------------*
* A-law to u-law conversion
* A-law to mu-law conversion
*---------------------------------------------------------------------------*/
static unsigned char a2u_tab[256] = {
/* 00 */ 0x2a, 0x2b, 0x28, 0x29, 0x2e, 0x2f, 0x2c, 0x2d,
@ -1357,7 +1357,7 @@ static unsigned char a2u_tab[256] = {
};
/*---------------------------------------------------------------------------*
* u-law to A-law conversion
* mu-law to A-law conversion
*---------------------------------------------------------------------------*/
static unsigned char u2a_tab[256] = {
/* 00 */ 0x2a, 0x2b, 0x28, 0x29, 0x2e, 0x2f, 0x2c, 0x2d,

View File

@ -27,7 +27,7 @@
* i4b_tel_ioctl.h telephony interface ioctls
* ------------------------------------------
*
* $Id: i4b_tel_ioctl.h,v 1.1.1.1 2001/01/05 12:49:53 martin Exp $
* $Id: i4b_tel_ioctl.h,v 1.2 2003/04/06 18:20:14 wiz Exp $
*
* $FreeBSD$
*
@ -44,9 +44,9 @@
/* supported audio format conversions */
#define CVT_NONE 0 /* no A-law/u-law conversion */
#define CVT_ALAW2ULAW 1 /* ISDN line: A-law, user: u-law */
#define CVT_ULAW2ALAW 2 /* ISDN line: u-law, user: A-law */
#define CVT_NONE 0 /* no A-law/mu-law conversion */
#define CVT_ALAW2ULAW 1 /* ISDN line: A-law, user: mu-law */
#define CVT_ULAW2ALAW 2 /* ISDN line: mu-law, user: A-law */
/*---------------------------------------------------------------------------*
* get / set audio format

View File

@ -1,4 +1,4 @@
/* $NetBSD: wav.c,v 1.4 2002/12/08 10:49:03 mrg Exp $ */
/* $NetBSD: wav.c,v 1.5 2003/04/06 18:20:14 wiz Exp $ */
/*
* Copyright (c) 2002 Matthew R. Green
@ -54,7 +54,7 @@ struct {
{ WAVE_FORMAT_PCM, "Microsoft PCM" },
{ WAVE_FORMAT_ADPCM, "Microsoft ADPCM" },
{ WAVE_FORMAT_ALAW, "Microsoft A-law" },
{ WAVE_FORMAT_MULAW, "Microsoft U-law" },
{ WAVE_FORMAT_MULAW, "Microsoft mu-law" },
{ WAVE_FORMAT_OKI_ADPCM,"OKI ADPCM" },
{ WAVE_FORMAT_DIGISTD, "Digistd format" },
{ WAVE_FORMAT_DIGIFIX, "Digifix format" },

View File

@ -6,13 +6,13 @@
* this stuff is worth it, you can buy me a beer in return. Poul-Henning Kamp
* ----------------------------------------------------------------------------
*
* $Id: dtmfdecode.c,v 1.1.1.1 2001/01/06 13:00:36 martin Exp $
* $Id: dtmfdecode.c,v 1.2 2003/04/06 18:20:14 wiz Exp $
*
* $FreeBSD$
*
* Extract DTMF signalling from ISDN4BSD A-law coded audio data
*
* A-Law to linear conversion from the sox package.
* A-law to linear conversion from the sox package.
*
*/
@ -22,7 +22,7 @@
/* Integer math scaling factor */
#define FSC (1<<12)
/* Alaw parameters */
/* A-law parameters */
#define SIGN_BIT (0x80) /* Sign bit for a A-law byte. */
#define QUANT_MASK (0xf) /* Quantization field mask. */
#define SEG_SHIFT (4) /* Left shift for segment number. */

View File

@ -1,4 +1,4 @@
.\" $NetBSD: isdntelctl.8,v 1.7 2002/07/29 01:08:29 wiz Exp $
.\" $NetBSD: isdntelctl.8,v 1.8 2003/04/06 18:20:14 wiz Exp $
.\"
.\" Copyright (c) 1997, 1999 Hellmuth Michaelis. All rights reserved.
.\"
@ -23,7 +23,7 @@
.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
.\" SUCH DAMAGE.
.\"
.\" $Id: isdntelctl.8,v 1.7 2002/07/29 01:08:29 wiz Exp $
.\" $Id: isdntelctl.8,v 1.8 2003/04/06 18:20:14 wiz Exp $
.\"
.\" $FreeBSD$
.\"
@ -61,9 +61,9 @@ unit number. The default value is zero to access
device
.Pa /dev/isdntel0 .
.It Fl A
Do A-law (ISDN line) -\*[Gt] u-law (userland) conversion.
Do A-law (ISDN line) -\*[Gt] mu-law (userland) conversion.
.It Fl U
Do u-law (ISDN line) -\*[Gt] A-law (userland) conversion.
Do mu-law (ISDN line) -\*[Gt] A-law (userland) conversion.
.It Fl N
Set sound conversion to do no format conversion.
.El
@ -73,7 +73,7 @@ so the
.Xr isdntel 4
driver does the bit-reversion process in any case.
.Pp
Additionally, the user can specify to do A-law to u-law, u-law to A-law
Additionally, the user can specify to do A-law to mu-law, mu-law to A-law
or no conversion at all in the isdntel driver by using the
.Nm
utility.
@ -92,7 +92,7 @@ displays the currently used sound format for device
.Xr isdnd.rc 5 ,
.Xr isdnd 8
.Sh STANDARDS
A-Law and u-Law are specified in ITU Recommendation G.711.
A-law and mu-law are specified in ITU Recommendation G.711.
.Sh AUTHORS
The
.Nm

View File

@ -27,7 +27,7 @@
* isdntelctl - i4b set telephone interface options
* ------------------------------------------------
*
* $Id: main.c,v 1.2 2002/03/16 17:03:44 martin Exp $
* $Id: main.c,v 1.3 2003/04/06 18:20:14 wiz Exp $
*
* $FreeBSD$
*
@ -141,15 +141,15 @@ main(int argc, char **argv)
if(format == CVT_NONE)
{
printf("device %s does not do A-law/u-law format conversion\n", namebuffer);
printf("device %s does not do A-law/mu-law format conversion\n", namebuffer);
}
else if(format == CVT_ALAW2ULAW)
{
printf("device %s does ISDN: A-law -> user: u-law format conversion\n", namebuffer);
printf("device %s does ISDN: A-law -> user: mu-law format conversion\n", namebuffer);
}
else if(format == CVT_ULAW2ALAW)
{
printf("device %s does ISDN: u-law -> user: A-law format conversion\n", namebuffer);
printf("device %s does ISDN: mu-law -> user: A-law format conversion\n", namebuffer);
}
else
{
@ -217,9 +217,9 @@ usage(void)
fprintf(stderr, " -c clear input queue\n");
fprintf(stderr, " -g get current settings\n");
fprintf(stderr, " -u unit specify unit number\n");
fprintf(stderr, " -A set conversion ISDN: A-law -> user: u-law\n");
fprintf(stderr, " -U set conversion ISDN: u-law -> user: A-law\n");
fprintf(stderr, " -N set conversion to no A-law/u-law conversion\n");
fprintf(stderr, " -A set conversion ISDN: A-law -> user: mu-law\n");
fprintf(stderr, " -U set conversion ISDN: mu-law -> user: A-law\n");
fprintf(stderr, " -N set conversion to no A-law/mu-law conversion\n");
fprintf(stderr, "\n");
exit(1);
}

View File

@ -27,7 +27,7 @@
* q931_util.c - utility functions to print Q.931 traces
* -----------------------------------------------------
*
* $Id: q931_util.c,v 1.1.1.1 2001/01/06 13:00:32 martin Exp $
* $Id: q931_util.c,v 1.2 2003/04/06 18:20:15 wiz Exp $
*
* $FreeBSD$
*
@ -296,7 +296,7 @@ p_q931bc(char *pbuf, unsigned char *buf)
sprintf((pbuf+strlen(pbuf)), "V.110");
break;
case 0x02:
sprintf((pbuf+strlen(pbuf)), "G.711 u-law");
sprintf((pbuf+strlen(pbuf)), "G.711 mu-law");
break;
case 0x03:
sprintf((pbuf+strlen(pbuf)), "G.711 A-law");