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 782695 - alsa: Missing float PCM support
alsa: Missing float PCM support
Status: RESOLVED FIXED
Product: GStreamer
Classification: Platform
Component: gst-plugins-base
1.x
Other Linux
: Normal enhancement
: 1.13.1
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2017-05-16 14:41 UTC by vijay
Modified: 2017-05-20 17:03 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Patch for adding float pcm playback support (947 bytes, patch)
2017-05-16 14:41 UTC, vijay
reviewed Details | Review
Add mapping for PCM F32 F64 formats (996 bytes, patch)
2017-05-17 09:19 UTC, vijay
committed Details | Review

Description vijay 2017-05-16 14:41:45 UTC
Created attachment 351975 [details] [review]
Patch for adding float pcm playback support

Issue:
alsasink not supporting FLOAT pcm playback.

Root Cause:
In gst-plugins-base-1.8.3/ext/alsa/gstalsa.c function "gst_alsa_get_pcm_format"  switch case not added for FLOAT 32/64 pcm.

By adding the switch I am able to play the float PCM files.

Steps to verify:
With the fix audioconvert is required.
gst-launch filesrc location=<ogg file> ! decodebin ! audioconvert ! alsaink
With fix audioconvert not required.
gst-launch filesrc location=<ogg file> ! decodebin ! alsaink

I have attached the fix as patch.

I have verified the patch for FLOAT 32LE/64LE formats

Thank you
Comment 1 Nicolas Dufresne (ndufresne) 2017-05-16 16:11:09 UTC
Review of attachment 351975 [details] [review]:

Thanks, Looks good in general. Can you rework the commit message ? Something like alsa: Add mapping for PCM F32/F64 formats . And in the long description, I'd mention that this enables float pcm formats for both the alsasrc and alsasink (your current message gives the impression this is only the sink).

::: ext/alsa/gstalsa.c
@@ +131,3 @@
+    case GST_AUDIO_FORMAT_F32BE:
+      return SND_PCM_FORMAT_FLOAT_BE;
+     /* 64 bit */

I think this comment is not needed.
Comment 2 vijay 2017-05-17 09:19:44 UTC
Created attachment 352010 [details] [review]
Add mapping for PCM F32 F64 formats

Added proper commit message and fixed review comments
Comment 3 Sebastian Dröge (slomo) 2017-05-17 09:51:02 UTC
Comment on attachment 352010 [details] [review]
Add mapping for PCM F32 F64 formats

Looks good to me. Nicolas, you merge?

Ideally you would've added a link to this bug report as the last line of the commit message, but when we merge this with "git bz", it will be automatically added anyway if missing.
Comment 4 Nicolas Dufresne (ndufresne) 2017-05-17 14:34:13 UTC
Thanks for your patch.
Comment 5 Nicolas Dufresne (ndufresne) 2017-05-17 14:34:50 UTC
Comment on attachment 352010 [details] [review]
Add mapping for PCM F32 F64 formats

commit f460d7d1844be815c918a47561ea1a5e8ef4795d - alsa: Missing float PCM support
Comment 6 George Kiagiadakis 2017-05-20 16:54:59 UTC
Shouldn't this ticket be closed?