squeezelite icon indicating copy to clipboard operation
squeezelite copied to clipboard

Native DSD not working

Open mimmus opened this issue 1 year ago • 2 comments

Hi, I have an integrated DAC/amplifier advertising up to DSD256 in its datasheet. But it works only setting "-D" to DSD-over-PCM: 3:dop (and not with DSD256, only DSD64 and DSD128, probably due to PCM sample rates limitation up to 384kHz) while I would have expected native DSD.

This is output of cat /proc/asound/card0/stream0:

$ cat /proc/asound/M20/stream0
MISSION MISSION USB Audio 2.0 at usb-0000:01:00.0-1.2, high speed : USB Audio

Playback:
  Status: Stop
  Interface 1
    Altset 1
    Format: S32_LE
    Channels: 2
    Endpoint: 0x01 (1 OUT) (ASYNC)
    Rates: 44100, 48000, 88200, 96000, 176400, 192000, 352800, 384000
    Data packet interval: 125 us
    Bits: 24
    Channel map: FL FR
    Sync Endpoint: 0x81 (1 IN)
    Sync EP Interface: 1
    Sync EP Altset: 1
    Implicit Feedback Mode: No
  Interface 1
    Altset 2
    Format: S16_LE
    Channels: 2
    Endpoint: 0x01 (1 OUT) (ASYNC)
    Rates: 44100, 48000, 88200, 96000, 176400, 192000, 352800, 384000
    Data packet interval: 125 us
    Bits: 16
    Channel map: FL FR
    Sync Endpoint: 0x81 (1 IN)
    Sync EP Interface: 1
    Sync EP Altset: 2
    Implicit Feedback Mode: No
  Interface 1
    Altset 3
    Format: SPECIAL
    Channels: 2
    Endpoint: 0x01 (1 OUT) (ASYNC)
    Rates: 44100, 48000, 88200, 96000, 176400, 192000, 352800, 384000
    Data packet interval: 125 us
    Bits: 32
    DSD raw: DOP=0, bitrev=0
    Channel map: FL FR
    Sync Endpoint: 0x81 (1 IN)
    Sync EP Interface: 1
    Sync EP Altset: 3
    Implicit Feedback Mode: No

and:

$ aplay --dump-hw-params -D hw:0,0 -f cd /dev/zero
Playing raw data '/dev/zero' : Signed 16 bit Little Endian, Rate 44100 Hz, Stereo
HW Params of device "hw:0,0":
--------------------
ACCESS: MMAP_INTERLEAVED RW_INTERLEAVED
FORMAT: S16_LE S32_LE SPECIAL
SUBFORMAT: STD
SAMPLE_BITS: [16 32]
FRAME_BITS: [32 64]
CHANNELS: 2
RATE: [44100 384000]
PERIOD_TIME: [125 1000000]
PERIOD_SIZE: [8 384000]
PERIOD_BYTES: [64 3072000]
PERIODS: [2 1024]
BUFFER_TIME: (41 2000000]
BUFFER_SIZE: [16 768000]
BUFFER_BYTES: [64 6144000]
TICK_TIME: ALL
--------------------

Here is the actual command line: /usr/local/bin/squeezelite -n "piCorePlayer" -o hw:CARD=M20,DEV=0 -a 160:4::1: -b 50000:300000 -r 384000 -d all=debug -f /var/log/pcp_squeezelite.log -D 3:dop -C 1 -V "MISSION USB Audio 2.0 "

Any help?

mimmus avatar Jun 27 '24 12:06 mimmus

Your device doesn't list any raw DSD formats that it accepts. Usually for a decvice that supports raw DSD you'd expect to see a format like DSD_U32_BE.

I've seen plenty of devices that list DSD support, but can only handle it when encapsulated in a PCM stream. That is still native DSD and it will be decoded as DSD in the DAC. I've also seen devices that require a proprietary driver to be able to send raw DSD. Some of the firmware versions on Amanero interface cards spring to mind.

Either way, this isn't a Squeezelite issue.

Since your device says it has a SPECIAL stream format you could try the various DSD combinations on the -D setting to see if any of them will actually work, so -D 0:u32be for example as this is a common raw DSD type. The options are u8, u16le, u16be, u32le, and u32be.

986ster avatar Jun 27 '24 16:06 986ster

yes, I agree: it’s definitely an issue of kernel, probably DAC model is missing in some config file. I will try to understand if it can be added in piCorePlayer kernel or I will try by myself with a more recent kernel or I will ping the vendor, actually offering only a Windows driver on its site.

Thanks

mimmus avatar Jun 27 '24 17:06 mimmus