summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJacob Meuser <jakemsr@cvs.openbsd.org>2007-07-10 22:04:29 +0000
committerJacob Meuser <jakemsr@cvs.openbsd.org>2007-07-10 22:04:29 +0000
commit8611f2c2af74d5ffac0d6a2902dbfcf9715010a7 (patch)
tree80b389a6434f7c0aee0178cf6315b67d6a7b6d07
parent89d4a80dce79bd2b73100f59dc9ca5bbb78e7a4a (diff)
emu(4) incorrectly overrides the requested recoding format, setting
it to 16-bit slinear_le. this appears to be the result of a mistake in porting the driver from NetBSD. when this driver was ported, NetBSD had some members in it's 'audio_params' structure that OpenBSD doesn't have. in particular, NetBSD had 'hw_encoding' and 'hw_precision', which store what the hardware is presenting. the 'encoding' and 'precision' members store what the audio layer is presenting (both in NetBSD and OpenBSD) and can be different than what the hardware is presenting. the original NetBSD code was setting 'hw_encoding' and 'hw_precision', and in porting was changed to 'encoding' and 'precision'. with this change the hardware is still presenting 16-bit slinear_le; having the variable 'b16' set to '1' is enough to ensure this. however now the audio layer will convert it to the requested format, instead of always outputting 16-bit slinear_le.
-rw-r--r--sys/dev/pci/emuxki.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/sys/dev/pci/emuxki.c b/sys/dev/pci/emuxki.c
index 28c4e0127af..89768389f9a 100644
--- a/sys/dev/pci/emuxki.c
+++ b/sys/dev/pci/emuxki.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: emuxki.c,v 1.23 2006/01/20 09:50:31 jakemsr Exp $ */
+/* $OpenBSD: emuxki.c,v 1.24 2007/07/10 22:04:28 jakemsr Exp $ */
/* $NetBSD: emuxki.c,v 1.1 2001/10/17 18:39:41 jdolecek Exp $ */
/*-
@@ -2130,8 +2130,6 @@ emuxki_set_vparms(struct emuxki_voice *voice, struct audio_params *p)
if (mode == AUMODE_PLAY)
b16 = (p->precision == 16);
else {
- p->encoding = AUDIO_ENCODING_SLINEAR_LE;
- p->precision = 16;
b16 = 1;
if (p->precision == 8)
p->factor *= 2;