Module Name: src Committed By: isaki Date: Sun Mar 1 07:40:04 UTC 2020
Modified Files: src/sys/dev/audio: audio.c Log Message: Fix wrong parameter displayed in debug messages. To generate a diff of this commit: cvs rdiff -u -r1.59 -r1.60 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.59 src/sys/dev/audio/audio.c:1.60 --- src/sys/dev/audio/audio.c:1.59 Sun Mar 1 07:35:33 2020 +++ src/sys/dev/audio/audio.c Sun Mar 1 07:40:03 2020 @@ -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 *s &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 *s &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; }