Getting Started | Visit the WIKI | IRC Logs | Forum Rules/Policy


Pine64 as squeezebox touch replacement
#1
Hi,

   This is a copy of a thread that I posted on the Slimdevices forums.

For those of you who don't already know, the Squeezebox Touch was part of a family of devices developed by Slimdevices and later bought by Logitech.

The provided high audio quality output at very reasonable price and could play a large number of formats from a number of sources, including local archives and online streaming services and were highly configurable.

Unfortunately the line was discontinued by Logitech in 2012.

The Squeezebox Touch was introduced in 2010 and could output high bit-rate digital streams in audiophile quality, over COAX, optical fibre or USB, in addition to its own, builtin DAC, which could handle standard bit-rate and output stereo analogue in high quality.

The server-side "Logitech Media Server" and much of the player software was open-sourced when the products were discontinued and there is a lively community effort, keeping the project alive. Code exists to clone the squeezebox touch functionality to a number of devices, including a range of "Pi"s.  The Pine64 has not been supported up to now.

The Pine64 hardware is well suited as it has ample processing and RAM headroom and dedicated USB ports , directly hardwired to the SoC and an independent bus dedicated to the Gb Ethernet port (if we discount the LCD screen).  It is also much cheaper than competing products.

I'm sharing my work here, in the hope that someone might find it useful and that others will join me in making the Pine64 one of the best choices for a Squeezebox-Touch replacement.

Although my system will output to a USB DAC and connect to Ethernet network only, it would be relatively easy to connect a DAC HAT for analogue output and include wifi.

Hardware spec:

Pine64+ (2GB) with official LCD screen and C4 labs surround

Modified surround:
  • glued screen into front bezel
  • countersunk m3, flathead bolts
  • ordered custom aluminium stand to hold device in "alarm-clock" position (not yet delivered/mounted)
  • 5v Power supply through EULER connection pins

Planned mod (not yet implemented):
Base system:  Armbian pine64 legacy / Ubuntu Xenial Desktop on Samsung Evo+ 32GB

  • apt installed:
    libsdl2-dev libsdl1.2-dev liblua5.1-dev liblua5.2-dev libluajit-5.1-dev libsdl-image1.2-dev libsdl-ttf2.0-dev libsdl-gfx1.2-dev libexpat1-dev libtool libtool-bin liblua5.4-dev liblua5.3-dev
  • apt removed:
    blueman bluez bluex-obexd bluez-tools bluetooth libreoffice* openoffice.org-hyphenation firefox:armhf
LIST]
[*]built and installed squeezelite from
[URL="https://github.com/marcoc1712/squeezelite-R2/tree/Play_DSD_decoded_by_Mansr_sox"[/URL]
(This version is necessary if you - like me - require native DSD output. DoP should work with pre-packaged verion of squeezelite)
Many thanks to Marco Curti for DSD work.
[/LIST]
 
  • Built minimal  kernel, with performance governor default, removed builtin snd_usb_audio and hid and compiled as loadable modules (necessary for DAC detection).
  • Much removed: including Wifi, Bluetooth, Filesystems and network protocols that I will not used.
  • dpkg installed using technique described at:
    https://www.armbian.com/pine64/ > Kernels > Default

jivelite-autoload:
  • Modified /etc/default/nodm to disable mouse cursor:
    # Options for the X serverNODM_X_OPTIONS='-nolisten tcp -nocursor'


Enable GPIO pin and allow to accept input from autologin user (for jivelite screensaver):
  • edit /etc/rc.local -
    #allow squeezer user to set screen brightnesecho 362 > /sys/class/gpio/export && chgrp squeezer /sys/class/gpio/export && chmod 220  /sys/class/gpio/exportsleep 1echo out > /sys/class/gpio/gpio362/direction && chgrp squeezer /sys/devices/soc.0/1f02c00.pinctrl/gpio/gpio362/direction && chmod 664 /sys/devices/soc.0/1f02c00.pinctrl/gpio/gpio362/directionsleep 1chgrp squeezer /sys/devices/soc.0/1f02c00.pinctrl/gpio/gpio362/value && chmod 664 /sys/devices/soc.0/1f02c00.pinctrl/gpio/gpio362/valueexit 0
  • Created ~/.xsessionrc for autologin user:
    #!/bin/shsleep 2 && exec /opt/jivelite/bin/jivelite #sleep to allow LCD backlight settings to take effect



Modified jivelite:
  • resized some wallpapers to 1024x600 resolution and modified wallpaper loader
  • Included LCD screen backlight off/on to:
    BlankScreenSaverApplet.lua
  • Tuned text scrolling by changing refresh rate and scrolling values, for smoother scroll.
Working:
  • System boots
  • Squezelite loads
  • Jivelite loads
  • 1024x600 skins mostly look nice (much work done by Ralphy since this thread was first announced).  Thanks to Ralphy
  • Connects to LMS running in local network
  • "Plays" local and streaming content.
  • Blank screensaver works well and turns off LCD backlight
  • Touchscheen works well if jivelite runnning in context of autologin user
  • Gb ethernet works well and correctly.
  • PCM playback tested and working up to 24b@384k


Not yet implemented:
  • USB audio out tweaks as discussed at:
  • https://ubuntuforums.org/showthread.php?t=1608913
  • working, fully patched RT kernel (reverted to standard, low latency kernel)
  • 3.13 USB improvements patch backported to 3.10.104
  • PWM management of LCD backlight brightness


Known issues:
  • Jivelite scrolling text is still slightly jumpy.
  • Some screensavers (analog clock) not optimised for 1024x600 resolution.
  • Some graphics not positioned correctly on 1024x600 resolution
  • Can't get touchscreen to work if loading jivelite as root (even with tslib_test behaving correctly and loading with tslib environment variables)
  • Jivelite splashscreen not correctly centered when running in context of autologin user (looks better when loading from root shell).
  • Top LH "stop" button in jivelite UI works, but if a "stop" screensaver is configured, touch does not wake the screen  
  • DSD (native) playback is being silently converted to PCM on my system due to non-XMOS dac and (probably) kernel 3.10  It still sounds good, but this is not native DSD. I have ordered a XMOS DAC and will look at ways to backport the native DSD support from a later kernel if Armbian can't supoort the LCD on 4.x before I'm done.

32GB sdcard image
pwd: Pine64

You will need to have a Logitech Media Server (LMS) running on your network to use the player.
http://downloads.slimdevices.com/nightly/?ver=7.9

7.9 "BETA" has been stable for me


LMS can also be installed on the Pine64 if necessary, but might  steal resources from the player.
Reply
#2
Interesting project :-)

As Tl Lim pointed out there is also a ESS based Pine DAC topcard in the pipeline, but no release date yet...
Come have a chat in the Pine A64 IRC channel >>
Reply
#3
Thanks, and I have pin your post.
Reply
#4
Update:

Latest jivelite supports 1024x600 resolution out of the box. No patching required.
1024x600 wallpapers and patch now available on Google Drive
You will still need to patch the BlankScreensaver applet to turn off the LCD when blank.
Reply
#5
New kernel deb's and DSD-capable squeezelite compiled from:
https://github.com/marcoc1712/squeezelit..._Mansr_sox

thanks to Marco Curti

on google drive.

Tested with new kernel and squeezelite, bit-perfect playback of PCM up to 384k@32bit. There are issues with the 3.10 kernel and native DSD: WIP


Notes:http://forum.pine64.org/editpost.php?pid=25804
  • The previous kernel had issues finding the DAC due to SND_USB_AUDIO and HID support being compiled in rather than modular, so you will need to replace the kernel if your DAC is not picked up.
  • DSD Native will probably not work with 3.10 kernel, but DoP should still be possible.

Main thread updated.
Reply


Possibly Related Threads...
Thread Author Replies Views Last Post
  PINE64 + mini OLED display + Luma.OLED = PINEimus Prime sgjava 4 181 04-20-2017, 05:45 PM
Last Post: sgjava
Information Pine64 Head Unit Zoidiano0 95 15,074 03-28-2017, 09:30 AM
Last Post: dikov
  Turn your Pine64 into a music server with mpd JulianM 2 1,189 03-23-2017, 10:50 PM
Last Post: tllim
  How to setup VNC on your Pine64 (Debian, SSH, headless) pine64nutz 17 6,554 03-13-2017, 07:27 AM
Last Post: Unclean0ne
Lightbulb DIY Alexa on PINE64 antonelli 8 2,130 03-09-2017, 04:53 AM
Last Post: rookieone
  Pine64 as NAS/Media Server VandaL.pr! 1 826 12-27-2016, 10:48 AM
Last Post: Luke
  Pine64 E-ink screen - Android projectileobjects 0 564 12-19-2016, 03:28 PM
Last Post: projectileobjects
  Pine64 as Flightaware ADS-B Monitor VAAviator 1 438 11-06-2016, 10:23 PM
Last Post: tllim
  Pine64 as Security Camera / Baby Monitor utdrmac 1 659 11-02-2016, 05:38 PM
Last Post: dkryder
  Domoticz + PINE64 Z-Wave Module + Open Z-Wave klliew 1 1,017 10-30-2016, 10:14 AM
Last Post: ltorsini

Forum Jump:


Users browsing this thread: 1 Guest(s)