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 148145 - [alsasink] 48KHz doesn't work
[alsasink] 48KHz doesn't work
Status: RESOLVED DUPLICATE of bug 137939
Product: GStreamer
Classification: Platform
Component: gst-plugins
0.8.1
Other Linux
: Normal normal
: NONE
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2004-07-22 05:17 UTC by DJ
Modified: 2004-12-22 21:47 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description DJ 2004-07-22 05:17:28 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).
Comment 1 Ronald Bultje 2004-07-22 20:23:28 UTC
So downsample, add audioscale in between:

gst-launch filesrc ... ! wavparse ! audioscale ! alsasink

The behaviour seems to be as expected.
Comment 2 DJ 2004-07-23 12:51:36 UTC
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.
Comment 3 Ronald Bultje 2004-07-23 13:26:56 UTC
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.
Comment 4 Benjamin Otte (Company) 2004-07-25 14:23:11 UTC
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.
Comment 5 Ronald Bultje 2004-11-10 10:23:55 UTC
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 ***
Comment 6 Loïc Minier 2004-11-28 18:46:28 UTC
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?
Comment 7 Ronald Bultje 2004-11-28 19:06:24 UTC
Oops, sorry. typo there.
Comment 8 Ronald Bultje 2004-11-28 19:06:46 UTC

*** This bug has been marked as a duplicate of 137939 ***