GNOME Bugzilla – Bug 663233
[flacdec] multichannel flac playback not possible (alsasink)
Last modified: 2011-12-09 02:29:43 UTC
Created attachment 200493 [details] GST_DEBUG_NO_COLOR=1 GST_DEBUG=*alsa*:5 gst-launch-0.10 filesrc location=02_breathe_part.flac ! flacdec ! audioconvert ! audio/x-raw-int ! alsasink >multichannel_flac_alsa.log 2>&1 gst-launch-0.10 filesrc location=02_breathe_part.flac ! flacdec ! audioconvert ! audio/x-raw-int ! alsasink -v 0:00:00.063241624 1378 0x1e34910 WARN alsa gstalsasink.c:531:set_hwparams:<alsasink0> error: Unable to set hw params for playback: Das Argument ist ungültig (invalid argument) gst-launch-0.10 filesrc location=02_breathe_part.flac ! flacdec ! audioconvert ! audio/x-raw-int, channels=2 ! alsasink -v ...works playbin2 of course doesn't work either file plays correctly in vlc sample available at http://opendreambox.org/~fraxinas/02_breathe_part.flac
The problem seems to be that your ALSA device doesn't actually support the number of channels you're giving it, and we have no way to query this at the moment. The ALSA folks were amenable to adding API to allow querying multichannel parameters after opening a stream, so if we get that, this should at least be solvable in playbin2 (i.e., when alsasink goes to READY, we could refine the sinkpad caps and playbin2 would not plug alsasink in directly). Alternatively, use pulsesink. ;)
Well, we do try to query that in gstalsa.c, gst_alsa_detect_channels() via the snd_pcm_hw_params_get_channels_max() call. If the driver returns wrong information there and later refuses that many channels, that's a driver bug imho.
Marking as NOTABUG.