Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 131699 - alsa-lib-1.0.11 (dmix) causes skipping sound for some apps but not others
Summary: alsa-lib-1.0.11 (dmix) causes skipping sound for some apps but not others
Status: RESOLVED UPSTREAM
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: New packages (show other bugs)
Hardware: All Linux
: High major (vote)
Assignee: Gentoo Sound Team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-04-29 11:12 UTC by witr
Modified: 2006-05-06 06:41 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description witr 2006-04-29 11:12:38 UTC
As reported in http://forums.gentoo.org/viewtopic-t-457951.html alsa-driver-1.0.11 causes skipping sound in some applications but not others.

Sound skips in rhytymbox and totem, but not xmms, realplayer, or mplayer.

Rebuilding all gstreamer and alsa and sound applications does not change symptoms.

I can't revert to earlier versions of ALSA because of compliation errors in 1.0.10.

# emerge --info
Portage 2203-svn (default-linux/x86/2005.0, gcc-3.4.5, glibc-2.3.6-r3, 2.6.16-gentoo-r3 i686)
=================================================================
System uname: 2.6.16-gentoo-r3 i686 AMD Athlon(tm) XP 2800+
Gentoo Base System version 1.6.14
dev-lang/python:     2.4.2
sys-apps/sandbox:    1.2.12
sys-devel/autoconf:  2.13, 2.59-r7
sys-devel/automake:  1.4_p6, 1.5, 1.6.3, 1.7.9-r1, 1.8.5-r3, 1.9.6-r1
sys-devel/binutils:  2.16.1
sys-devel/libtool:   1.5.22
virtual/os-headers:  2.6.11-r2
ACCEPT_KEYWORDS="x86"
AUTOCLEAN="yes"
CBUILD="i686-pc-linux-gnu"
CFLAGS="-O2 -march=athlon-xp -mfpmath=sse -finline-functions -fomit-frame-pointer -pipe"
CHOST="i686-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/kde/2/share/config /usr/kde/3/share/config /usr/lib/X11/xkb /usr/lib/mozilla/defaults/pref /usr/share/config /var/qmail/control"
CONFIG_PROTECT_MASK="/etc/eselect/compiler /etc/gconf /etc/init.d /etc/terminfo /etc/env.d"
CXXFLAGS="-O2 -march=athlon-xp -mfpmath=sse -finline-functions -fomit-frame-pointer -pipe"
DISTDIR="/usr/portage/distfiles"
FEATURES="autoconfig distlocks sandbox sfperms strict"
GENTOO_MIRRORS="ftp://ftp.ussg.iu.edu/pub/linux/gentoo ftp://gentoo.mirrors.pair.com/"
PKGDIR="/usr/portage/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY="/usr/local/portage"
SYNC="rsync://rsync.namerica.gentoo.org/gentoo-portage"
USE="x86 3dnow 3dnowext S3TC X X509 Xaw3d aac acpi acpi4linux alsa audiofile avi berkdb bitmap-fonts browserplugin bzip2 cdr cli crypt cups curl dbus dga dri dv dvd dvdr emacs emboss encode evo exif expat fam fftw flac foomaticdb fortran gdbm gif gimpprint glut gmp gnome gpm gstreamer gtk gtk2 gtkhtml guile hal idea idn imagemagick imap imlib ipv6 isdnlog java jpeg lcms libg++ libwww mad mikmod mmx mmxext mng motif mozilla mp3 mpeg mysql ncurses nls nptl nsplugin nvidia odbc ogg oggvorbis oogvorbis opengl oss pam pcre pda pdflib perl plotutils png ppds pppd python quicktime readline recode reflection scanner sdl session speex spell spl sse ssl stencil-buffer svga tcltk tcpd tiff transcode truetype truetype-fonts type1 type1-fonts udev unicode usb v4l vorbis xinerama xml2 xmms xorg xv zlib userland_GNU kernel_linux elibc_glibc"
Unset:  ASFLAGS, CTARGET, INSTALL_MASK, LANG, LC_ALL, LDFLAGS, LINGUAS, MAKEOPTS
Comment 1 Diego Elio Pettenò (RETIRED) gentoo-dev 2006-04-29 11:51:26 UTC
Which sound card and which sound driver are you using?
Do you have a particular dmix setup or you use the default?
Comment 2 witr 2006-04-29 13:26:59 UTC
(In reply to comment #1)
> Which sound card and which sound driver are you using?
> Do you have a particular dmix setup or you use the default?

# grep ALSA_CARDS /etc/make.conf
ALSA_CARDS='cmipci usb-audio'

(The problem shows up when using the cmipci driver.)

I'm not using any .asoundrc, so I guess I'm using defaults for everything.  Never have used .asoundrc, and things worked great.
Comment 3 witr 2006-04-29 13:42:00 UTC
A poster in the previously mentioned forum thread said that creating the following .asoundrc would make the problem go away:

pcm.!default {
  type hw
  card 0
}

I tried it, and it worked for me.

The gentoo ALSA guide doesn't mention anything about a .asoundrc being required, so I assume this is a workaround rather than a fix.
Comment 4 Diego Elio Pettenò (RETIRED) gentoo-dev 2006-04-29 13:54:06 UTC
That basically tells all the applications using alsa-lib to simply use the direct access to the hardware, discarding the default dmix setup. If you don't have hardware mixing capabilities, you'll have problems, as it won't allow you to use more than one application at a time that access the ALSA system.
Comment 5 witr 2006-04-29 13:59:31 UTC
But I've never had a problem with this setup (at least in modern times) running multiple applications at a time (using aoss when necessary for the OSS ones) and I've never had a .asoundrc.  I've tested it by running ALL of the applications above at the same time.  It didn't sound all that good, but it worked fine... ;-)

And the problem isn't running multiple applications, but rather when running JUST ONE application, sound skips for some of them as listed above.

Am I confused?
Comment 6 Diego Elio Pettenò (RETIRED) gentoo-dev 2006-04-29 14:10:45 UTC
Since 1.0.10 dmix is the default.
There might have been some change in 1.0.11 that broke it for your setup. You probably want to ask upstream about that.
Comment 7 witr 2006-04-29 14:17:31 UTC
I don't actually know which version of ALSA I was using before the upgrade, but I think it was 1.0.10-something.  If you look at the referenced forum thread there are at least a few folks experiencing the same problem.  The logical conclusion is that there is a dmix problem in 1.0.11, since disabling dmix (with the above .asoundrc) makes the skipping problem go away.

It seems like a default setup (i.e. no .asoundrc and thus no configuration) should just work, doesn't it?  Thus this seems like a bug that needs fixing, even if the bug is with the upstream code.
Comment 8 Diego Elio Pettenò (RETIRED) gentoo-dev 2006-04-29 14:40:31 UTC
I know that, but I don't have the same problem, on my system the default setup just works. It's probably a driver-specific problem, thus why I told you to report upstream. I can't do much about things I can't reproduce, doesn't have a systematical behaviour and are for drivers used by cards I don't own.
Upstream instead should know the code, what has changed and also how to solve.
Comment 9 Peter Weber 2006-05-01 03:18:00 UTC
The problem exists with alsa-utils 1.0.10 and 1.0.11, also it is driver indepentend. Only Gstreamer-Apps this problem.

Any further development?
This really sucks.
Comment 10 witr 2006-05-01 05:45:57 UTC
An update from some research:  This problem has been reported by people with I82801DBICH4, Intel AC97 (i915GM), and cmppci.  It appears to be a dmix problem rather than an alas-driver problem (because disabling dmix causes the skipping to stop), so I'll change the summary if I can to better reflect that.
Comment 11 witr 2006-05-02 16:14:25 UTC
Create an ALSA issue: https://bugtrack.alsa-project.org/alsa-bug/view.php?id=2095
Comment 12 witr 2006-05-02 16:29:03 UTC
Reverting to media-libs/alsa-lib-1.0.10 and leaving everything else the same resolves the issue for me.
Comment 13 Peter Weber 2006-05-06 06:12:18 UTC
Hello, it seems to be a Gstreamer-Bug.
Comment 14 witr 2006-05-06 06:26:47 UTC
I'm no expert, but an Alsa developer seems to think it's a dmix bug.  Check the issue tracker pointed to above.  Adding this line to .asoundrc reverts to older dmix behavior and seems to eliminate the skipping:

defaults.pcm.dmix_max_periods -1
Comment 15 Diego Elio Pettenò (RETIRED) gentoo-dev 2006-05-06 06:41:57 UTC
Okay there's a workaround and upstream is working on it, I suppose I can't do much unless they provide a patch, or a new version is released.