GNOME Bugzilla – Bug 148145
[alsasink] 48KHz doesn't work
Last modified: 2004-12-22 21:47:04 UTC
gst-launch filesrc="file.wav" ! wavparse ! alsasink produces the following error: ALSA lib pcm.c:824:(snd_pcm_sw_params) snd_pcm_sw_params: params->avail_min problem for start_threshold ERROR: from element /pipeline0/alsasink0: Could not get/set settings from/on resource. ERROR: from element /pipeline0/wavparse0: Internal GStreamer error: pad problem. File a bug. Additional debug info: gstpad.c(2403): gst_pad_set_explicit_caps: /pipeline0/wavparse0: failed to negotiate (try_set_caps with "audio/x-raw-int, endianness=(int)1234, signed=(boolean)true, width=(int)16, depth=(int)16, rate=(int)48000, channels=(int)2" returned REFUSED) *** I'm using an old SB AWE64 card and from what I recall, handles up to 44.1KHz. Other players seem to have no problem downsampling (madplay and mplayer seem to handle 48KHz audio w/o problem).
So downsample, add audioscale in between: gst-launch filesrc ... ! wavparse ! audioscale ! alsasink The behaviour seems to be as expected.
To force downsampling isn't exactly a tidy idea... having this problem at this level means that applications and components at the higher level won't work either. With the nautilus-media component, which relies on gstreamer, the component 'crashes' when trying to play a 48KHz mp3. This very problem also causes other areas to "not work", such as AVI playback or media file playback. Given from the error, it may be a bug in alsasink in setting up for 48KHz playback. If that isn't a bug, other applications should be having the same problem in setting up for 48KHz playback as well.
If nautilus-media doesn't use audioscale, then it will fail as well. That's a nautilus-media bug then and that can be fixed. For AVI, the same applies: audio needs to be downsampled if your soundcard doesn't support 48kHz audio playback. Other applications such as xine, xmms etc. all use automatic downsampling just like I explained above.
The problem is that alsa doesn't correctly advertise that it can't use 48kHz. Other players can wormk around that problem easily, but the GStreamer architecture unfortunately cannot yet do this. A workaround for the "stupid" autoplugger inside alsa is to set the alsasink device to hw:0. I believe using audioscale will not fix the problem either, unless you force 44.1kHz.
Either it's not a bug, or it's a dup of #137939. I'll mark it as a dup to tidy up bugzilla a bit. *** This bug has been marked as a duplicate of 137393 ***
A dup of #137939 or of #137393? I don't see either bugs corresponding to this one! Ronal Bultje, could you confirm this is a dupp of 137393?
Oops, sorry. typo there.
*** This bug has been marked as a duplicate of 137939 ***