Re: AC97 sound problems with current

From: Orion Hodson <orion_at_freebsd.org>
Date: Wed, 26 Mar 2003 17:28:54 -0800
Kevin Oberman writes:
|
| After upgrading my laptop from STABLE to CURRENT on 3/14 I have been
| having problems with GnomeMeeting. Often the sound is badly broken with
| 'spurts' of sound with silent gaps in between. This was never the case
| with STABLE. Other times it's fine.
|
| When I looked at my dmesg output I noticed some changes between STABLE
| and CURRENT for the pcm0 device. Under STABLE I only got two messages:
| pcm0: <Intel 82801CA (ICH3)> port 0x18c0-0x18ff,0x1c00-0x1cff irq 11 at 
device 31.5 on pci0
| pcm0: <Analog Devices AD1881A ac97 codec>
| Under CURRENT I get a third:
|
| pcm0: measured ac97 link rate at 512000000 Hz

There is a calibration step in the driver to determine the clock rate of the 
AC97 link.  What you are seeing is the calibration step failing and setting a 
bogus ac97 link rate.  I took a cursory look a couple of weeks back and it 
smelt like the timecounter initialization point changed, but haven't gotten 
around to looking closer and fixing the driver.  It's on the todo list... I've 
also been wondering if it's possible to ditch the calibration entirely, but 
this is an involved AC97 question and I don't have easy access to the relevant 
h/w and it's a different q.

Anyway, whilst it remains broken you can set the ac97 clock rate by hand.  The 
sysctl variable hw.snd.pcmX.ac97rate exists specifically for times when the 
calibration test fails (X = 0 if no other cards installed).  Depending on 
which clock source is being used by the codec you'll want to set the variable 
to 48000 or around 55913.  YMMV, but kldloading the driver rather than having 
it compiled into the kernel will probably result in the correct calibration.

- Orion
Received on Wed Mar 26 2003 - 16:28:57 UTC

This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:37:01 UTC