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 663233 - [flacdec] multichannel flac playback not possible (alsasink)
[flacdec] multichannel flac playback not possible (alsasink)
Status: RESOLVED NOTABUG
Product: GStreamer
Classification: Platform
Component: gst-plugins-good
0.10.35
Other Linux
: Normal normal
: git master
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2011-11-02 11:48 UTC by Andreas Frisch
Modified: 2011-12-09 02:29 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
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 (13.33 KB, text/x-log)
2011-11-02 11:48 UTC, Andreas Frisch
Details

Description Andreas Frisch 2011-11-02 11:48:11 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
Comment 1 Arun Raghavan 2011-11-02 12:07:54 UTC
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. ;)
Comment 2 Tim-Philipp Müller 2011-11-02 12:34:50 UTC
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.
Comment 3 David Schleef 2011-12-09 02:29:43 UTC
Marking as NOTABUG.