After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 163780 - [alsasink] caps nego problem
[alsasink] caps nego problem
Status: RESOLVED OBSOLETE
Product: GStreamer
Classification: Platform
Component: gst-plugins
0.8.7
Other Linux
: Normal normal
: NONE
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2005-01-12 09:55 UTC by Pini Hadad
Modified: 2006-05-17 13:28 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
IRC log of troubleshooting session (3.84 KB, text/plain)
2005-01-18 14:03 UTC, Pini Hadad
Details

Description Pini Hadad 2005-01-12 09:55:07 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.
Comment 1 Stephane Loeuillet 2005-01-12 10:49:02 UTC
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
Comment 2 Stephane Loeuillet 2005-01-12 13:37:19 UTC
fuser /dev/snd/* to know which process uses alsa device
Comment 3 Pini Hadad 2005-01-13 00:41:40 UTC
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?
Comment 4 Ronald Bultje 2005-01-13 09:23:50 UTC
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.
Comment 5 Pini Hadad 2005-01-13 11:16:30 UTC
$ 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?
Comment 6 Ronald Bultje 2005-01-13 12:03:22 UTC
To your last question: yes.
Comment 7 Ronald Bultje 2005-01-17 12:49:13 UTC
Can you please tell us if recent CVS fixed this for you?
Comment 8 Pini Hadad 2005-01-17 13:34:44 UTC
I haven't tried cvs yet. I'm hoping to today or tomorrow. Sorry for the wait.
Comment 9 Pini Hadad 2005-01-18 14:02:39 UTC
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.
Comment 10 Pini Hadad 2005-01-18 14:03:40 UTC
Created attachment 36179 [details]
IRC log of troubleshooting session
Comment 11 Tim-Philipp Müller 2006-05-17 13:28:55 UTC
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.