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 721186 - Add support for DSD (dsf, dff) music files
Add support for DSD (dsf, dff) music files
Status: RESOLVED FIXED
Product: GStreamer
Classification: Platform
Component: gst-libav
unspecified
Other Linux
: Normal enhancement
: 1.15.1
Assigned To: GStreamer Maintainers
GStreamer Maintainers
: 724366 724429 (view as bug list)
Depends on:
Blocks:
 
 
Reported: 2013-12-29 04:28 UTC by Ran
Modified: 2018-05-06 10:53 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Expose support for DSD (2.73 KB, patch)
2018-05-06 10:17 UTC, Mathieu Duponchelle
committed Details | Review

Description Ran 2013-12-29 04:28:42 UTC
DSD is a one bit high resolution audio format that is gaining ground with audiophile around the world. There are 60 DACs that support DSD via USB (Audio Class 2.) and the list is growing. DSD files can be downloaded / bought on line like any other music files. It will be very nice if Gstreamer can support this.

http://en.wikipedia.org/wiki/Direct_Stream_Digital

http://dsd-guide.com/technical-documents
Comment 1 Sebastian Dröge (slomo) 2013-12-29 08:50:06 UTC
Related: https://bugzilla.libav.org/show_bug.cgi?id=233

Once libav has support for that, we will easily have support for it too. I don't think it makes sense to support it as another "raw" audio format next to PCM with generic support everywhere.


How does DSD output via USB work? Is there support in ALSA for it already, or ...?
Comment 2 Ran 2013-12-29 14:56:35 UTC
ALSA supports DSD via the DoP protocol. 

http://dsd-guide.com/sites/default/files/white-papers/DoP_openStandard_1v1.pdf

Basically, DSD is encapsulated by PCM, which is sent to the DAC.

DSD works out of the box with ALSA. MPD currently implement that.
Comment 3 Jonathan Matthew 2014-02-15 10:35:39 UTC
*** Bug 724366 has been marked as a duplicate of this bug. ***
Comment 4 Sebastian Dröge (slomo) 2014-02-15 21:07:18 UTC
*** Bug 724429 has been marked as a duplicate of this bug. ***
Comment 5 Nishit Jain 2017-04-07 13:52:48 UTC
It seems the support for DSD was added in gst-libav on 19-Aug-2015:

https://github.com/GStreamer/gst-libav/commit/173718d146d5210c47c2775d80daa893afb2f5eb?diff=split

I am trying following gst-launch commandline but it does not play the DSD file. 

gst-launch-1.0 filesrc location=Smoke\ Gets\ In\ Your\ Eyes\ -\ 2.8MHz-DSD.dff ! avdec_dsd_msbf ! alsasink  

But it does not work saying "Internal data flow error."

gst-inspect on avdec_dsd_msbf shows following : 

Factory Details:
  Rank                     marginal (64)
  Long-name                libav DSD (Direct Stream Digital), most significant bit first decoder
  Klass                    Codec/Decoder/Audio
  Description              libav dsd_msbf decoder
  Author                   Wim Taymans <wim.taymans@gmail.com>, Ronald Bultje <rbultje@ronald.bitfreak.net>, Edward Hervey <bilboed@bilboed.com>

Plugin Details:
  Name                     libav
  Description              All libav codecs and formats (local snapshot)
  Filename                 /usr/local/lib/gstreamer-1.0/libgstlibav.so
  Version                  1.8.0
  License                  LGPL
  Source module            gst-libav
  Binary package           libav
  Origin URL               http://www.libav.org

GObject
 +----GInitiallyUnowned
       +----GstObject
             +----GstElement
                   +----GstAudioDecoder
                         +----avdec_dsd_msbf

Pad Templates:
  SRC template: 'src'
    Availability: Always
    Capabilities:
      audio/x-raw
                 layout: interleaved
                 format: F32LE

  SINK template: 'sink'
    Availability: Always
    Capabilities:
      unknown/unknown


Element Flags:
  no flags set

Element Implementation:
  Has change_state() function: 0x7fd45b1229f4

Element has no clocking capabilities.
Element has no URI handling capabilities.

Pads:
  SINK: 'sink'
    Pad Template: 'sink'
  SRC: 'src'
    Pad Template: 'src'

Element Properties:
  name                : The name of the object
                        flags: readable, writable
                        String. Default: "avdec_dsd_msbf0"
  parent              : The parent of the object
                        flags: readable, writable
                        Unknown type 23913056 "GstObject"
  min-latency         : Aggregate output data to a minimum of latency time (ns)
                        flags: readable, writable
                        Integer64. Range: 0 - 9223372036854775807 Default: 0 
  tolerance           : Perfect ts while timestamp jitter/imperfection within tolerance (ns)
                        flags: readable, writable
                        Integer64. Range: 0 - 9223372036854775807 Default: 0 
  plc                 : Perform packet loss concealment (if supported)
                        flags: readable, writable
                        Boolean. Default: false


Please note that the sink caps are "Unknown". 

Can you please help me decode dff (DSD) files using above added decoder.
Comment 6 Sebastian Dröge (slomo) 2017-04-07 14:15:43 UTC
Why do you think DSD support was added with that release?
Comment 7 Nishit Jain 2017-04-10 04:53:52 UTC
I could see the code to convert DSD to PCM samples. FFMPEG has enabled the support for the same. And a previous comment of your's says you would do it once libav starts supporting. 

Anyway, so should that mean the support for DSD is not yet complete? 

Anyway, Thanks for prompt response. 

Best regards,
Nishit
Comment 8 Sebastian Dröge (slomo) 2017-04-10 07:11:07 UTC
Yes it's not complete. It's supported by ffmpeg but the bits on our side are missing. See https://bugzilla.gnome.org/show_bug.cgi?id=779805 for some effort to add DSD support.
Comment 9 Nishit Jain 2017-04-11 06:41:03 UTC
Thanks for that information. Is there any plan to enable this end-to-end support? If yes, what is the schedule for the same? It would be highly useful and urgent for me.
Comment 10 Sebastian Dröge (slomo) 2017-04-11 07:59:24 UTC
I don't think there's active work on that, so feel free to help out in the other bug report.
Comment 11 Edward Hervey 2018-05-05 14:25:39 UTC
The libav decoders need to have a type defined (instead of unknown/unknown)
Comment 12 Mathieu Duponchelle 2018-05-06 10:17:12 UTC
Created attachment 371741 [details] [review]
Expose support for DSD

DSD is usually wrapped in DSF, for which we now also expose the
demuxer.
Comment 13 Mathieu Duponchelle 2018-05-06 10:52:49 UTC
Thanks very much for reporting this, with the patch that was just merged, samples from https://www.oppodigital.com/hra/dsd-by-davidelias.aspx can now be played back using the gst-libav plugins.
Comment 14 Mathieu Duponchelle 2018-05-06 10:53:23 UTC
Review of attachment 371741 [details] [review]:

committed