GNOME Bugzilla – Bug 163780
[alsasink] caps nego problem
Last modified: 2006-05-17 13:28:55 UTC
Sorry the summary isn't more specific. I'm running Gentoo with Linux 2.6.9-mm1. Gstreamer 0.8.8, gst-plugins 0.8.7, and gst-plugins-* 0.8.7 all installed from portage. In case you're not familiar with the way portage supplies gst-plugins, there are seperate packages for each of the plugins in gst-plugins. I've got alsa working fine for most things and oss emulation set up (although I never used it till now). My hardware doesn't support hardware mixing and I don't have dmix(er?) set up. I'm using amarok 1.2_beta3 with the gstreamer engine. I wanted to use the alsa sink. But when I'd try to play anything it wouldn't play and would report: [GStreamer Error] ALSA device "default" is already in use by another program. No other program was actually using it. If I try to play something in xmms (which is configured to use the alsa output plugin) while amarok is open, it can't play. If I close amarok it is then able to play right away. Amarok is able to play things fine if I configure it to use the oss sink. I did some searching and tried a couple of things that might be useful: $ gst-launch-0.8 sinesrc ! alsasink RUNNING pipeline ... ERROR: pipeline doesn't want to play. Doesn't make any noise. $ gst-launch-0.8 sinesrc ! osssink RUNNING pipeline ... Caught interrupt. Execution ended after 21 iterations (sum 255966000 ns, average 12188857 ns, min112000 ns, max 92418000 ns). This one makes a really annoying tone until I kill it. If you need anything else or if this is filed in the wrong place please let me know. Thanks for your time.
hum alsasink works in this release just keep in mind that alsa may only be used by one program at a time. it seems that your alsa device is already in use (say by esound or another sound daemon like artsd) either use artsdsink or esdsink or use alsasink once your sound server is killed. NB : noone touched artdsink for a while, so it might be rotten better ask amarok people, this is not a gstreamer bug
fuser /dev/snd/* to know which process uses alsa device
I know alsa can only be used by one program at a time. Other programs are able to use it (one at a time) but when I stop them gstreamer isn't. The only sound server/daemon I'm using is arts, but it auto suspends after 2 seconds and I've verified that it's not locking the sound device. $ fuser /dev/snd/* /dev/snd/controlC0: 29004 $ ps -e | grep "29004" 29004 ? 00:00:00 kmix Killing kmix doesn't change anything. Yeah I was thinking maybe I should ask the amarok people, but wouldn't gst-launch... not working be a gstreamer problem?
The error implies that the caps don match. Try: gst-launch sinesrc ! audioconvert ! audioscale ! alsasink Stephane added samplerate probing to CVS, so thereś no reason why you ould get the above error anymore with my pipeline.
$ gst-launch-0.8 sinesrc ! audioconvert ! audioscale ! alsasink RUNNING pipeline ... ERROR: pipeline doesn't want to play. gst-launch-0.8 sinesrc ! audioconvert ! audioscale ! osssink RUNNING pipeline ... Caught interrupt. Execution ended after 53 iterations (sum 956425000 ns, average 18045754 ns, min142000 ns, max 92378000 ns). I'm not sure I understand your last sentence. Do you mean this should have started working recently in cvs? I'm still using a release. Should I try cvs?
To your last question: yes.
Can you please tell us if recent CVS fixed this for you?
I haven't tried cvs yet. I'm hoping to today or tomorrow. Sorry for the wait.
I finally got around to trying cvs. At first I tried using cvs directly, but I had a small problem and then thought I had another one so LeRoutier sent me his cvs ebuilds to try installing it through portage. This was on IRC. I got everything installed and was still having the problem. He then spent quite a while troubleshooting with me. I'll attach the log of the conversation. To summarise it, the real error I had was: alsa(25599) gstalsa.c(1696):gst_alsa_probe_hw_params:<alsasink0> "snd_pcm_hw_params_set_period_size_near (this->handle, hw_params, &period_size, 0)": Invalid argument Alsa seems to not configure the default device correctly on my system without an alsa config file, which their website says should be optional. alsasink normally uses the default. I'm not sure what should happen to this bug so I'm gonna leave the status and someone else should do something.
Created attachment 36179 [details] IRC log of troubleshooting session
I believe this is fixed in the 0.8 branch now (sine 0.8.12 or 0.8.13). Shouldn't happen with 0.10/CVS HEAD any longer either AFAIK, so closing.