Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/dev Make "options AUDIO_DEBUG=0" create a silent-by-defa...
details: https://anonhg.NetBSD.org/src/rev/87b2f6b4f68e
branches: trunk
changeset: 353302:87b2f6b4f68e
user: martin <martin%NetBSD.org@localhost>
date: Fri Apr 28 06:59:49 2017 +0000
description:
Make "options AUDIO_DEBUG=0" create a silent-by-default version of the
debug output, toggled at runtime by setting audiodebug to a higher value.
To get boot time debugging, use "options AUDIO_DEBUG=1".
diffstat:
sys/dev/audio.c | 38 +++++++++++++++++++++-----------------
1 files changed, 21 insertions(+), 17 deletions(-)
diffs (66 lines):
diff -r c59ad2b94097 -r 87b2f6b4f68e sys/dev/audio.c
--- a/sys/dev/audio.c Fri Apr 28 05:56:33 2017 +0000
+++ b/sys/dev/audio.c Fri Apr 28 06:59:49 2017 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: audio.c,v 1.328 2017/04/26 11:32:04 nat Exp $ */
+/* $NetBSD: audio.c,v 1.329 2017/04/28 06:59:49 martin Exp $ */
/*-
* Copyright (c) 2016 Nathanial Sloss <nathanialsloss%yahoo.com.au@localhost>
@@ -148,7 +148,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: audio.c,v 1.328 2017/04/26 11:32:04 nat Exp $");
+__KERNEL_RCSID(0, "$NetBSD: audio.c,v 1.329 2017/04/28 06:59:49 martin Exp $");
#include "audio.h"
#if NAUDIO > 0
@@ -1284,14 +1284,16 @@
}
#ifdef AUDIO_DEBUG
- printf("%s: HW-buffer=%p pustream=%p\n",
- __func__, &vc->sc_mpr.s, vc->sc_pustream);
- for (i = 0; i < pfilters->req_size; i++) {
- char num[100];
- snprintf(num, 100, "[%d]", i);
- audio_print_params(num, &vc->sc_pstreams[i].param);
- }
- audio_print_params("[HW]", &vc->sc_mpr.s.param);
+ if (audiodebug) {
+ printf("%s: HW-buffer=%p pustream=%p\n",
+ __func__, &vc->sc_mpr.s, vc->sc_pustream);
+ for (i = 0; i < pfilters->req_size; i++) {
+ char num[100];
+ snprintf(num, 100, "[%d]", i);
+ audio_print_params(num, &vc->sc_pstreams[i].param);
+ }
+ audio_print_params("[HW]", &vc->sc_mpr.s.param);
+ }
#endif /* AUDIO_DEBUG */
return 0;
@@ -1363,13 +1365,15 @@
HW_UNLOCK(vc);
#ifdef AUDIO_DEBUG
- printf("%s: HW-buffer=%p pustream=%p\n",
- __func__, &vc->sc_mrr.s, vc->sc_rustream);
- audio_print_params("[HW]", &vc->sc_mrr.s.param);
- for (i = 0; i < rfilters->req_size; i++) {
- char num[100];
- snprintf(num, 100, "[%d]", i);
- audio_print_params(num, &vc->sc_rstreams[i].param);
+ if (audiodebug) {
+ printf("%s: HW-buffer=%p pustream=%p\n",
+ __func__, &vc->sc_mrr.s, vc->sc_rustream);
+ audio_print_params("[HW]", &vc->sc_mrr.s.param);
+ for (i = 0; i < rfilters->req_size; i++) {
+ char num[100];
+ snprintf(num, 100, "[%d]", i);
+ audio_print_params(num, &vc->sc_rstreams[i].param);
+ }
}
#endif /* AUDIO_DEBUG */
Home |
Main Index |
Thread Index |
Old Index