Kodi/Coreelec SACD/DSD/dsf support (continued)

Hello there,
I had reading in the forum about SACD, DSD, dsf support with Kodi/Coreelec but it apparently was not working one year ago in 2022.
What is the current state of this topic today?
And what about the new version 21?
Thank you to let me know.

In short, no change. Kodi still cannot bitstream DSD.

You can use something like squeezelite for music playback, it supports dsd etc.
I have a Logitech Media Server running in docker that plays to squeezelite on my coreelec device, controlled via web/mobile apps.

It’s a pity.
BTW, informations when playing a .dsf file are a bit weird.
IE1: 5.1 - 352.8kHz - 16934kbps - 8bit
IE2: 2.0 - 705.6kHz - 11290kbps - 8bit
Is the second value the sampling frequency?
Is the last value 8bit the true number of bits?
Where can check/change the conversion (DSD to LPCM) parameters?
Thanks

Thanks you for the info.
Could you give me more details, architecture, use case, about the hardware and software you use.
Do you use Coreelec as well, in the same time and what about movies?

I use an Odroid N2 (4GB)/coreelec 21 connected to a USB DAC (Naim v1). An Ubuntu server with Logitech Media Server and other services in docker compose, samba fileserver etc.

SW:
https://hub.docker.com/r/lmscommunity/logitechmediaserver
LMS Clients - Browse /squeezelite/linux at SourceForge.net (I use a manually downloaded version, there is also a coreelec addon containing squeezelite, but cannot remember if this version enables dsd playback)

I use coreelec/Kodi for videos. Kodi is configured to use the usb dac, no system sounds and to NOT keep audio alive to release ALSA soundcard (the dac) when not used. Squeezelite (started and conf. via autostart.sh) is also set to release ALSA soundcard/dac after 3 sec. To enable seamlessly switching between playing video sound and music to the usb dac.

The dac can verify “bitperfect” playback and display the correct kHz ie. playing dsd/flac files. LMS has a web interface, but I mostly use the mobile app IPeng to control music playback.

Read more about LMS setup and possibilities etc on https://forums.slimdevices.com/

Edit: removed seconds to keep audio alive in kodi. Just set to off.

Thanks a lot for all the info.
This is new for me, I started to read about docker, containers etc.
Let me know;
When you use your config, how do you switch between Kodi (video) and LMS (music)? Remote control? Kodi menu?
From Kodi or LMS, can you access the same USB external hard drive for music and video?
My Coreelec is on the emmc, I’ll try using a SD card. How big should be the card?

If you set it up as described there is no other action then playing/stopping a video in kodi or music using LMS/Squeezelite. Just wait a few seconds from stopping a video to play music (or vice versa) because either take full control of the ALSA soundcard, which is what you want for best audio and specifically to get by the limitations in kodi for dsd… Squeezelite runs in the background and only takes control of the soundcard when playing music, so whatever is doing that first plays. (As far as I know)

LMS can also run as ie. a windows app, and where files are located do not matter - you set this up as a path/source similar as in kodi, so harddisk size needed depends on how big your video/music collection is…

The Odroid N2 can run docker/docker compose services, so it could properly run it all on that device, that’s just a choice from my side, maybe your device can do that as well.

My config is:
Odroid N2+ + Coreelec 21 > HDMI > Denon AVR 5.0 > HDMI > TV

A friend of mine (not techy at all but audiophile) has a similar config to you
Odroid N2+ + Coreelec 21 => USB > DAC stereo > Stereo Ampli
=> HDMI > TV

So we both may be happy to play DSD natively.

I installed CE21 on a sd card then installed from menu Add-on, Docker and Media-tools that include Squeezelite v1.9.9-1449. I can read DSD in the help and

Build options: LINUX ALSA EVENTFD RESAMPLE FFMPEG VISEXPORT DSD LINKALL

I think I have now to configure.
I changed “Keep audio alive” to off
Could you provide the lines you added in autostart.sh?
What more?
Thanks again

Hi buddy
Thanks for helping getting dsd to work.
Can you please do a simple step by step instructions on getting it on ce21.
Many thanks.

My autostart.sh placed in the .config folder looks like below. You have to change the path to where you have squeezelite. The value after C is the seconds it keeps the soundcard alive. edit the value -o hw:CARD=“” to your soundcard. You should be able to find that by typing aplay -l or squeezelite -l (maybe easier) in a SSH session, See coreelec:ssh [CoreELEC Wiki].
I am not sure you need to specify the soundcard if you are using the default audio device using the -o variable. You can also try without “hw:” In front of it… you have to troubleshoot this yourself, it is using ALSA for sound, so google it with your soundcard if needed. You can also find more help for squeezelite in the LMS forum, I already linked to.


#!/bin/sh
# Start SqueezeLite on the audio output device.
(
sleep 20
exec /storage/downloads/squeezelite/squeezelite -C 3 -o hw:CARD=Audiophilleocom,DEV=0
)&

After this and a reboot you have squeezelite configured and it should show up as a device in LMS that you can play your music to. You might have to check the LMS config to ensure DSD is enabled there, but go trough the options when you set this up to point to your music files. The LMS forum has all the help needed for this and more. You can find a lot of extra addons there too.

EDIT: fixed and added a few things to hopefully make it more clear.
EDIT2: @MrNice if your n2+ has the same built in sound as my n2, I would assume you should use -o hdmi:CARD=AMLAUGESOUND,DEV=0 for squeezelite. Added info about using squeezelite -l to list audio output devices, (maybe easier)

I had a big issue with my Denon AVR2313. I had to order electronic components in China and change 1 integrated circuit and 4 diodes. Now the AVR works fine again. I am back to have working DSD passthrough.

I created a autostart.sh file

# cat .config/autostart.sh
#!/bin/sh
# Start SqueezeLite on the audio output device.
(
sleep 20
exec /storage/downloads/squeezelite/squeezelite -C 3 -o hdmi:CARD=AMLAUGESOUND,DEV=0
)&

Unfortunately not working. I tried as well without the option -o. Nothing better.
log says

# grep Player /storage/.kodi/temp/kodi.log
2024-05-15 18:52:42.964 T:3828     info <general>: Default Video Player: VideoPlayer
2024-05-15 18:52:42.964 T:3828     info <general>: Default Audio Player: paplayer
2024-05-15 18:52:43.875 T:3828     info <general>: RetroPlayer[RENDER]: Registering renderer factory for OpenGLES
2024-05-15 18:56:58.352 T:4172     info <general>: PAPlayer::PrepareStream - Ready
2024-05-15 18:57:54.625 T:4186     info <general>: PAPlayer::ProcessStream - Stream Finished

Could you post the return of your, I’ll know what I should expect.

grep Player /storage/.kodi/temp/kodi.log

Do you want a full kodi.log?

Unless you manually placed squeezelite the same place I did, your path is wrong…

Try using the find command to find where your squeezelite is located when installed through the addon:

find /storage/ -name squeezelite

After that, check the output of

/replace with path from find/squeezelite -l

If your AVR shows up as a specific soundcard use that instead of the internal I suggested and update your autostart.sh with path to squeezelite and soundcard if needed.

I was thinking your path was the default install.

 find /storage/ -name squeezelite
/storage/.kodi/addons/virtual.multimedia-tools/bin/squeezelite

# /storage/.kodi/addons/virtual.multimedia-tools/bin/squeezelite -l
Output devices:
  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

# cat .config/autostart.sh
#!/bin/sh
# Start SqueezeLite on the audio output device.
(
sleep 20
exec /storage/.kodi/addons/virtual.multimedia-tools/bin/squeezelite -C 3 -o surround71:CARD=AMLAUGESOUND,DEV=0
)&

I tried with option;
-o hdmi:CARD=AMLAUGESOUND,DEV=0
-o surround71:CARD=AMLAUGESOUND,DEV=0
-o default:CARD=AMLAUGESOUND

I always get

# grep Player /storage/.kodi/temp/kodi.log
2024-05-16 19:33:28.345 T:3824     info <general>: Default Video Player: VideoPlayer
2024-05-16 19:33:28.345 T:3824     info <general>: Default Audio Player: paplayer
2024-05-16 19:33:29.222 T:3824     info <general>: RetroPlayer[RENDER]: Registering renderer factory for OpenGLES
2024-05-16 19:33:48.915 T:3888     info <general>: PAPlayer::PrepareStream - Ready
2024-05-16 19:34:20.199 T:4083     info <general>: PAPlayer::PrepareStream - Ready
2024-05-16 19:38:49.882 T:4230     info <general>: PAPlayer::PrepareStream - Ready
2024-05-16 19:38:53.019 T:4228     info <general>: PAPlayer::ProcessStream - Stream Finished
2024-05-16 19:40:03.769 T:4228     info <general>: PAPlayer::ProcessStream - Stream Finished

I tried to find more info on slimdevices.com but got nothing.
Do you use the stock skin? What do you see in the bottom right corner what you play a dsf file?
More over when I play dsf file my AVR displays 192kHz. No passthrough.
I don’t know why it’s not working as your

So far so good… Whether you should use the surround71 or hdmi option for the soundcard, I do not know, but would assume hdmi if that is how you have your avr connected. Remember to reboot when changing autostart.sh.

squeezelite will not output any logs to the Kodi.log (to my knowledge)

I think your squeezelite is ready to play music, but you need to do that from Lyrion/Logitech Media Server, it seems like you have not set that up yet?
(Remember that Kodi is not used to play music files, and this is because you wanted to play dsd files, which Kodi cannot bitstream as stated in the beginning of this thread…)

I can see that the LMS files are now available here Getting Started with LMS - Lyrion Music Server
(logitech has stopped support for it, but it is community supported still - I think this happened recently, so maybe some of the documentation needs updating)

So if you have a windows pc, download the files for windows or choose your platform, and follow the setup wizard…

for ref.

https://wiki.slimdevices.com/index.php/Logitech_Media_Server

https://lyrion.org/players-and-controllers/#software-based-players

Squeezebox for Kodi (Addon for controlling LMS music playback in Kodi, I think it is not supported anymore, never used it)

Edit: for clarity/added notes and link