Module Name:    src
Committed By:   martin
Date:           Mon Apr 16 14:16:53 UTC 2018

Modified Files:
        src/sys/dev/isa [netbsd-8]: sbdsp.c

Log Message:
Pull up following revision(s) (requested by nat in ticket #761):

        sys/dev/isa/sbdsp.c: revision 1.137

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.136.10.1 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.136.10.1
--- src/sys/dev/isa/sbdsp.c:1.136	Mon Jul 11 11:31:50 2016
+++ src/sys/dev/isa/sbdsp.c	Mon Apr 16 14:16:53 2018
@@ -1,4 +1,4 @@
-/*	$NetBSD: sbdsp.c,v 1.136 2016/07/11 11:31:50 msaitoh Exp $	*/
+/*	$NetBSD: sbdsp.c,v 1.136.10.1 2018/04/16 14:16:53 martin 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.136.10.1 2018/04/16 14:16:53 martin 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;

Reply via email to