GNOME Bugzilla – Bug 340909
[alsasink] can't enable spdif output
Last modified: 2006-05-23 14:33:21 UTC
Please describe the problem: ela:~$ LANG=C gst-launch audiotestsrc wave=1 ! alsasink Setting pipeline to PAUSED ... Pipeline is PREROLLING ... Pipeline is PREROLLED ... Setting pipeline to PLAYING ... New clock: audioclock0 Works fine. If i select the default device explicit: ela:~$ LANG=C gst-launch audiotestsrc wave=1 ! alsasink device=hw:0,0 Setting pipeline to PAUSED ... ERROR: Pipeline doesn't want to pause. ERROR: from element /pipeline0/audiotestsrc0: Could not negotiate format Additional debug info: gstbasesrc.c(1717): gst_base_src_start (): /pipeline0/audiotestsrc0: Check your filtered caps, if any Setting pipeline to NULL ... FREEING pipeline ... Does not :( So i expand the pipeline to ela:~$ LANG=C gst-launch audiotestsrc wave=1 ! audioconvert ! audiorate ! alsasink device=hw:0,0 Setting pipeline to PAUSED ... Pipeline is PREROLLING ... Pipeline is PREROLLED ... Setting pipeline to PLAYING ... New clock: audioclock0 which works fine again, but if i now change to the spdif output (hw:0,4) ela:~$ LANG=C gst-launch audiotestsrc wave=1 ! audioconvert ! audiorate ! alsasink device=hw:0,4 Setting pipeline to PAUSED ... Pipeline is PREROLLING ... ERROR: from element /pipeline0/alsasink0: Could not get/set settings from/on resource. Additional debug info: gstalsasink.c(604): set_hwparams (): /pipeline0/alsasink0: Rate doesn't match (requested 44100Hz, get 0Hz) ERROR: pipeline doesn't want to preroll. Setting pipeline to NULL ... FREEING pipeline ... A simple gst-launch sinesrc ! alsasink device=hw:0,4 works on this computer with gst-0.8 Steps to reproduce: Actual results: Expected results: Does this happen every time? Other information:
Couple of problems here (discussed a bit on irc): - should be using audioresample, not audiorate. - with that, it works if we use filtered caps to specify that audioresample should resample to 48000. Otherwise, it still fails. Guess this is a problem with probing capabilities in alsasink?
Sample rate probing should work in gst-plugins-base CVS now: 2006-05-15 Tim-Philipp Müller <tim at centricular dot net> * ext/alsa/gstalsasink.c: (gst_alsasink_getcaps): Query supported sample rates. Fixes #341732. Can this be closed or is there something else involved?
Closing, should be fixed now. It should be audiotestsrc ! audioconvert ! audioresample ! alsasink btw (you need the audioconvert to convert between formats and from mono <=> stereo and the audiorsample to convert between sample rates). Please re-open if this is still an issue with -base CVS.