Module Name: src Committed By: mlelstv Date: Mon Apr 17 20:33:45 UTC 2023
Modified Files: src/sys/dev/audio: audio.c Log Message: Input and output codecs produce and consume internal audio data, so don't byteswap it. To generate a diff of this commit: cvs rdiff -u -r1.136 -r1.137 src/sys/dev/audio/audio.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/audio/audio.c diff -u src/sys/dev/audio/audio.c:1.136 src/sys/dev/audio/audio.c:1.137 --- src/sys/dev/audio/audio.c:1.136 Thu Aug 25 11:16:33 2022 +++ src/sys/dev/audio/audio.c Mon Apr 17 20:33:45 2023 @@ -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++) {