Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/dev/isa Add AUDIO_ENCODING_SLINEAR to supported encoding...



details:   https://anonhg.NetBSD.org/src/rev/3e781d640ca3
branches:  trunk
changeset: 827571:3e781d640ca3
user:      nat <nat%NetBSD.org@localhost>
date:      Sat Nov 04 01:46:56 2017 +0000

description:
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.

diffstat:

 sys/dev/isa/sbdsp.c |  7 +++++--
 1 files changed, 5 insertions(+), 2 deletions(-)

diffs (42 lines):

diff -r 498e727fe19a -r 3e781d640ca3 sys/dev/isa/sbdsp.c
--- a/sys/dev/isa/sbdsp.c       Fri Nov 03 22:45:14 2017 +0000
+++ b/sys/dev/isa/sbdsp.c       Sat Nov 04 01:46:56 2017 +0000
@@ -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 @@
                                        swcode = swap_bytes;
                                }
                                /* fall into */
+                       case AUDIO_ENCODING_SLINEAR:
                        case AUDIO_ENCODING_SLINEAR_LE:
                                bmode = SB_BMODE_SIGNED;
                                break;
@@ -682,6 +683,7 @@
                                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 @@
                        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;



Home | Main Index | Thread Index | Old Index