Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/dev/audio We cannot handle input with precision != strid...
details: https://anonhg.NetBSD.org/src/rev/8c31e7d798f9
branches: trunk
changeset: 376239:8c31e7d798f9
user: mlelstv <mlelstv%NetBSD.org@localhost>
date: Mon Jun 05 16:26:05 2023 +0000
description:
We cannot handle input with precision != stride yet.
Drain input buffer for unhandled input.
diffstat:
sys/dev/audio/audio.c | 9 ++++++---
1 files changed, 6 insertions(+), 3 deletions(-)
diffs (37 lines):
diff -r 2de8ed5032b1 -r 8c31e7d798f9 sys/dev/audio/audio.c
--- a/sys/dev/audio/audio.c Mon Jun 05 15:02:54 2023 +0000
+++ b/sys/dev/audio/audio.c Mon Jun 05 16:26:05 2023 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: audio.c,v 1.143 2023/04/23 08:53:08 mlelstv Exp $ */
+/* $NetBSD: audio.c,v 1.144 2023/06/05 16:26:05 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.143 2023/04/23 08:53:08 mlelstv Exp $");
+__KERNEL_RCSID(0, "$NetBSD: audio.c,v 1.144 2023/06/05 16:26:05 mlelstv Exp $");
#ifdef _KERNEL_OPT
#include "audio.h"
@@ -6095,7 +6095,8 @@ audio_rmixer_process(struct audio_softc
codecarg.srcfmt = &mixer->hwbuf.fmt;
codecarg.dstfmt = &mixer->mixfmt;
codec = NULL;
- if (audio_format2_is_linear(codecarg.srcfmt)) {
+ if (audio_format2_is_linear(codecarg.srcfmt) &&
+ codecarg.srcfmt->stride == codecarg.srcfmt->precision) {
switch (codecarg.srcfmt->stride) {
case 8:
codec = audio_linear8_to_internal;
@@ -6115,6 +6116,8 @@ audio_rmixer_process(struct audio_softc
}
if (codec == NULL) {
TRACE(4, "unsupported hw format");
+ /* drain hwbuf */
+ auring_take(&mixer->hwbuf, count);
return;
}
Home |
Main Index |
Thread Index |
Old Index