Hi,

The following diff makes auich.c not print ac97 link rate messages unless
AUICH_DEBUG is enabled.  This is to prevent kernel from yelling at me
during boot when aucat is started:

...
preserving editor files.
starting network daemons: sshd sendmail inetd.
starting local daemons: aucatauich0: measured ac97 link rate at 47995 Hz, will 
use 48000 Hz
 dbus mpd.
standard daemons: apmd hotplugd cron.
Thu Mar 11 11:43:36 CET 2010

OpenBSD/i386 (x41.dacolab.dom) (ttyC0)

...

It's based on what NetBSD has already done:
http://cvsweb.netbsd.org/bsdweb.cgi/src/sys/dev/pci/auich.c.diff?r1=1.135&r2=1.136&only_with_tag=MAIN

suggestions and comments are welcome

cheers,
david


Index: auich.c
===================================================================
RCS file: /cvs/src/sys/dev/pci/auich.c,v
retrieving revision 1.80
diff -N -u -p auich.c
--- auich.c     14 Jan 2010 18:15:27 -0000      1.80
+++ auich.c     11 Mar 2010 10:37:47 -0000
@@ -1857,11 +1857,11 @@ auich_calibrate(struct auich_softc *sc)
        else
                ac97rate = actual_48k_rate;
 
-       printf("%s: measured ac97 link rate at %d Hz",
-              sc->sc_dev.dv_xname, actual_48k_rate);
+       DPRINTF(AUICH_DEBUG_CODECIO, ("%s: measured ac97 link rate at %d Hz",
+              sc->sc_dev.dv_xname, actual_48k_rate));
        if (ac97rate != actual_48k_rate)
-               printf(", will use %d Hz", ac97rate);
-       printf("\n");
+               DPRINTF(AUICH_DEBUG_CODECIO, (", will use %d Hz", ac97rate));
+       DPRINTF(AUICH_DEBUG_CODECIO, ("\n"));
 
        return (ac97rate);
 }

Reply via email to