Source-Changes-HG archive

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

[src/netbsd-8]: src/sys/dev Pull up following revision(s) (requested by nat i...



details:   https://anonhg.NetBSD.org/src/rev/bf3cb393199b
branches:  netbsd-8
changeset: 434045:bf3cb393199b
user:      snj <snj%NetBSD.org@localhost>
date:      Fri Jun 30 06:51:28 2017 +0000

description:
Pull up following revision(s) (requested by nat in ticket #74):
        sys/dev/mulaw.c: 1.31, 1.32
Rectify an error in mulaw/alaw conversion to big endian.  The atf audio
test should pass on sparc again.
--
Better solution to mulaw/alaw conversion on big endian systems/sound
devices.

diffstat:

 sys/dev/mulaw.c |  14 +++++++-------
 1 files changed, 7 insertions(+), 7 deletions(-)

diffs (58 lines):

diff -r 4ffa7a09a505 -r bf3cb393199b sys/dev/mulaw.c
--- a/sys/dev/mulaw.c   Fri Jun 30 06:43:07 2017 +0000
+++ b/sys/dev/mulaw.c   Fri Jun 30 06:51:28 2017 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: mulaw.c,v 1.28.42.1 2017/06/30 06:38:00 snj Exp $      */
+/*     $NetBSD: mulaw.c,v 1.28.42.2 2017/06/30 06:51:28 snj Exp $      */
 
 /*
  * Copyright (c) 1991-1993 Regents of the University of California.
@@ -35,7 +35,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: mulaw.c,v 1.28.42.1 2017/06/30 06:38:00 snj Exp $");
+__KERNEL_RCSID(0, "$NetBSD: mulaw.c,v 1.28.42.2 2017/06/30 06:51:28 snj Exp $");
 
 #include <sys/types.h>
 #include <sys/systm.h>
@@ -321,7 +321,7 @@
                break;                                                  \
        case AUDIO_ENCODING_ULINEAR_BE:                                 \
                FILTER_LOOP_PROLOGUE(this->src, 1, dst, hw, m) {        \
-                       j = hw - 2;                                     \
+                       j = 2;                                          \
                        d[0] = mulawtolin16[s[0]][0];                   \
                        d[1] = mulawtolin16[s[0]][1];                   \
                        while (j < hw)                                  \
@@ -339,7 +339,7 @@
                break;                                                  \
        case AUDIO_ENCODING_SLINEAR_BE:                                 \
                FILTER_LOOP_PROLOGUE(this->src, 1, dst, hw, m) {        \
-                       j = hw - 2;                                     \
+                       j = 2;                                          \
                        d[0] = mulawtolin16[s[0]][0] ^ 0x80;            \
                        d[1] = mulawtolin16[s[0]][1];                   \
                        while (j < hw)                                  \
@@ -456,7 +456,7 @@
                break;                                                  \
        case AUDIO_ENCODING_ULINEAR_BE:                                 \
                FILTER_LOOP_PROLOGUE(this->src, 1, dst, hw, m) {        \
-                       j = hw - 2;                                     \
+                       j = 2;                                          \
                        d[0] = alawtolin16[s[0]][0];                    \
                        d[1] = alawtolin16[s[0]][1];                    \
                        while (j < hw)                                  \
@@ -474,10 +474,10 @@
                break;                                                  \
        case AUDIO_ENCODING_SLINEAR_BE:                                 \
                FILTER_LOOP_PROLOGUE(this->src, 1, dst, hw, m) {        \
-                       j = hw - 2;                                     \
+                       j = 2;                                          \
                        d[0] = alawtolin16[s[0]][0] ^ 0x80;             \
                        d[1] = alawtolin16[s[0]][1];                    \
-                       while (j < hw)                                  \
+                       while (j < hw)                                  \
                                d[j++] = 0;                             \
                } FILTER_LOOP_EPILOGUE(this->src, dst);                 \
                break;                                                  \



Home | Main Index | Thread Index | Old Index