Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 76408 - xmms-1.2.10-r9 ALSA-plugin plays choppy sound on PPC
Summary: xmms-1.2.10-r9 ALSA-plugin plays choppy sound on PPC
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: New packages (show other bugs)
Hardware: PPC All
: High normal (vote)
Assignee: PPC Porters
URL:
Whiteboard: sound
Keywords:
Depends on:
Blocks:
 
Reported: 2005-01-02 07:32 UTC by Michael Kiermaier
Modified: 2006-04-05 10:24 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 Michael Kiermaier 2005-01-02 07:32:58 UTC
I have a G3 iBook 800 MHz Rev. 2.2 with vanilla kernel 2.6.10. The kernel ALSA driver as well as OSS emulation are activated, for the kernel config see below.

Now I try to play a standard 44.1 MHz mp3-file with xmms-1.2.10-r9. The OSS output works as expected.
But switching the output plugin to ALSA, things change: The music runs a bit too fast (48 kHz I assume), and the sound is not clear any more (there are "pops" in the sound).
I tried the sound output via the xmms-jack-0.11 plugin (jackd running at 44.1 kHz), and jackd displays the error: "sample rate in use (44100 Hz) does not match requested rate (48000 Hz)".
The last experiment was to play via the xmms-arts-0.7.1-r1 plugin (artsd running at 44.1 kHz), where everything was fine again (no pops, correct speed).

All these obervations are reproducible on my iBook. I tried it with various mp3 files of different origin, to make sure that it is not an inconsistency in the mp3 file.


relevant part of kernel-config:
#
# Advanced Linux Sound Architecture
#
CONFIG_SND=m
CONFIG_SND_TIMER=m
CONFIG_SND_PCM=m
CONFIG_SND_RAWMIDI=m
CONFIG_SND_SEQUENCER=m
# CONFIG_SND_SEQ_DUMMY is not set
CONFIG_SND_OSSEMUL=y
CONFIG_SND_MIXER_OSS=m
CONFIG_SND_PCM_OSS=m
CONFIG_SND_SEQUENCER_OSS=y
# CONFIG_SND_VERBOSE_PRINTK is not set
# CONFIG_SND_DEBUG is not set
#
# Generic devices
#
CONFIG_SND_VIRMIDI=m
#
# ALSA PowerMac devices
#
CONFIG_SND_POWERMAC=m


# emerge info
Portage 2.0.51-r8 (default-ppc-2004.1, gcc-3.4.3, glibc-2.3.4.20041102-r0, 2.6.10 ppc)
=================================================================
System uname: 2.6.10 ppc 750FX
Gentoo Base System version 1.6.8
Python:              dev-lang/python-2.2.2,dev-lang/python-2.3.4 [2.3.4 (#1, Sep 16 2004, 23:11:34)]
distcc 2.18.3 powerpc-unknown-linux-gnu (protocols 1 and 2) (default port 3632)[disabled]
dev-lang/python:     2.2.2, 2.3.4
sys-devel/autoconf:  2.13, 2.59-r6
sys-devel/automake:  1.8.5-r2, 1.5, 1.9.3, 1.6.3, 1.7.9, 1.4_p6
sys-devel/binutils:  2.15.90.0.3-r4
sys-devel/libtool:   1.5.10-r2
virtual/os-headers:  2.4.18-r2, 2.4.22
ACCEPT_KEYWORDS="ppc ~ppc"
AUTOCLEAN="yes"
CFLAGS="-O2 -pipe -mcpu=750 -fsigned-char -mpowerpc-gfxopt"
CHOST="powerpc-unknown-linux-gnu"
CONFIG_PROTECT="/etc /usr/kde/2/share/config /usr/kde/3.2/share/config /usr/kde/3.3/env /usr/kde/3.3/share/config /usr/kde/3.3/shutdown /usr/kde/3/share/config/usr/lib/X11/xkb /usr/share/config /usr/share/texmf/dvipdfm/config/ /usr/share/texmf/dvips/config/ /usr/share/texmf/tex/generic/config/ /usr/share/texmf/tex/platex/config/ /usr/share/texmf/xdvi/ /var/qmail/control"
CONFIG_PROTECT_MASK="/etc/gconf /etc/terminfo /etc/env.d"
CXXFLAGS="-O2 -pipe -mcpu=750 -fsigned-char -mpowerpc-gfxopt"
DISTDIR="/usr/portage/distfiles"
FEATURES="autoaddcvs ccache distlocks"
GENTOO_MIRRORS="ftp://gentoo.inode.at/source/ ftp://linux.rz.ruhr-uni-bochum.de/gentoo-mirror/ http://gd.tuwien.ac.at/opsys/linux/gentoo/"
LDFLAGS=""
MAKEOPTS="-j2"
PKGDIR="/usr/portage/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY="/usr/local/portage"
SYNC="rsync://rsync.gentoo.org/gentoo-portage"
USE="X aalib alsa apache2 apm arts audiofile berkdb bitmap-fonts blas bzlib caps cdparanoia crypt cups dba divx4linux doc dvd encode exif f77 flac font-server fortran gcj gd gdbm gif gnome-libs gphoto2 gpm gtk gtk2 guile icq imlib innodb jack jack-tmpfs java jpeg kde ladcca ladspa lcms libcaca libwww live lzo mad maildir matroska monkey motif mpeg mysql ncurses nls objc offensive oggvorbis opengloss pam pdflib perl png ppc python qt readline samba sasl sdl slang sndfile speex spell ssl tcltk tcpd tetex theora tiff truetype truetype-fonts type1-fonts usb wmf xine xml xml2 xmms xprint xv xvid xvmc zlib video_cards_radeon"
Comment 1 Michael Kiermaier 2005-01-02 07:52:45 UTC
Sorry, the xmms-jack error message I posted was not correct, it was part of the jackd startup message and had nothing to do with xmms.

This is the actual behaviour when I try to play via xmms-jack:

xmms gives the error message:

Message: fmt 5, channels: 2
ERR: JACK_Error:jack_create_thread: error 11 creating real-time thread by inheritance: Resource temporarily unavailable
ERR: JACK_OpenDevice:cannot activate client
xmms-mad-Message: failed to open audio output: jack Driver 0.11


So maybe this is completely independent of the ALSA-wrong-sampling-rate problem.

I should remark that while xmms-jack gives this error message, jack output via alsaplayer -o jack works.
Comment 2 Michael Kiermaier 2005-01-02 14:49:36 UTC
Finally i learned how to handle realtime capabilities on 2.6 kernels. I got xmms-jack to produce sound, but all I get is white noise. Could it be that this is a PPC-typical endian problem?

Should I file another bug report for this xmms-jack problem? I do not believe any more that there is any correlation between the buggy ALSA output and the buggy JACK output.
Comment 3 Jeremy Huddleston (RETIRED) gentoo-dev 2005-01-05 00:27:19 UTC
yes file a separate bug with ppc... in fact I can't reproduce this either, so I'm handing it off to ppc
Comment 4 Michael Kiermaier 2005-01-05 04:54:28 UTC
OK, i will file a seperate report on the JACK bug, lets concentrate on the ALSA bug here.

The bug is reproducible at least on other iBooks ( http://forums.gentoo.org/viewtopic.php?t=201247)

The "Period Time" value in the settings of the ALSA output plugin of xmms influences the "buggyness" of the output:

For values 1-5 ms the sound seems to be clear
Beginning at 6 ms, the sound gets choppy
For values between 62ms and 92 ms, xmms gets stuck in an infinite loop. On killing xmms I get the message

Message: alsa mixer timed out

Segmentation fault

You've probably found a bug in XMMS, please visit
http://bugs.xmms.org and fill out a bug report.



For values of 93ms or above, the sound is clear again.

For really bad sound (without infinite loop) set Period time to 61ms.


The main characteristic of the buggy sound output ist the choppy sound. The speed seems to be right in most of these cases.

I wonder if this is a xmms bug or a bug in the underlying ALSA sound driver.
Comment 5 Michael Hanselmann (hansmi) (RETIRED) gentoo-dev 2005-01-28 11:24:34 UTC
I have xmms-1.2.10-r10 installed on a G5. I'm using the snd-emu10k1 driver together with a Creative Labs SoundBlaster Audigy ZS. I've tried your values and sound is always good and xmms doesn't crash, therefore this is WORKSFORME for me. Could you please also try -r10, because -r9 is no longer in portage?
Comment 6 Michael Kiermaier 2005-02-08 11:55:11 UTC
For me, on -r12 the problem is still there. I guess it has to do with the iBook sound chip.
Comment 7 Matti Bickel (RETIRED) gentoo-dev 2005-04-24 11:22:42 UTC
I do experience the same problem here on a ibook G4.
Setting Period Time in xmms to 1 ms solved it for me. (Thanks for the posted link in #4)
This is a xmms issue because mplayer and others apps are working correctly with alsa.
I got xmms 1.2.10-r13 and xmms-alsa 1.2.10-r1, which are both masked.
Trying to find a reason for this...
Comment 8 Lars Weiler (RETIRED) gentoo-dev 2006-01-21 06:14:21 UTC
What's the current state here?
Comment 9 Michael Kiermaier 2006-02-19 06:37:20 UTC
In the current version (1.2.10-r15) the problem seems to have disappeared. It would be good if someone who also had this problem could confirm that.
Comment 10 Matti Bickel (RETIRED) gentoo-dev 2006-04-05 08:12:01 UTC
Using xmms-1.2.10-r15 and alsa-*-1.0.10 together with the latest git-kernel there're no more problems on ppc. Guess the issue is fixed.
Comment 11 nixnut (RETIRED) gentoo-dev 2006-04-05 10:24:50 UTC
Works fine on my mini too now. I did have this problem about a year ago. Changing the period time as suggested in comment #4 worked for me. This is no longer necessary.

Closing this bug as fixed. Thanks to all who helped with testing :)