GNOME Bugzilla – Bug 326720
[alsasink] doesn't support more than 2 channels anymore
Last modified: 2006-02-16 21:08:03 UTC
I used to have this pipeline configured as my audio-sink with 0.8: audioconvert ! audioscale ! audio/x-raw-int,channels=6,rate=48000 ! alsasink As the audioscale got renamed I use audioresample now: audioconvert ! audioresample ! audio/x-raw-int,channels=6,rate=48000 ! alsasink But this pipeline doen't want to play; I need to change it to this for playing: audioconvert ! audioresample ! audio/x-raw-int,rate=48000 ! alsasink But - of course - now I don't get any audio from the center and rear boxes as well as my sub.
indee, alsasink doesn't do any caps probing at the moment (this caused a lot of problems in 0.8, so we need to tread carefully when adding it back. Probing the max. number of audio channels should be fairly unproblematic though).
Created attachment 58401 [details] [review] add back multi-channel support to alsasink, attempt #1 First attempt to add back multi-channel support for alsasink, completely untested though, as I have no (working) hardware to test this on at the moment.
CC Wim for comment, as he's hacking on audio sinks at the moment.
CC myself for testing with sb live
Sven, in case you didn't get my reply on IRC: could you run % GST_DEBUG_NO_COLOR=1 GST_DEBUG=alsa:5,ringbuffer:5,baseaudiosink:5,audiosink:5 gst-launch-0.10 -v audiotestsrc num-buffers=64 ! audioconvert ! audioresample ! audio/x-raw-int,rate=48000,channels=6 ! alsasink device=hw:0 2>&1 | gzip > dbg.log.gz and attach the log?
Created attachment 58760 [details] [review] same patch as above, but updated to apply against CVS HEAD
This pipeline produced sound for me on all channels on my USB Audigy2 NX card using this patch: gst-launch-0.10 filesrc location=bullet.vob ! flupsdemux ! a52dec ! audioconvert ! audioresample ! audio/x-raw-int,channels=6,rate=48000 ! alsasink device=hw:2,0 It seems the system is not able to handle stereo sound sent to 3+ channels, so the sound file needs to be 6 channels for this to work.
So when you feed stereo sound, what happens? Do you get an assertion warning? Does it error out? nothing?
gst-launch-0.10 filesrc location=Little_House_on_the_Prairie.mp3 ! mad ! audioconvert ! audioresample ! audio/x-raw-int,channels=6,rate=48000 ! alsasink device=hw:2,0 This actually works fine, eats CPU like crazy though
Committed a version with additional suppport for 2.1 to CVS. If there are any problems with this, I'm sure people will file bugs. 2006-02-16 Tim-Philipp Müller <tim at centricular dot net> * ext/alsa/gstalsasink.c: (gst_alsasink_class_init), (gst_alsasink_init), (get_channel_free_structure), (caps_add_channel_configuration), (gst_alsasink_getcaps), (gst_alsasink_close): * ext/alsa/gstalsasink.h: Add support for more than 2 channels (#326720).