Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/dev Use more specific error messages if the setting of c...
details: https://anonhg.NetBSD.org/src/rev/ce3195b2f1df
branches: trunk
changeset: 350796:ce3195b2f1df
user: nat <nat%NetBSD.org@localhost>
date: Sat Jan 21 23:37:17 2017 +0000
description:
Use more specific error messages if the setting of channel parameters
fails. Use aprint_error_dev for this.
As suggested by pgoyette@
diffstat:
sys/dev/audio.c | 22 +++++++++++-----------
1 files changed, 11 insertions(+), 11 deletions(-)
diffs (71 lines):
diff -r fee7ebad7be9 -r ce3195b2f1df sys/dev/audio.c
--- a/sys/dev/audio.c Sat Jan 21 23:03:36 2017 +0000
+++ b/sys/dev/audio.c Sat Jan 21 23:37:17 2017 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: audio.c,v 1.293 2017/01/21 22:54:11 nat Exp $ */
+/* $NetBSD: audio.c,v 1.294 2017/01/21 23:37:17 nat 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.293 2017/01/21 22:54:11 nat Exp $");
+__KERNEL_RCSID(0, "$NetBSD: audio.c,v 1.294 2017/01/21 23:37:17 nat Exp $");
#include "audio.h"
#if NAUDIO > 0
@@ -5780,8 +5780,8 @@
error = audio_set_vchan_defaults(sc, AUMODE_PLAY | AUMODE_PLAY_ALL
| AUMODE_RECORD, &sc->sc_format[0], 0);
if (error)
- aprint_error("Invalid channel format, please check hardware "
- "capabilities\n");
+ aprint_error_dev(sc->sc_dev, "Error setting frequency, "
+ "please check hardware capabilities\n");
mutex_exit(sc->sc_lock);
return error;
@@ -5832,8 +5832,8 @@
error = audio_set_vchan_defaults(sc, AUMODE_PLAY | AUMODE_PLAY_ALL
| AUMODE_RECORD, &sc->sc_format[0], 0);
if (error)
- aprint_error("Invalid channel format, please check hardware "
- "capabilities\n");
+ aprint_error_dev(sc->sc_dev, "Error setting precision, "
+ "please check hardware capabilities\n");
mutex_exit(sc->sc_lock);
return error;
@@ -5873,8 +5873,8 @@
error = audio_set_vchan_defaults(sc, AUMODE_PLAY | AUMODE_PLAY_ALL
| AUMODE_RECORD, &sc->sc_format[0], 0);
if (error)
- aprint_error("Invalid channel format, please check hardware "
- "capabilities\n");
+ aprint_error_dev(sc->sc_dev, "Error setting channels, "
+ "please check hardware capabilities\n");
mutex_exit(sc->sc_lock);
return error;
@@ -5910,8 +5910,8 @@
error = EINVAL;
if (error == 0) {
- aprint_normal("Virtual format "
- "configured - "
+ aprint_normal_dev(sc->sc_dev,
+ "Virtual format configured - "
"Format SLINEAR, precision %d, "
"channels %d, frequency %d\n",
sc->sc_precision, sc->sc_channels,
@@ -5924,7 +5924,7 @@
}
}
- aprint_error("Virtual format auto config failed!\n"
+ aprint_error_dev(sc->sc_dev, "Virtual format auto config failed!\n"
"Please check hardware capabilities\n");
mutex_exit(sc->sc_lock);
Home |
Main Index |
Thread Index |
Old Index