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

I struggle to understand the architecture, even after reading.
Could you confirm and comment:

  • squeezelite is a player, not a server.
  • I need to install a controller. To control the player, squeezelite, right?
  • The server will provide music files requested by the client. Is squeezelite the client as well?
  • The server should be installed in Kodi box where I have USB HDD, right? But what to install?
  • Is it possible to start to play a file from ssh to Kodi? I can’t see the command in “squeezelite -help”.

At this time, I can’t use a mobile device to control Kodi, I don’t have Bluetooth on it.
I really need your help! :confused:

Edit:
Maybe, I start to understand a bit.
from here

Lyrion Music Server (aka. LMS, fka. Logitech Mediaserver, SlimServer, SqueezeCenter, SqueezeboxServer, SliMP3) is the server software that powers audio players from Logitech (formerly known as SlimDevices), including Squeezebox 3rd Generation, Squeezebox Boom, Squeezebox Receiver, Transporter, Squeezebox2, Squeezebox and SLIMP3, and many software emulators like Squeezelite and SqueezePlay.

And from here

slimserver

Server for Squeezebox and compatible players. This server is also called Lyrion Music Server.

So 9 different names to call the same software !!!

Yes it is a client/server setup. Squeezelite is a very light software player, that just plays the music that is sent (pushed/streamed) to it by a required server, the LMS software. LMS and Squeezelite needs to be on the same network, one can be cabled Ethernet the other WIFI, it does not matter, they just need to able to talk to each other.

All of the “controlling” (*) of what plays happens trough the server = LMS that can be controlled in multiple ways:

  1. via the LMS webinterface directly where the LMS software is installed, i.e. on a pc
  2. via the LMS webinterface from a browser on a mobile phone/tablet connected to the same network
  3. from apps (talking to LMS) on a mobile phone/tablet connected to the same network

“Could you confirm and comment:”

  • squeezelite is a player, not a server. Correct, LMS = server

  • I need to install a controller. To control the player, squeezelite, right? Correct, you need LMS

  • The server will provide music files requested by the client. Is squeezelite the client as well? LMS will push/stream the music to squeezelite player.

  • The server should be installed in Kodi box where I have USB HDD, right? But what to install?
    I assume you have a pc, so I would start with installing LMS on that and try using the webinterface for controlling your music playback trough LMS. If you do that, you can have coreelec share your usb drive on your network, and point LMS to that music source or test it out with some music files directly on the pc.
    LMS is the only missing component required for you to play I.e. dsd music. Everything else is optional…
    If you down the line wanted to learn docker, you could install LMS docker software on the N2. This is considered more advanced and takes time/effort to learn

  • Is it possible to start to play a file from ssh to Kodi? I can’t see the command in “squeezelite -help”. *)That is possible, but that option is properly there to test if things work, extremely low WAF

“At this time, I can’t use a mobile device to control Kodi, I don’t have Bluetooth on it.”
if it is a smart phone, connected to your network, you can properly use it, but it is optional…

1 Like

Step by step, I’ll reach the target.
I forgot to tell; My computers are Linux Opensuse Leap 15.5, my tablet and phone are Samsung Android.
I try to install “logitechmediaserver” on my computer but it failed

Problem: 1: nothing provides 'perl-EV' needed by the to be installed logitechmediaserver-7.9.2_final-lp155.27.1.noarch

Then I can’t find what ‘perl-EV’ in the repos. I’ll ask in the Opensuse forum.

Edit: I succeeded to install logitechmediaserver but this is version logitechmediaserver-7.9.2_final-lp155.27.1.noarch
Moreover, it looks like I did it in a wrong way as I used “sudo zypper” to install the rpm.
Good or not good?

Edit2: I removed all the previous installed packages.
I am waiting for an answer on the Lyrion forum.
Meanwhile, I installed Squeezer on my android tablet and filled the IP address of the Odroid N2 where I installed Squeezelite.
When I start the app it says
Connecting to Logitceh Media Server at 192.168.1.106
but it fail.

I still can’t connect squeezer to tablet Squeezelite.
Could you try the following with the ip address of the device with Squeezelite and let me know the answer?

nmap "ip address"

On mine, I can’t see an open port for the player, AFAIK port 9000 should be default.