Solved mp3 sound too fast

On RELEASE-11.2-i386 all mp3-players (also console mpg123) give a too fast played sound. Searching the Internet gave no hints. In 30 seconds players show played 40 seconds.

Code:
# dmesg | grep pcm
pcm0: <Intel ICH6 (82801FB)> port 0x1c00-0x1cff,0x18c0-0x18ff mem 0xa0040800-0xa00409ff,0xa0040400-0xa00404ff irq 22 at device 30.2 on pci0
pcm0: <Analog Devices AD1981B AC97 Codec>
pcm0: measured ac97 link rate at 33340 Hz

Code:
# sysctl dev.pcm
dev.pcm.0.bitperfect: 0
dev.pcm.0.buffersize: 16384
dev.pcm.0.ac97rate: 33340
dev.pcm.0.rec.vchanformat: s16le:2.0
dev.pcm.0.rec.vchanrate: 2479
dev.pcm.0.rec.vchanmode: fixed
dev.pcm.0.rec.vchans: 1
dev.pcm.0.play.vchanformat: s16le:2.0
dev.pcm.0.play.vchanrate: 2479
dev.pcm.0.play.vchanmode: fixed
dev.pcm.0.play.vchans: 1
dev.pcm.0.eapd: 1
dev.pcm.0.%parent: pci0
dev.pcm.0.%pnpinfo: vendor=0x8086 device=0x266e subvendor=0x1014 subdevice=0x0581 class=0x040100
dev.pcm.0.%location: slot=30 function=2 dbsf=pci0:0:30:2 handle=\_SB_.PCI0.AC9A
dev.pcm.0.%driver: pcm
dev.pcm.0.%desc: Intel ICH6 (82801FB)
dev.pcm.%parent:
I'm stuck and need some help.
 
dev.pcm.0.ac97rate: 33340
dev.pcm.0.rec.vchanrate: 2479

Something is wrong with your sample rate. Look at the ac97rate and vchanrate, they should be 44100 (Hz) or 48000 by default.

I had a similar problem, but it's some time ago. It was a driver issue with a very new usb sound device.
Your's should be well supported.


First thing you should do, look in /etc/sysctl.conf, just to make sure you don't have any old audio setting lurking around there.
If that's ok, try what I did when I had that problem. If I recall correctly, I fixed it by preventing sound(4) from processing unsupported sample rates by setting:
# sysctl hw.snd.feeder_eq_exact_rate=1

I possibly changed other values as well, but I sadly can't remember. My audio card started working without tweaking from 10.3-RELEASE or so.


If that doesn't help, take a look at sound(4). Play with the sysctl stuff in there and see if you can get the sample rate straight.
Your problem is, that's for sure, the samplerate is wrong/unsuppprted.
I hope have at least given you a hint in the right direction :)
 
Back
Top