Source-Changes-HG archive

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

[src/trunk]: src/sys/dev/audio Input and output codecs produce and consume in...



details:   https://anonhg.NetBSD.org/src/rev/250d27fdcc36
branches:  trunk
changeset: 374303:250d27fdcc36
user:      mlelstv <mlelstv%NetBSD.org@localhost>
date:      Mon Apr 17 20:33:45 2023 +0000

description:
Input and output codecs produce and consume internal audio data, so
don't byteswap it.

diffstat:

 sys/dev/audio/audio.c |  8 ++++----
 1 files changed, 4 insertions(+), 4 deletions(-)

diffs (36 lines):

diff -r c2dc9f2ca35d -r 250d27fdcc36 sys/dev/audio/audio.c
--- a/sys/dev/audio/audio.c     Mon Apr 17 20:33:12 2023 +0000
+++ b/sys/dev/audio/audio.c     Mon Apr 17 20:33:45 2023 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: audio.c,v 1.136 2022/08/25 11:16:33 riastradh Exp $    */
+/*     $NetBSD: audio.c,v 1.137 2023/04/17 20:33:45 mlelstv Exp $      */
 
 /*-
  * Copyright (c) 2008 The NetBSD Foundation, Inc.
@@ -181,7 +181,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: audio.c,v 1.136 2022/08/25 11:16:33 riastradh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: audio.c,v 1.137 2023/04/17 20:33:45 mlelstv Exp $");
 
 #ifdef _KERNEL_OPT
 #include "audio.h"
@@ -5628,7 +5628,7 @@ audio_pmixer_process(struct audio_softc 
        }
 
        m = mixer->mixsample;
-       if (mixer->swap_endian) {
+       if (!mixer->codec && mixer->swap_endian) {
                for (i = 0; i < sample_count; i++) {
                        *h++ = bswap16(*m++);
                }
@@ -6031,7 +6031,7 @@ audio_rmixer_process(struct audio_softc 
                mixersrc = &mixer->hwbuf;
        }
 
-       if (mixer->swap_endian) {
+       if (!mixer->codec && mixer->swap_endian) {
                /* inplace conversion */
                p = auring_headptr_aint(mixersrc);
                for (i = 0; i < count * mixer->track_fmt.channels; i++, p++) {



Home | Main Index | Thread Index | Old Index