On Thu, Mar 11, 2010 at 12:11:42PM +0100, David Coppa wrote:
> 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);
>  }

heh.  I was thinking of this recently as well.  definitely debug-only
material.  perhaps not necessary at all unless actual_48k_rate is very
different from ac97rate.

-- 
[email protected]
SDF Public Access UNIX System - http://sdf.lonestar.org

Reply via email to