summaryrefslogtreecommitdiff
path: root/sys/dev/usb/uaudio.c
diff options
context:
space:
mode:
authorJacob Meuser <jakemsr@cvs.openbsd.org>2007-11-05 00:17:29 +0000
committerJacob Meuser <jakemsr@cvs.openbsd.org>2007-11-05 00:17:29 +0000
commit807508d2835434424b1a9b4ff449247de67abb5e (patch)
tree82e12f7944552ddbee8fd3747e0acaad0779e686 /sys/dev/usb/uaudio.c
parente9b7a83f6578c78422460eb291021722dc97c534 (diff)
audio encoding conversion cleanup
- the endianness of the conversions don't depend on the endianness of machine the conversions are built on, but the endianness of the audio data itself. choose encoding conversions explicitly, instead of relying on #defines based on the endianness of the machine. - replace home-grown conversions with comparable conversions in auconv.c and mulaw.c - use the proper conversion for ulinear_be:16 -> slinear_le:16 in auixp(4) thanks ajacoutot@ and sthen@ for !x86 testing
Diffstat (limited to 'sys/dev/usb/uaudio.c')
-rw-r--r--sys/dev/usb/uaudio.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/sys/dev/usb/uaudio.c b/sys/dev/usb/uaudio.c
index d69fcd12780..1f4aa281f7d 100644
--- a/sys/dev/usb/uaudio.c
+++ b/sys/dev/usb/uaudio.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: uaudio.c,v 1.54 2007/10/11 18:33:14 deraadt Exp $ */
+/* $OpenBSD: uaudio.c,v 1.55 2007/11/05 00:17:28 jakemsr Exp $ */
/* $NetBSD: uaudio.c,v 1.90 2004/10/29 17:12:53 kent Exp $ */
/*
@@ -3088,11 +3088,11 @@ uaudio_set_params(void *addr, int setmode, int usemode,
case AUDIO_ENCODING_ULINEAR_LE:
if (pre == 16) {
if (enc == AUDIO_ENCODING_ULINEAR_LE)
- swcode = change_sign16;
+ swcode = change_sign16_le;
else if (mode == AUMODE_PLAY)
- swcode = swap_bytes_change_sign16;
+ swcode = swap_bytes_change_sign16_le;
else
- swcode = change_sign16_swap_bytes;
+ swcode = change_sign16_swap_bytes_le;
enc = AUDIO_ENCODING_SLINEAR_LE;
} else if (pre == 8) {
if (flags & HAS_8U) {