NetBSD Problem Report #32569
From ggm@apnic.net Thu Jan 19 03:26:19 2006
Return-Path: <ggm@apnic.net>
Received: from apnic.net (cumin.apnic.net [202.12.29.59])
by narn.netbsd.org (Postfix) with ESMTP id 80AF463B84F
for <gnats-bugs@gnats.NetBSD.org>; Thu, 19 Jan 2006 03:26:18 +0000 (UTC)
Message-Id: <200601190325.k0J3PhvK004025@garlic.apnic.net>
Date: Thu, 19 Jan 2006 13:25:43 +1000 (EST)
From: ggm@apnic.net
Reply-To: ggm@apnic.net
To: gnats-bugs@netbsd.org
Subject: auich driver initializes to wrong ac97 rate at boot
X-Send-Pr-Version: 3.95
>Number: 32569
>Category: kern
>Synopsis: auich device initializes ac97 to wrong rate at boot
>Confidential: no
>Severity: non-critical
>Priority: low
>Responsible: kern-bug-people
>State: closed
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Thu Jan 19 03:30:00 +0000 2006
>Closed-Date: Sat Sep 23 01:28:42 +0000 2006
>Last-Modified: Thu Oct 13 13:05:01 +0000 2016
>Originator: George Michaelson
>Release: NetBSD 3.99.15
>Organization:
George Michaelson | APNIC
Email: ggm@apnic.net | PO Box 2131 Milton
Phone: +61 7 3858 3150 | QLD 4064 Australia
Fax: +61 7 3858 3199 | http://www.apnic.net
>Environment:
System: NetBSD garlic.apnic.net 3.99.15 NetBSD 3.99.15 (GGMSMALL) #1: Wed Jan 18 10:11:08 EST 2006 ggm@garlic.apnic.net:/data/Build/obj/usr/src/sys/arch/i386/compile/GGMSMALL i386
Architecture: i386
Machine: i386
>Description:
On boot, auich driver attach probes the ac97 rate via some code
imported from FreeBSD. its designed to set the rate to a normalized
value, typically 48000hz or 44100 hz or the like.
From time to time, on my IBM X31 laptop its being set to a very odd
rate. This appears to be irreversable at runtime, there being no
hook I can see which re-initializes the rate.
I believe all the exposed controls via audioctl are adjusting downstream
values which pass through the boot-set ac97 rate.
Here are two /var/log/messages logs of the auich initialization
at boot time. The first is the wrong calibration, the second is
a warm boot, which cleared it back to the right setting.
Jan 19 09:24:50 garlic /netbsd: auich0 at pci0 dev 31 function 5: i82801DB/DBM (ICH4/ICH4M) AC-97 Audio
Jan 19 09:24:50 garlic /netbsd: auich0: interrupting at irq 11
Jan 19 09:24:50 garlic /netbsd: auich0: ac97: Analog Devices AD1981B codec; headphone, 20 bit DAC, no 3D stereo
Jan 19 09:24:50 garlic /netbsd: auich0: ac97: ext id 601<AC97_22,AMAP,VRA>
Jan 19 09:24:50 garlic /netbsd: auich0: measured ac97 link rate at 76803 Hz, will use 77000 Hz
Jan 19 09:24:50 garlic /netbsd: audio0 at auich0: full duplex, mmap, independent
Jan 19 11:42:09 garlic /netbsd: auich0 at pci0 dev 31 function 5: i82801DB/DBM (ICH4/ICH4M) AC-97 Audio
Jan 19 11:42:09 garlic /netbsd: auich0: interrupting at irq 11
Jan 19 11:42:09 garlic /netbsd: auich0: ac97: Analog Devices AD1981B codec; headphone, 20 bit DAC, no 3D stereo
Jan 19 11:42:09 garlic /netbsd: auich0: ac97: ext id 601<AC97_22,AMAP,VRA>
Jan 19 11:42:09 garlic /netbsd: auich0: measured ac97 link rate at 48003 Hz, will use 48000 Hz
Jan 19 11:42:09 garlic /netbsd: audio0 at auich0: full duplex, mmap, independent
>How-To-Repeat:
I don't know if this is host specific. Its an older (2yo) IBM laptop
and it may represent fading of some part like a crystal sync for the
audio chip/synth.
the symptom is that audio output appears to be severely rate mangled
(typically sounding like its 3-4x slowed down)
>Fix:
I think the fix is going to require work on sys/dev/pci/auich.c
in the auich_calibrate() routine. It has the comment:
auich_calibrate() was from FreeBSD: ich.c,v 1.22 2002/06/27
22:36:01 scottl Exp
>Release-Note:
>Audit-Trail:
From: TAMURA Kent <kent@NetBSD.org>
To: gnats-bugs@netbsd.org
Cc:
Subject: Re: kern/32569: auich driver initializes to wrong ac97 rate at boot
Date: Fri, 20 Jan 2006 20:45:42 +0900 (JST)
I have no idea on how to fix auich_calibrate().
Anyway, you can avoid the problem by adding
"hw.auich0.ac97rate=48000" to /etc/sysctl.conf.
--
TAMURA Kent <kent_2006 at hauN.org> <kent at NetBSD.org>
From: George Michaelson <ggm@apnic.net>
To: gnats-bugs@netbsd.org
Cc: kent@netbsd.org, kern-bug-people@netbsd.org,
gnats-admin@netbsd.org, netbsd-bugs@netbsd.org
Subject: Re: kern/32569: auich driver initializes to wrong ac97 rate at boot
Date: Mon, 23 Jan 2006 10:12:10 +1000
If the auich manpages are updated to note the hw sysctl, I would be
content. I've added this entry in my sysctl.conf.
You can close the bug as far as I am concerned.
cheers, and thanks
-George
State-Changed-From-To: open->closed
State-Changed-By: jmcneill@netbsd.org
State-Changed-When: Sat, 23 Sep 2006 01:28:42 +0000
State-Changed-Why:
Submitter claims that the PR can be closed.
From: "Masatake Daimon" <pho@netbsd.org>
To: gnats-bugs@gnats.NetBSD.org
Cc:
Subject: PR/32569 CVS commit: src/share/man/man4
Date: Thu, 13 Oct 2016 13:04:02 +0000
Module Name: src
Committed By: pho
Date: Thu Oct 13 13:04:02 UTC 2016
Modified Files:
src/share/man/man4: auich.4
Log Message:
PR kern/32569: Describe the sysctl variable the driver provides
To generate a diff of this commit:
cvs rdiff -u -r1.23 -r1.24 src/share/man/man4/auich.4
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
>Unformatted:
(Contact us)
$NetBSD: query-full-pr,v 1.39 2013/11/01 18:47:49 spz Exp $
$NetBSD: gnats_config.sh,v 1.8 2006/05/07 09:23:38 tsutsui Exp $
Copyright © 1994-2014
The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.