Source-Changes-HG archive

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

[src/trunk]: src/sys/dev/audio Improve an error message about round_blocksize.



details:   https://anonhg.NetBSD.org/src/rev/c35377b00ac2
branches:  trunk
changeset: 969774:c35377b00ac2
user:      isaki <isaki%NetBSD.org@localhost>
date:      Sun Mar 01 07:42:07 2020 +0000

description:
Improve an error message about round_blocksize.

diffstat:

 sys/dev/audio/audio.c |  13 +++++++++----
 1 files changed, 9 insertions(+), 4 deletions(-)

diffs (34 lines):

diff -r 972e9d164940 -r c35377b00ac2 sys/dev/audio/audio.c
--- a/sys/dev/audio/audio.c     Sun Mar 01 07:40:03 2020 +0000
+++ b/sys/dev/audio/audio.c     Sun Mar 01 07:42:07 2020 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: audio.c,v 1.60 2020/03/01 07:40:03 isaki Exp $ */
+/*     $NetBSD: audio.c,v 1.61 2020/03/01 07:42:07 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.60 2020/03/01 07:40:03 isaki Exp $");
+__KERNEL_RCSID(0, "$NetBSD: audio.c,v 1.61 2020/03/01 07:42:07 isaki Exp $");
 
 #ifdef _KERNEL_OPT
 #include "audio.h"
@@ -4777,8 +4777,13 @@
                        if ((rounded * NBBY) % (mixer->hwbuf.fmt.stride *
                            mixer->hwbuf.fmt.channels) != 0) {
                                device_printf(sc->sc_dev,
-                                   "blksize not configured %d -> %d\n",
-                                   blksize, rounded);
+                                   "round_blocksize must return blocksize "
+                                   "divisible by framesize: "
+                                   "blksize=%d rounded=%d "
+                                   "stride=%ubit channels=%u\n",
+                                   blksize, rounded,
+                                   mixer->hwbuf.fmt.stride,
+                                   mixer->hwbuf.fmt.channels);
                                return EINVAL;
                        }
                        /* Recalculation */



Home | Main Index | Thread Index | Old Index