Bug 1195 - Sound doesn't play at correct speed
Summary: Sound doesn't play at correct speed
Status: RESOLVED CODE_FIX
Alias: None
Product: Drivers
Classification: Unclassified
Component: Sound(ALSA) (show other bugs)
Hardware: i386 Linux
: P2 normal
Assignee: Bugme Janitors Team
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2003-09-07 17:20 UTC by Michael Pyne
Modified: 2004-03-28 08:37 UTC (History)
0 users

See Also:
Kernel Version: 2.6.0-test4
Subsystem:
Regression: ---
Bisected commit-id:


Attachments

Description Michael Pyne 2003-09-07 17:20:49 UTC
Distribution: Gentoo Linux, up-to-date.  Kernel was self-compiled, not "emerged"
Hardware Environment: Intel Pentium IV, Sound is an Analog Devices chip, which
uses the intel8x0 driver in Linux, and is built-in to the motherboard (Compaq
Presario 5000-series).  ACPI is enabled.

Software Environment: GCC version 3.2.3 (w/ Propolice patches and POSIX
threading).  XFree86 4.3.0.  module-init-tools 0.9.12 (but ALSA is compiled into
the kernel, not as a module.)

Problem Description: When playing a sound stream, either through OSS emulation
or native ALSA, the sound plays either too fast or too slow.  It changes
randomly every reboot, but will always play at the same (wrong) rate as long as
the power is on.  Applications that stream directly to the soundcard, like
mpg123, aplay, and noatun are affected.  mplayer doesn't seem to be affected,
but I believe it manages the rate of sound being played.

I've just checked, and this problem doesn't occur in 2.4.21.  It probably
doesn't occur in 2.4.22 either, but I'm not that recent on the stable release. :)

This problem didn't occur with 2.6.0-test3.

Steps to reproduce: Playing an MP3 file is the easiest way, using mpg123 or aRts.
Comment 1 Michael Pyne 2003-09-07 20:21:46 UTC
Rebooting the kernel with ACPI support disabled didn't help.
Comment 2 Michael Pyne 2003-09-12 21:06:08 UTC
This is not fixed in -test5.  I've tried reinstalling alsa-lib as well, with no
luck. :(
Comment 3 Diego Calleja 2003-11-22 16:58:04 UTC
I wonder if this is due to the HZ 100->1000 change
Comment 4 Michael Pyne 2003-11-23 17:24:48 UTC
Well, I don't think the problem is the HZ setting.  This manifests itself in 
kernel 2.4.x as well. 
 
I've figured out a workaround:  It seems to be related to the Digital Audio 
Mode and Digital Mono Mode select settings in the mixer.  For some reason, 
Digital Audio Mode got saved as turned on, and turning that on causes the 
problem.  I went through all of my mixer programs and disabled Digital Audio, 
and reloaded snd-intel8x0, and the problem went away.  I'm sorry I forgot to 
update on this bug :( 
 
I did take a look at the code, but I couldn't figure out the problem.  If any 
of the ALSA guys would like me to test a patch, I'd be all for it. :) 
Comment 5 Jaroslav Kysela 2004-03-28 08:37:18 UTC
We removed 'Digital Audio Mode' switch from the recent code, because it was
causing problems like this one. Please, try the recent kernel (2.6.5rc).

Note You need to log in before you can comment on or make changes to this bug.