Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DietPi-Software | Allo Web Gui - SqueezeLite DSD - DoP KO #2386

Open
volpone opened this issue Jan 2, 2019 · 11 comments · Fixed by #3635
Open

DietPi-Software | Allo Web Gui - SqueezeLite DSD - DoP KO #2386

volpone opened this issue Jan 2, 2019 · 11 comments · Fixed by #3635

Comments

@volpone
Copy link

volpone commented Jan 2, 2019

Required Information:

  • DietPi version: 6.19.7 master
  • Distro version: stretch
  • Kernel version: Linux USBridge 3.10.38
  • SBC device: Sparky SBC (armv7l)

Steps to reproduce:

  • Using T+A DAC8DSD (Amanero USB, DoP only, no native DSD with Linux) and also same behavior with RME ADI-2 DAC
  • Using Allo Web Gui
  • Web Gui SqueezeLite output is set to [DSD Native Output:] "disabled"
  • Playing DSF64 from LMS 7.9.2 (DSDPlayer plugin not activated, LMS Settings Advanced > File Types > DSF/DFF set to "native")
  • SqueezeLite DSD output to my DAC is converted to PCM vs expected DoP encapsulated
  • DACs play PCM
  • more /etc/systemd/system/squeezelite.service:
[Unit]
Description=squeezelite
[Service]
Type=simple
ExecStart=/usr/bin/squeezelite -a 4096:8096:32:0 -C 5 -n 'DietPi-Squeezelite' -f /var/log/squeezelite.log
  • SqueezeLite option -D (or -D :dop) is not set so, according to SqueezeLite manual, DSD is converted to PCM.

Expected behaviour:

Allow SqueezeLite DSD DoP output via -D option:
ExecStart=/usr/bin/squeezelite -a 4096:8096:32:0 -C 5 -n 'DietPi-Squeezelite' -f /var/log/squeezelite.log -D (or -D :dop)

OK confirmation SqueeLite launched manually from:
/usr/bin/squeezelite -D -a 4096:8096:32:0 -C 5 -n 'DietPi-Squeezelite' -$
or
/usr/bin/squeezelite -a 4096:8096:32:0 -C 5 -n 'DietPi-Squeezelite' -$ -D :dop
Bingo, my DACs play DSD (DoP) !

Extra details:

DSD Native output seems OK via current Allo Web Gui (-D :u32le|u32be), see #1237; not tested because my DACs doesn't support DSD native.

FYI Usage: squeezelite v1.8.7-1020 [options]
...

-D [delay][:format] Output device supports DSD, delay = optional delay switching between PCM and DSD in ms
format = dop (default if not specified), u8, u16le, u16be, u32le or u32be.

@volpone
Copy link
Author

volpone commented Jan 3, 2019

Perhaps the best way is to modify Allo Web Gui "DSD Native Output" UI dropdown selector and add a new DoP option:

- Disabled:: unchanged (PCM output) -> No -D option
- DoP : add this new option to allow DoP Output -> -D :dop
- u8 | u16le | u16be | u32le | u32be : unchanged (native DSD output) -> -D :u8|u16le|u16be|u32le|u32be

Change UI and help tool tip wording:
"DSD Output:" vs "DSD Native Output:"

  • Disabled: DSD is converted to PCM
  • DoP: DSD is sent as DoP
  • All other values ...: Native DSD (unchanged wording)

@Fourdee
Copy link
Collaborator

Fourdee commented Jan 3, 2019

@volpone

Hi many thanks for the report/request 👍

We'll open for investigations.

@volpone
Copy link
Author

volpone commented Jan 3, 2019

Thank's Dan,
IMHO it is an important limitation to overcome and not an additional "feature request".
DoP output is currently unavailable, and for a lot of users DoP is the only way to feed DSD DACs.
Native DSD output = "Disabled" option output PCM and not DoP DSD

@sparkysbc
Copy link
Contributor

sparkysbc commented Jan 23, 2019

vim /var/www/allo/resources/views/frontend/squeezelite_settings.blade.php
line 229 added below line for dop
<option value = "dop" >dop

image

@volpone
Copy link
Author

volpone commented Jan 23, 2019

Thank's @sparkysbc ! Good addition.

Seems OK with current Squeezelite version used with DietPi (v1.8.7-1020)
However, last SqueezeLite version (currently not used with DietPi) seems to handle differently -D options. See: https://ralph-irving.github.io/squeezelite.html

-D [delay]
Output device supports DSD over PCM (DoP). DSD streams will be converted to DoP before output. If this option is not supplied, DSD streams will be converted to PCM and resampled, so they can be played on a PCM DAC. Delay is an optional time to wait when switching between PCM and DoP between tracks, in milliseconds.

If Squeezelite is upgraded to the last version (2018-05-23) not sure -D :dop still a supported option ?

@MichaIng MichaIng added this to the v6.24 milestone May 1, 2019
@MichaIng
Copy link
Owner

MichaIng commented May 1, 2019

@volpone
I just checked pre-compiled binaries from: https://sourceforge.net/projects/lmsclients/files/squeezelite/linux/

First I accidentally downloaded the pulse version, which indeed shows (after installing pulseaudio):

root@VM-Stretch:/tmp# ./squeezelite -?
...
Squeezelite v1.9.1-1137, Copyright 2012-2015 Adrian Smith, 2015-2019 Ralph Irving. See -t for license ...
  -D [delay]            Output device supports DSD over PCM (DoP), delay = optional delay switching between PCM and DoP in ms

Then I downloaded the non-pulse version:

root@VM-Stretch:/tmp# ./squeezelite -?
Squeezelite v1.9.1-1137, Copyright 2012-2015 Adrian Smith, 2015-2019 Ralph Irving. See -t for license terms
...
  -D [delay][:format]   Output device supports DSD, delay = optional delay switching between PCM and DSD in ms
                         format = dop (default if not specified), u8, u16le, u16be, u32le or u32be.

So the man page seems to be related to the pulse version which seems to only allow switching between native DSD (no argument) and DoP (-D).
However both binaries can simply be used with -D since: format = dop (default if not specified)

I already wanted to simply overwrite our binaries with the v1.9 ones but found the enormous difference in size:

-rwxrwxr-x 1  501  501 2642416 Mar 18 15:36 squeezelite # from SourceForge
-rwxr-xr-x 1 root root  144512 Nov 30  2017 squeezelite_amd64 # from dietpi.com

The argument could be added/removed by adding/removing /etc/systemd/system/squeezelite.service.d/dietpi-dop.conf drop-in config which overrides the ExecStart= or environment file, e.g. /etc/default/squeeselite which contains a DOP='' variable and if already there an OPTIONAL_ARGS='' so users can further customize.

  • So this can be used/toggled by Allo GUI then but of course as well when installing SqueezeLite as standalone application, adding the info about this to our online docs.

@Fourdee
Which magic did you use to create such tiny binaries? Or is it some compile time option (e.g. ffmpeg and such) which raise the size?
Recompiling could be done but IMO is not critical since above request/issue can be solved with v1.8.7 as well.

I found code to remove an init.d service and purge a package when uninstalling SqueezeLite in DietPi-Software. Did we ship this via APT package? "Blame" does not work on dietpi-software since, I guess, the script is too large. Just face the angry Unicorn that page loading takes too long 😆.
... Answered it myself: https://packages.debian.org/stretch/squeezelite

  • Sadly even on Buster and Sid there is no current version shipped by Debian.

@volpone
Copy link
Author

volpone commented May 2, 2019

Thank's @MichaIng !

@MichaIng MichaIng modified the milestones: v6.24, v6.25 May 15, 2019
@volpone
Copy link
Author

volpone commented May 30, 2019

@MichaIng, some hope next DiePi release will include latest SqueezeLite ?.
Current version (1.8.7) is quite old.
Thank you.

@MichaIng
Copy link
Owner

@volpone
It's on the list, see milestone 🙂.

@volpone
Copy link
Author

volpone commented May 30, 2019

Great @MichaIng !

@MichaIng MichaIng modified the milestones: v6.25, v6.26 Jun 24, 2019
@MichaIng MichaIng modified the milestones: v6.26, v6.27 Sep 3, 2019
@MichaIng MichaIng modified the milestones: v6.27, v6.28 Nov 13, 2019
@MichaIng MichaIng modified the milestones: v6.28, v6.29 Jan 3, 2020
@MichaIng MichaIng modified the milestones: v6.29, v6.30 Mar 19, 2020
@MichaIng MichaIng modified the milestones: v6.30, v6.31 May 10, 2020
@MichaIng
Copy link
Owner

MichaIng commented Jun 30, 2020

New squeezelite 1.9.7 packages are ready for testing:

systemctl disable --now squeezelite
mv /etc/systemd/system/squeezelite.service{,_bak}
cd /tmp
wget https://dietpi.com/downloads/binaries/$G_DISTRO_NAME/squeezelite_$G_HW_ARCH_NAME.deb
apt install ./squeezelite_$G_HW_ARCH_NAME.deb
rm squeezelite_$G_HW_ARCH_NAME.deb
  • SSL support has been additionally enabled, OPUS would be additionally possible and especially for RPi there is GPIO support possible. Let me know if you think it should be compiled in. For now its like the Debian packages + SSL.
  • The service runs now as own user "squeezelite", so especially check if any permissions are missing. It is added to "audio" group, so generally audio device access is granted.
  • Logging to file has been disabled btw. Generally I prefer to use logging to journal where possible since journald is running anyway and is a native RAMlog. Logs are available hence via: journalctl -u squeezelite

Allo web GUI support for switching native DSD will be at latest added with next DietPi release, but this one is in beta stage already.

MichaIng added a commit that referenced this issue Jun 30, 2020
+ CHANGELOG | SqueezeLite: Updated to v1.9.7 and the service runs now as own user "squeezelite". Many thanks to @volpone for doing the update request: #2386
@MichaIng MichaIng mentioned this issue Jul 2, 2020
@MichaIng MichaIng modified the milestones: v6.31, v6.32 Jul 2, 2020
@MichaIng MichaIng modified the milestones: v6.32, v6.33 Aug 27, 2020
@MichaIng MichaIng modified the milestones: v6.33, v6.34 Oct 2, 2020
@MichaIng MichaIng modified the milestones: v6.34, v6.35 Nov 28, 2020
@MichaIng MichaIng modified the milestones: v7.0, v7.1 Feb 14, 2021
@MichaIng MichaIng modified the milestones: v7.1, v7.2 Apr 14, 2021
@MichaIng MichaIng modified the milestones: v7.2, Planned for implementation Apr 29, 2021
@MichaIng MichaIng removed this from the Planned for implementation milestone May 27, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
4 participants