Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 39180 - Mplayer with ALSA in recent 2.6.1 get stuck whenever trying to play a file with audio
Summary: Mplayer with ALSA in recent 2.6.1 get stuck whenever trying to play a file wi...
Status: RESOLVED INVALID
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: High major
Assignee: Gentoo Media-video project
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2004-01-23 10:46 UTC by Matteo Settenvini
Modified: 2004-04-05 14:57 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 Matteo Settenvini 2004-01-23 10:46:07 UTC
I have the latest mplayer and 2.6.1 dev-kernel installed. ALSA works ok for the other applications, but this is the output of mplayer whenever started: 

MPlayer 1.0pre3-3.3.2 (C) 2000-2003 MPlayer Team

CPU: Intel Pentium 4/Xeon/Celeron Northwood 2392 MHz (Family: 8, Stepping: 7)
Detected cache-line size is 64 bytes
MMX supported but disabled
MMX2 supported but disabled
SSE supported but disabled
SSE2 supported but disabled
CPUflags:  MMX: 0 MMX2: 0 3DNow: 0 3DNow2: 0 SSE: 0 SSE2: 0
Compiled for x86 CPU with extensions:

Reading config file /usr/share/mplayer/mplayer.conf
Reading config file /root/.mplayer/config
Reading /root/.mplayer/codecs.conf: Can't open '/root/.mplayer/codecs.conf': No such file or directory
Reading /usr/share/mplayer/codecs.conf: 61 audio & 169 video codecs
font: can't open file: /root/.mplayer/font/font.desc
Font /usr/share/mplayer/font/font.desc loaded successfully! (206 chars)
Using Linux hardware RTC timing (1024Hz).
Can't open input config file /root/.mplayer/input.conf: No such file or directory
Input config file /usr/share/mplayer/input.conf parsed: 53 binds

Playing [DivX - ITA] Matrix 3 revolutions.avi.
AVI file format detected.
VIDEO:  [DX50]  480x272  24bpp  23,990 fps  704,2 kbps (86,0 kbyte/s)
==========================================================================
Opening audio decoder: [mp3lib] MPEG layer-2, layer-3
MP3lib: init layer2&3 finished, tables done
AUDIO: 44100 Hz, 2 ch, 16 bit (0x10), ratio: 12000->176400 (96,0 kbit)
Selected audio codec: [mp3] afm:mp3lib (mp3lib MPEG layer-2, layer-3)
==========================================================================
vo: X11 running at 1024x768 with depth 24 and 32 bpp (":0.0" => local display)
==========================================================================
Opening video decoder: [ffmpeg] FFmpeg's libavcodec codec family
Selected video codec: [ffodivx] vfm:ffmpeg (FFmpeg MPEG-4)
==========================================================================
Checking audio filter chain for 44100Hz/2ch/16bit -> 44100Hz/2ch/16bit...
AF_pre: af format: 2 bps, 2 ch, 44100 hz, little endian signed int
AF_pre: 44100Hz 2ch Signed 16-bit (Little-Endian)
audio_setup: Can't open audio device /dev/sound/dsp: Dispositivo o risorsa occupata
alsa-init: requested format: 44100 Hz, 2 channels, Signed 16-bit (Little-Endian)
alsa-init: 1 soundcard found, using: hw:0,0

Then, the 'q' key doesn't make me quit... i have to CTRL+C it, and then it is reported : 

MPlayer interrupted by signal 2 in module: enable_cache
MPlayer interrupted by signal 2 in module: ao2_init

I tried also a fuser -k /dev/sound/dsp, but it's not busy.
I don't know if it's related with bug #38476, but i don't think so.

Mplayer still works correctly with oss on a 2.4 kernel. mplayer -vo oss doesn't work in 2.6.1

Reproducible: Always
Steps to Reproduce:




Portage 2.0.50_pre19 (default-x86-1.4, gcc-3.3.2, glibc-2.3.2-r3, 2.6.1-rc3-gentoo)
=================================================================
System uname: 2.6.1-rc3-gentoo i686 Intel(R) Pentium(R) 4 CPU 2.40GHz
Gentoo Base System version 1.4.3.12
distcc 2.12.1 i686-pc-linux-gnu (protocols 1 and 2) (default port 3632) [disabled]
Autoconf: sys-devel/autoconf-2.59
Automake: sys-devel/automake-1.7.8
ACCEPT_KEYWORDS="x86 ~x86"
AUTOCLEAN="yes"
CFLAGS="-O3 -mcpu=pentium4 -funroll-loops -pipe"
CHOST="i686-pc-linux-gnu"
COMPILER="gcc3"
CONFIG_PROTECT="/etc /usr/X11R6/lib/X11/xkb /usr/kde/2/share/config
/usr/kde/3.1/share/config /usr/kde/3/share/config /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/env.d"
CXXFLAGS="-O3 -mcpu=pentium4 -funroll-loops -pipe"
DISTDIR="/usr/portage/distfiles"
FEATURES="autoaddcvs ccache sandbox"
GENTOO_MIRRORS="http://128.213.5.34/gentoo/
http://linux.rz.ruhr-uni-bochum.de/download/gentoo-mirror/
http://ftp.gentoo.skynet.be/pub/gentoo/"
MAKEOPTS="-j2"
PKGDIR="/usr/portage/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY=""
SYNC="rsync://rsync.gentoo.org/gentoo-portage"
USE="X aalib alsa apm arts avi berkdb bonobo cdr crypt cups doc dvd encode esd
foomaticdb gdbm gif gnome gpm gtk gtk2 gtkhtml guile imap imlib java jpeg kde
libg++ libwww mad maildir mikmod mmx motif mozilla mpeg mysql ncurses nls
oggvorbis opengl oss pam pcmcia pdflib perl png python qt quicktime readline
samba sasl sdl slang spell ssl svga tcltk tcpd tetex truetype x86 xml2 xmms xv
zlib video_cards_i810 video_cards_i830"
Comment 1 Matteo Settenvini 2004-01-24 14:55:40 UTC
I tried a few of things on this, and I isolated the problem... killing artsd before starting mplayer fix things (until artsd restart). Obviously this doesn't solve the problem, as I don't want to have to manually kill artsd everytime I have to start mplayer... 
using other '-vo' don't work (while there's artsd active, i mean).

__ NOTE : ___

Moreover, I noticed that killing artsd fixes a lot of other strange things... for example, it lets me to use the xmms-alsa plugin, while before trying to enable it resulted with a crash of xmms itself.

So this has rather to be considered a problem with artsd and alsa than mplayer, as many different applications are affected (mplayer, xmms, ogg123, mp123, etc)
Comment 2 Dizzy 2004-02-03 10:03:26 UTC
I dont know but dont you consider normal that while artsd is holding a "lock" on your soundcard no other application trying directly to talk to your soundtrack (thus with ALSA) wont work ? It blocks, because the open of the sound device blocks if its already opened by another application (like artsd). So solutions for you might be:
1. dont use artsd in the first place
2. use artsd then take care that all applications you run use artsd in turn to output sound (mplayer compiled with "arts" USE flag and install media-plugins/xmms-arts and use it with XMMS for output of sound)
Comment 3 Dizzy 2004-02-04 05:06:26 UTC
oh, I just investigated this a little, seems mplayer (default) when compiled with both ALSA and arts choses ALSA first when tries sound output and thus it blocks on alsa so you have:
- either dont compile mplayer with alsa (if you use arts on a daily basis that makes sense)
- run mplayer giving specific output sound driver (ie mplayer -ao arts)
- edit some file in ~/.mplayer to configure mplayer to prefer arts over alsa when compiled with both...
Comment 4 Dizzy 2004-02-04 05:13:11 UTC
Ok, one more and Im out ;)

This is the solution for me , edit ~/.mplayer/config and add a line:
ao=arts

It practically instructs mplayer to use arts sound output so you dont need to use -ao arts each time you start it.
Comment 5 Matteo Settenvini 2004-02-04 05:54:42 UTC
That's ok, but for other apps? Running them through artsdsp doesn't always work. Anyway, I disabled artsd at the moment. Things seem to go on well, but this isn't the expected result.

PS: "Holding a lock on your soundcard" -> fuser /dev/dsp (or the other device created when loading alsa, i don't remember its name now) doesn't report anything. So, how's artsd affecting the output? 


Comment 6 Jeremy Huddleston (RETIRED) gentoo-dev 2004-04-05 14:57:26 UTC
This isn't a bug.  It's a limitation of your hardware.  You might want to look into getting a full-duplex sound card or try setting up the alsa dmix plugin (by creating /etc/asound.conf... look at http://dev.gentoo.org/~eradicator/asound.conf-asym as a starting point)