Source-Changes-HG archive

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

[src/trunk]: src/sys/dev/audio Fix wrong parameter displayed in debug messages.



details:   https://anonhg.NetBSD.org/src/rev/40793fb6d345
branches:  trunk
changeset: 745390:40793fb6d345
user:      isaki <isaki%NetBSD.org@localhost>
date:      Sun Mar 01 07:40:03 2020 +0000

description:
Fix wrong parameter displayed in debug messages.

diffstat:

 sys/dev/audio/audio.c |  24 ++++++++++++++----------
 1 files changed, 14 insertions(+), 10 deletions(-)

diffs (52 lines):

diff -r 63308c73badf -r 40793fb6d345 sys/dev/audio/audio.c
--- a/sys/dev/audio/audio.c     Sun Mar 01 07:35:33 2020 +0000
+++ b/sys/dev/audio/audio.c     Sun Mar 01 07:40:03 2020 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: audio.c,v 1.59 2020/03/01 07:35:33 isaki Exp $ */
+/*     $NetBSD: audio.c,v 1.60 2020/03/01 07:40:03 isaki Exp $ */
 
 /*-
  * Copyright (c) 2008 The NetBSD Foundation, Inc.
@@ -142,7 +142,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: audio.c,v 1.59 2020/03/01 07:35:33 isaki Exp $");
+__KERNEL_RCSID(0, "$NetBSD: audio.c,v 1.60 2020/03/01 07:40:03 isaki Exp $");
 
 #ifdef _KERNEL_OPT
 #include "audio.h"
@@ -6777,10 +6777,12 @@
                    &sc->sc_pmixer->hwbuf.fmt);
                if (pchanges == -1) {
 #if defined(AUDIO_DEBUG)
-                       char fmtbuf[64];
-                       audio_format2_tostr(fmtbuf, sizeof(fmtbuf), &pfmt);
-                       TRACET(1, ptrack, "check play.params failed: %s",
-                           fmtbuf);
+                       TRACET(1, ptrack, "check play.params failed: "
+                           "%s %ubit %uch %uHz",
+                           audio_encoding_name(pi->encoding),
+                           pi->precision,
+                           pi->channels,
+                           pi->sample_rate);
 #endif
                        return EINVAL;
                }
@@ -6792,10 +6794,12 @@
                    &sc->sc_rmixer->hwbuf.fmt);
                if (rchanges == -1) {
 #if defined(AUDIO_DEBUG)
-                       char fmtbuf[64];
-                       audio_format2_tostr(fmtbuf, sizeof(fmtbuf), &rfmt);
-                       TRACET(1, rtrack, "check record.params failed: %s",
-                           fmtbuf);
+                       TRACET(1, rtrack, "check record.params failed: "
+                           "%s %ubit %uch %uHz",
+                           audio_encoding_name(ri->encoding),
+                           ri->precision,
+                           ri->channels,
+                           ri->sample_rate);
 #endif
                        return EINVAL;
                }



Home | Main Index | Thread Index | Old Index