Module Name: src Committed By: nat Date: Sat Nov 4 01:46:56 UTC 2017
Modified Files: src/sys/dev/isa: sbdsp.c Log Message: Add AUDIO_ENCODING_SLINEAR to supported encodings. This allows sb, sbpro & sb16 to configure with 8-bit precision. Tested in games/mame with a 486DX emulation. To generate a diff of this commit: cvs rdiff -u -r1.136 -r1.137 src/sys/dev/isa/sbdsp.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
Modified files: Index: src/sys/dev/isa/sbdsp.c diff -u src/sys/dev/isa/sbdsp.c:1.136 src/sys/dev/isa/sbdsp.c:1.137 --- src/sys/dev/isa/sbdsp.c:1.136 Mon Jul 11 11:31:50 2016 +++ src/sys/dev/isa/sbdsp.c Sat Nov 4 01:46:56 2017 @@ -1,4 +1,4 @@ -/* $NetBSD: sbdsp.c,v 1.136 2016/07/11 11:31:50 msaitoh Exp $ */ +/* $NetBSD: sbdsp.c,v 1.137 2017/11/04 01:46:56 nat Exp $ */ /*- * Copyright (c) 1999, 2008 The NetBSD Foundation, Inc. @@ -74,7 +74,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: sbdsp.c,v 1.136 2016/07/11 11:31:50 msaitoh Exp $"); +__KERNEL_RCSID(0, "$NetBSD: sbdsp.c,v 1.137 2017/11/04 01:46:56 nat Exp $"); #include "midi.h" #include "mpu.h" @@ -640,6 +640,7 @@ sbdsp_set_params( swcode = swap_bytes; } /* fall into */ + case AUDIO_ENCODING_SLINEAR: case AUDIO_ENCODING_SLINEAR_LE: bmode = SB_BMODE_SIGNED; break; @@ -682,6 +683,7 @@ sbdsp_set_params( bmode |= SB_BMODE_STEREO; } else if (m->model == SB_JAZZ && m->precision == 16) { switch (p->encoding) { + case AUDIO_ENCODING_SLINEAR: case AUDIO_ENCODING_SLINEAR_LE: break; case AUDIO_ENCODING_ULINEAR_LE: @@ -716,6 +718,7 @@ sbdsp_set_params( switch (p->encoding) { case AUDIO_ENCODING_SLINEAR_BE: case AUDIO_ENCODING_SLINEAR_LE: + case AUDIO_ENCODING_SLINEAR: hw.encoding = AUDIO_ENCODING_ULINEAR_LE; swcode = change_sign8; break;