summaryrefslogtreecommitdiff
path: root/sys/arch/sparc/dev
diff options
context:
space:
mode:
authorJason Wright <jason@cvs.openbsd.org>2003-06-28 18:22:15 +0000
committerJason Wright <jason@cvs.openbsd.org>2003-06-28 18:22:15 +0000
commitb1348f32868296ae6988b6346b3d1e55721d8ef7 (patch)
treeebf60c529fff82d282cdfae21eefdb494657db48 /sys/arch/sparc/dev
parent92cde7509b5f6f9c1efa322f455ae26aa657c6c0 (diff)
grr... committed previous from the wrong tree... fixed version, which also
adds alaw:8 support.
Diffstat (limited to 'sys/arch/sparc/dev')
-rw-r--r--sys/arch/sparc/dev/amd7930.c16
1 files changed, 15 insertions, 1 deletions
diff --git a/sys/arch/sparc/dev/amd7930.c b/sys/arch/sparc/dev/amd7930.c
index 35fc74685db..58f55b14d42 100644
--- a/sys/arch/sparc/dev/amd7930.c
+++ b/sys/arch/sparc/dev/amd7930.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: amd7930.c,v 1.24 2003/06/28 18:12:31 jason Exp $ */
+/* $OpenBSD: amd7930.c,v 1.25 2003/06/28 18:22:14 jason Exp $ */
/* $NetBSD: amd7930.c,v 1.37 1998/03/30 14:23:40 pk Exp $ */
/*
@@ -395,13 +395,21 @@ amd7930_set_params(addr, setmode, usemode, p, r)
case AUDIO_ENCODING_ULAW:
break;
case AUDIO_ENCODING_SLINEAR:
+ case AUDIO_ENCODING_SLINEAR_BE:
+ case AUDIO_ENCODING_SLINEAR_LE:
p->sw_code = slinear8_to_mulaw;
r->sw_code = mulaw_to_slinear8;
break;
case AUDIO_ENCODING_ULINEAR:
+ case AUDIO_ENCODING_ULINEAR_BE:
+ case AUDIO_ENCODING_ULINEAR_LE:
p->sw_code = ulinear8_to_mulaw;
r->sw_code = mulaw_to_ulinear8;
break;
+ case AUDIO_ENCODING_ALAW:
+ p->sw_code = alaw_to_mulaw;
+ r->sw_code = mulaw_to_alaw;
+ break;
default:
return (EINVAL);
}
@@ -434,6 +442,12 @@ amd7930_query_encoding(addr, fp)
fp->precision = 8;
fp->flags = AUDIO_ENCODINGFLAG_EMULATED;
break;
+ case 3:
+ strlcpy(fp->name, AudioEalaw, sizeof fp->name);
+ fp->encoding = AUDIO_ENCODING_ALAW;
+ fp->precision = 8;
+ fp->flags = AUDIO_ENCODINGFLAG_EMULATED;
+ break;
default:
return (EINVAL);
/*NOTREACHED*/