summaryrefslogtreecommitdiff
path: root/sys/dev
diff options
context:
space:
mode:
authorisaki <isaki@NetBSD.org>2020-03-01 07:40:03 +0000
committerisaki <isaki@NetBSD.org>2020-03-01 07:40:03 +0000
commit277236f8fbcd1077d00fecbac410e858c1b35e17 (patch)
tree15d498a48f3e0d51485d6ed4a411bd8d41ad6d38 /sys/dev
parent63b58781e1386e64a582b1cb0da0ae5a1bfcbef6 (diff)
Fix wrong parameter displayed in debug messages.
Diffstat (limited to 'sys/dev')
-rw-r--r--sys/dev/audio/audio.c24
1 files changed, 14 insertions, 10 deletions
diff --git a/sys/dev/audio/audio.c b/sys/dev/audio/audio.c
index d5835b8086c..b0fdf0ec36a 100644
--- a/sys/dev/audio/audio.c
+++ b/sys/dev/audio/audio.c
@@ -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 @@ audio_file_setinfo(struct audio_softc *sc, audio_file_t *file,
&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 @@ audio_file_setinfo(struct audio_softc *sc, audio_file_t *file,
&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;
}