Kodi/Coreelec SACD/DSD/dsf support (third attempt). with the answer

This is my third attempt to install LMS/Squeezelite in CE to play DSD files. For more, see my previous threads.
My devices are:

  • Odroid N2+ - CE 21 > Music is in USB HDD path: /media/HD9/media/Music connected by HDMI to
  • Denon AVC-X4800H connected by HDMI to
  • TV LG OLED G4

AFAIK, DSD stream should be embedded in PCM, DSD-over-PCM (DoP), then sent through HDMI. X4800H will convert it to analogue.
What I did so far:

  • Install Squeezelite included in Media-tools, from CE add-on. Squeezelite is Version 2.0
  • Install Docker from CE add-on
  • Install LMS in Docker (see files here) from ssh with
docker pull lmscommunity/lyrionmusicserver:9.0.2

Configure Docker

docker run -d \
--name=lms \
--restart unless-stopped \
-p 9000:9000 \
-p 9091:9090 \
-p 3483:3483 \
-p 3483:3483/udp \
-v /media/HD9/media/Music:/music:ro \
-v /storage/.config/lms/config:/config:rw \
-v /storage/.config/lms/playlist:/playlist:rw \
-e PUID=1000 \
-e PGID=1000 \
-e TZ=Europe/Budapest \
lmscommunity/lyrionmusicserver:9.0.2
  • Install LMS add-on DSDPlayer v1.12

  • Test LMS working
    In the browser address: http://path/to/server:9000

  • Configure Squeezelite for LMS_SERVER
    From ssh:

# aplay -l
**** List of PLAYBACK Hardware Devices ****
card 0: AMLAUGESOUND [AML-AUGESOUND], device 0: SPDIF-B-dummy dummy-0 []
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 0: AMLAUGESOUND [AML-AUGESOUND], device 1: TDM-B-T9015-audio-hifi T9015-audio-hifi-1 []
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 0: AMLAUGESOUND [AML-AUGESOUND], device 2: SPDIF-A-dummy dummy-2 []
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 0: AMLAUGESOUND [AML-AUGESOUND], device 3: TDM-C-dummy dummy-3 []
  Subdevices: 1/1
  Subdevice #0: subdevice #0

 # aplay -L
null
    Discard all samples (playback) or generate zero samples (capture)
default:CARD=AMLAUGESOUND
    AML-AUGESOUND, 
    Default Audio Device
sysdefault:CARD=AMLAUGESOUND
    AML-AUGESOUND, 
    Default Audio Device
surround71:CARD=AMLAUGESOUND,DEV=0
    AML-AUGESOUND, 
    7.1 Surround output to Front, Center, Side, Rear and Woofer speakers
iec958:CARD=AMLAUGESOUND,DEV=0
    AML-AUGESOUND, 
    IEC958 (S/PDIF) Digital Audio Output
hdmi:CARD=AMLAUGESOUND,DEV=0
    AML-AUGESOUND, 
    HDMI Audio Output

Create a Squeezelite systemd service (for version >2.0)

From ssh: vi /storage/.config/system.d/squeezelite.service

[Unit]
Description=Squeezelite Player (HDMI+PCM+DoP)
After=network.target docker.service
Requires=docker.service

[Service]
ExecStart=/storage/.kodi/addons/virtual.multimedia-tools/bin/squeezelite \
  -n "Odroid-HDMI" \
  -o surround71:CARD=AMLAUGESOUND,DEV=0 \
  -s 127.0.0.1 \
  -a 80:4:32:1 
  -C 3
Restart=always
RestartSec=5

[Install]
WantedBy=multi-user.target

After every change in service file before retest:
From ssh

systemctl stop squeezelite.service
systemctl daemon-reload
systemctl enable squeezelite.service
systemctl start squeezelite.service
systemctl status squeezelite.service

Now I can play PCM stereo 16/24bit 44/48/88/96kHz
But I can’t play DSD (.dsf) => no output, DTS/WAV => pink/white noise

Is the above a good install? I know I could Install Squeezelite in Docker.
What am I doing wrong?
Many thanks

Just a few things you can try…

  1. I would try to comment out or delete the line “-a 80:4:32:1” in the Squeezelite systemd service and restart service. Not an expert, but maybe you are setting a sample size in bits that is not compatible with DSD (1 bit)?

  2. In LMS, go to settings → advanced → file types and make sure “decoder” is set to Native for DSF and other DSD filetypes you are playing.

  3. Make sure your DSD (dsf) files are compatible with your DAC. My DAC plays DSD files up to DSD128 - if I try any higher I also get “white noise” or no sound.

  4. Try another version of Squeezelite i.e. Download squeezelite-2.0.0.1524-aarch64.tar.gz (LMS Clients) - download and extract to i.e. /storage/downloads/? and change the path in your Squeezelite systemd service and restart service.

  5. Try setting another soundcard - maybe “hdmi:CARD=AMLAUGESOUND,DEV=0” (just in case the surround version is somehow conflicting with the DSD files/format - it’s a wild shot)

However, since you can already play music I think you can get more help in the LMS forum…

According to the manual of your Denon, it can play DSD from a USB stick - that would be a quick test to ensure it can play your DSD files…

https://manuals.denon.com/AVCX4800H/EU/en/GFNFSYkxqlluoz.php

I tried all your 5 points.
1: nothing better
2: was done
3: MediaInfo+test with USB. AVC-X4800H can play only 2 channels with USB.
4: I tried squeezelite-2.0.0.1541-armhf
5: Other soundcards are limited 16bit/2channels

So, I still can’t play DSD files :cry:

My last troubleshooting ideas is that you ensure your Denon is set to use the Pure Direct /Direct mode when playing DSD (if this is a manual setting) just a thought from seeing this page in the manual https://manuals.denon.com/AVCX4800H/EU/en/GFNFSYrvfbzbgs.php - also see this on “Direct playback“ https://manuals.denon.com/AVCX4800H/EU/en/GFNFSYrhzdncbw.php “While DSD signals are played back, “DSD Direct” is displayed.“

And that the DSD files are within the spec “2-channel – 5.1-channel, 2.8 MHz” (multi channel only trough HDMI) ref. “Supported audio formats” https://manuals.denon.com/AVCX4800H/EU/en/GFNFSYdtphpnek.php

Maybe check for a firmware upgrade of the Denon?

If you have only tried multichannel DSD files I would test with 2 channel - I think your install is fine…

As recommended, I tried all the sound mode but nothing better.
I added the log file -d all=debugin the service

This is the log when I stop the service, I start the service, I play a .dsf file DSD64/2ch.

CLI
CoreELEC:~ # systemctl stop squeezelite.service
CoreELEC:~ # systemctl start squeezelite.service

Logfile


/storage/downloads/squeezelite-2.0.0.1541-armhf/squeezelite -n Odroid-HDMI -o surround71:CARD=AMLAUGESOUND,DEV=0 -s 127.0.0.1 -d all=debug -f /storage/lmslog -D -C 3 
[16:35:12.764065] stream_init:758 init stream
[16:35:12.764257] stream_init:759 streambuf size: 2097152
[16:35:12.775101] output_init_alsa:936 init output
[16:35:12.775249] output_init_alsa:976 requested alsa_buffer: 40 alsa_period: 4 format: any mmap: 1
[16:35:12.775306] output_init_common:360 outputbuf size: 3528000
[16:35:12.775412] output_init_common:384 idle timeout: 3000
[16:35:12.780473] output_init_common:426 supported rates: 1536000 1411200 768000 705600 384000 352800 192000 176400 96000 88200 48000 44100 32000 24000 22500 16000 12000 11025 8000 
[16:35:12.783840] output_init_alsa:1002 memory locked
[16:35:12.783926] output_init_alsa:1008 glibc detected using mallopt
[16:35:12.784105] output_init_alsa:1026 unable to set output sched fifo: Operation not permitted
[16:35:12.784138] decode_init:153 init decode
[16:35:12.784191] register_dsd:908 using dsd to decode dsf,dff
[16:35:12.784208] register_alac:549 using alac to decode alc
[16:35:12.784222] register_faad:663 using faad to decode aac
[16:35:12.784236] register_vorbis:378 using vorbis to decode ogg
[16:35:12.784249] register_opus:324 using opus to decode ops
[16:35:12.784263] register_flac:389 using flac to decode ogf,flc
[16:35:12.784276] register_pcm:483 using pcm to decode aif,pcm
[16:35:12.784293] register_mad:423 using mad to decode mp3
[16:35:12.784306] decode_init:202 include codecs:  exclude codecs: 
[16:35:12.784450] slimproto:903 connecting to 127.0.0.1:3483
[16:35:12.784677] slimproto:942 connected
[16:35:12.784702] slimproto:953 local player
[16:35:12.784718] sendHELO:148 mac: 98:ba:5f:18:e9:9c
[16:35:12.784733] sendHELO:150 cap: CanHTTPS=1,Model=squeezelite,AccuratePlayPoints=1,HasDigitalOut=1,HasPolarityInversion=1,Balance=1,Firmware=2.0.0-1541,ModelName=SqueezeLite,MaxSampleRate=1536000,dsf,dff,alc,aac,ogg,ops,ogf,flc,aif,pcm,mp3,loc
[16:35:12.791309] process:533 strm
[16:35:12.791429] process_strm:281 strm command q
[16:35:12.791462] decode_flush:244 decode flush
[16:35:12.791490] output_flush:439 flush output buffer (full)
[16:35:12.791523] sendSTAT:195 STAT: STMf
[16:35:12.791630] process:533 strm
[16:35:12.791664] process_strm:281 strm command q
[16:35:12.791692] decode_flush:244 decode flush
[16:35:12.791718] output_flush:439 flush output buffer (full)
[16:35:12.791796] sendSTAT:195 STAT: STMf
[16:35:12.791858] process:533 setd
[16:35:12.791875] sendSETDName:254 set playername: Odroid-HDMI
[16:35:12.791897] process:533 setd
[16:35:12.791915] process:533 aude
[16:35:12.791929] process_aude:427 enable spdif: 1 dac: 1
[16:35:12.791949] process:533 audg
[16:35:12.791963] process_audg:445 audg gainL: 0 gainR: 0 adjust: 1
[16:35:12.791977] set_volume:233 setting internal gain left: 0 right: 0
[16:35:15.001319] process:533 strm
[16:35:15.001487] process_strm:281 strm command t
[16:35:15.001524] sendSTAT:195 STAT: STMt
[16:35:19.004515] process:533 strm
[16:35:19.004681] process_strm:281 strm command t
[16:35:19.004725] sendSTAT:195 STAT: STMt
[16:35:23.002284] process:533 strm
[16:35:23.002448] process_strm:281 strm command t
[16:35:23.002485] sendSTAT:195 STAT: STMt
[16:35:23.748180] process:533 strm
[16:35:23.748347] process_strm:281 strm command q
[16:35:23.748381] decode_flush:244 decode flush
[16:35:23.748410] output_flush:439 flush output buffer (full)
[16:35:23.748442] sendSTAT:195 STAT: STMf
[16:35:23.777650] process:533 audg
[16:35:23.777815] process_audg:445 audg gainL: 1937 gainR: 1937 adjust: 1
[16:35:23.777853] set_volume:233 setting internal gain left: 1937 right: 1937
[16:35:23.778213] process:533 strm
[16:35:23.778344] process_strm:281 strm command s
[16:35:23.778383] process_strm:353 strm s autostart: 1 transition period: 10 transition type: 0 codec: d
[16:35:23.778414] sendSTAT:195 STAT: STMf
[16:35:23.778514] codec_open:278 codec open: 'd'
[16:35:23.778799] connect_socket:237 connecting to 127.0.0.1:9000
[16:35:23.779080] stream_sock:923 header: GET /stream.mp3?player=98:ba:5f:18:e9:9c HTTP/1.0


[16:35:23.780284] sendSTAT:195 STAT: STMc
[16:35:23.780423] process_strm:389 set fade mode: 0, channels: 0, invert: 0
[16:35:23.780483] process:533 audg
[16:35:23.780512] process_audg:445 audg gainL: 1937 gainR: 1937 adjust: 1
[16:35:23.780541] set_volume:233 setting internal gain left: 1937 right: 1937
[16:35:23.799831] stream_thread:630 headers: len: 479
HTTP/1.1 200 OK
Server: Lyrion Music Server (9.0.2 - 1741501853)
Connection: close
Content-Type: audio/dsf
Set-Cookie: Squeezebox-albumView=; path=/
Set-Cookie: Squeezebox-expandPlayerControl=; path=/
Set-Cookie: Squeezebox-expanded-MY_MUSIC=; path=/
Set-Cookie: Squeezebox-expanded-FAVORITES=; path=/
Set-Cookie: Squeezebox-expanded-PLUGINS=; path=/
Set-Cookie: Squeezebox-expanded-PLUGIN_MY_APPS_MODULE_NAME=; path=/
Set-Cookie: Squeezebox-expanded-RADIO=; path=/


[16:35:23.800319] sendRESP:226 RESP
[16:35:23.893954] _read_header:192 id: DSD  len: 28 consume: 28
[16:35:23.894383] _read_header:159 DSF version: 1 format: 0
[16:35:23.894440] _read_header:169 channels: 2
[16:35:23.894476] _read_header:170 sample rate: 2822400
[16:35:23.894505] _read_header:171 lsb first: 1
[16:35:23.894533] _read_header:172 sample bytes: 68908896
[16:35:23.894562] _read_header:173 block size: 4096
[16:35:23.894590] _read_header:192 id: fmt  len: 52 consume: 52
[16:35:23.894621] _read_header:179 found dsd len: 137822220
[16:35:23.894651] dsd_decode:768 setting track_start
[16:35:23.894679] dsd_decode:821 DSD64 stream, format: DOP, rate: 176400Hz

[16:35:23.901613] output_thread:685 open output device: surround71:CARD=AMLAUGESOUND,DEV=0
[16:35:23.903529] alsa_open:354 opening device at: 44100
[16:35:23.912657] alsa_open:425 opened device surround71:CARD=AMLAUGESOUND,DEV=0 using format: S32_LE sample rate: 44100 mmap: 1
[16:35:23.914538] alsa_open:516 buffer: 40 period: 4 -> buffer size: 1764 period size: 441
[16:35:23.941175] _output_frames:65 start buffer frames: 438272
[16:35:23.941305] _output_frames:153 track start sample rate: 176400 replay_gain: 0
[16:35:23.941352] sendSTAT:195 STAT: STMs
[16:35:23.941552] sendSTAT:195 STAT: STMt
[16:35:23.951409] output_thread:685 open output device: surround71:CARD=AMLAUGESOUND,DEV=0
[16:35:23.951715] alsa_open:354 opening device at: 176400
[16:35:23.955421] alsa_open:425 opened device surround71:CARD=AMLAUGESOUND,DEV=0 using format: S32_LE sample rate: 176400 mmap: 1
[16:35:23.955735] alsa_open:516 buffer: 40 period: 4 -> buffer size: 7056 period size: 1764
[16:35:24.942722] sendSTAT:195 STAT: STMt
[16:35:25.944067] sendSTAT:195 STAT: STMt
[16:35:26.944792] sendSTAT:195 STAT: STMt
[16:35:27.000648] process:533 strm
[16:35:27.000863] process_strm:281 strm command t
[16:35:27.000913] sendSTAT:195 STAT: STMt
[16:35:28.002082] sendSTAT:195 STAT: STMt
[16:35:29.003387] sendSTAT:195 STAT: STMt
[16:35:30.015905] sendSTAT:195 STAT: STMt
[16:35:31.001284] process:533 strm
[16:35:31.001378] process_strm:281 strm command t
[16:35:31.001399] sendSTAT:195 STAT: STMt
[16:35:32.002489] sendSTAT:195 STAT: STMt
[16:35:33.003435] sendSTAT:195 STAT: STMt
[16:35:34.004248] sendSTAT:195 STAT: STMt
[16:35:35.005608] sendSTAT:195 STAT: STMt
[16:35:36.001723] process:533 strm
[16:35:36.001883] process_strm:281 strm command t
[16:35:36.001921] sendSTAT:195 STAT: STMt
[16:35:37.003086] sendSTAT:195 STAT: STMt
[16:35:38.003819] sendSTAT:195 STAT: STMt
[16:35:38.704144] process:533 audg
[16:35:38.704310] process_audg:445 audg gainL: 1937 gainR: 1937 adjust: 1
[16:35:38.704348] set_volume:233 setting internal gain left: 1937 right: 1937
[16:35:38.754824] process:533 audg
[16:35:38.754992] process_audg:445 audg gainL: 1369 gainR: 1369 adjust: 1
[16:35:38.755030] set_volume:233 setting internal gain left: 1369 right: 1369
[16:35:38.804874] process:533 audg
[16:35:38.805207] process_audg:445 audg gainL: 968 gainR: 968 adjust: 1
[16:35:38.805330] set_volume:233 setting internal gain left: 968 right: 968
[16:35:38.855014] process:533 audg
[16:35:38.855184] process_audg:445 audg gainL: 375 gainR: 375 adjust: 1
[16:35:38.855222] set_volume:233 setting internal gain left: 375 right: 375
[16:35:38.905220] process:533 audg
[16:35:38.905387] process_audg:445 audg gainL: 133 gainR: 133 adjust: 1
[16:35:38.905426] set_volume:233 setting internal gain left: 133 right: 133
[16:35:38.955342] process:533 audg
[16:35:38.955508] process_audg:445 audg gainL: 47 gainR: 47 adjust: 1
[16:35:38.955544] set_volume:233 setting internal gain left: 47 right: 47
[16:35:39.005526] process:533 audg
[16:35:39.005694] process_audg:445 audg gainL: 17 gainR: 17 adjust: 1
[16:35:39.005732] set_volume:233 setting internal gain left: 17 right: 17
[16:35:39.055391] process:533 audg
[16:35:39.055546] process_audg:445 audg gainL: 0 gainR: 0 adjust: 1
[16:35:39.055584] set_volume:233 setting internal gain left: 0 right: 0
[16:35:39.056244] sendSTAT:195 STAT: STMt
[16:35:39.056560] process:533 strm
[16:35:39.056658] process_strm:281 strm command p
[16:35:39.056698] sendSTAT:195 STAT: STMp
[16:35:39.056852] process_strm:319 pause interval: 0
[16:35:41.002098] process:533 strm
[16:35:41.002272] process_strm:281 strm command t
[16:35:41.002312] sendSTAT:195 STAT: STMt
[16:35:43.004492] slimproto_run:732 output timeout
[16:35:43.007063] output_thread:803 disabling output
[16:35:45.004205] process:533 strm
[16:35:45.004410] process_strm:281 strm command t
[16:35:45.004449] sendSTAT:195 STAT: STMt

I can see the parameters but can’t say if something is wrong.

Edit: At this point, I think I have to find a player only (without CoreElec) to instal in my Odroid to test with my AVC-X4800H.

After several months of research to successfully play DSD streams on Odroid N2+ (CoreElec/Squeezelite/LMS) connected via HDMI to Denon AVC-X4800H, I finally have a complete answer to my questions.

Short: It is not possible to play native DSD streams with the above configuration; it is a problem of incompatible hardware.
Long: For a detailed explanation, see the post here.

In summary, the player can only output a DSD stream on PCM (GoP) via HDMI. The Denon can only receive a native DSD stream encapsulated in HDMI, which is different from the previous one.

I hope this information will help other users.
Thank you all for your help.

thx for the info. Good to know.

Reading the linked explanation and “Practical ways forward” I just wanted to add the following options if you wanted to play along further with Coreelec and your LMS/Squeezelite setup:

  1. There seems to be a 3. Party plugin in LMS “DSDplayer” that can convert DSD to PCM

  2. It seems Squeezelite can convert DSD to PCM using the -D switch

  3. convert your DSD files to flac (if you just have a few this might be a good solution)

I have not tried either option, just found the info from the below links:

https://forums.lyrion.org/forum/user-forums/3rd-party-software/1636517-squeezelite-converts-dsd-to-pcm-despite-native-dsd-support

https://soundcheck-audio.blogspot.com/p/the-rpi-audio-streaming-series-dsd.html?m=1

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.