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:
    squeezelite 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
 
  • Built minimal  RT kernel (patched with patches-3.10.104-rt118, with performance governor default and  USB audio gadget support
  • 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 squeezebox2 user to set screen brightnesecho 362 > /sys/class/gpio/export && chgrp squeezebox2 /sys/class/gpio/export && chmod 220  /sys/class/gpio/exportsleep 1echo out > /sys/class/gpio/gpio362/direction && chgrp squeezebox2 /sys/devices/soc.0/1f02c00.pinctrl/gpio/gpio362/direction && chmod 664 /sys/devices/soc.0/1f02c00.pinctrl/gpio/gpio362/directionsleep 1chgrp squeezebox2 /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:
  • Included LCD screen backlight off/on to:
    BlankScreenSaverApplet.lua
  • Tried tuning src/jive.h to smooth-out text scrolling by changing value from 30 Hz to 28 Hz (as Pine64 screen refresh rate is fixed at 56 Hz).
Code:
/* target frame rate 14 fps (originally) - may be tuned per platform, should be /2 */
/* max effective rate of scrolling on a fab4 is 22 */
int jive_frame_rate(void);

#define JIVE_FRAME_RATE jive_frame_rate()
#define JIVE_FRAME_RATE_DEFAULT 28
(Text-scrolling still not smooth)



Working:
  • System boots
  • Squezelite loads
  • Jivelite loads
  • Joggler skin mostly looks nice at 1024x600 resolution
  • Grid Skin 800x480 mostly looks nice at 1024x600 resolution (don't know why)
  • 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.


Not yet implemented:
Not yet tested:
  • Connection to USB DAC (No DAC available in testbed environment)
  • therefore no playback with audio output (audio test)
  • Assessment of snd-usb-audio / g_audio (gadget)
  • File and stream types, including high bitrate PCM (over 24/192) and DSD (rate limits).

Known issues:
  • Jivelite scrolling text is jumpy and ugly
  • Some screensavers (analog clock) not optimised for 1024x600 resolution.
  • VU Meters not working
  • Now-playing screen cycling gets stuck after multiple touches.
  • 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 "exit" button in jivelite UI not functional. 

Files available at:
https://drive.google.com/open?id=0B1XH4Y...3hibkJ4QU0


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


Possibly Related Threads...
Thread Author Replies Views Last Post
Information Pine64 Head Unit Zoidiano0 86 11,283 02-20-2017, 06:48 AM
Last Post: Math43
Lightbulb DIY Alexa on PINE64 antonelli 7 1,442 02-03-2017, 07:08 AM
Last Post: rookieone
  Pine64 as NAS/Media Server VandaL.pr! 1 469 12-27-2016, 10:48 AM
Last Post: Luke
  Pine64 E-ink screen - Android projectileobjects 0 200 12-19-2016, 03:28 PM
Last Post: projectileobjects
  Pine64 as Flightaware ADS-B Monitor VAAviator 1 285 11-06-2016, 10:23 PM
Last Post: tllim
  Pine64 as Security Camera / Baby Monitor utdrmac 1 480 11-02-2016, 05:38 PM
Last Post: dkryder
  Domoticz + PINE64 Z-Wave Module + Open Z-Wave klliew 1 702 10-30-2016, 10:14 AM
Last Post: ltorsini
  Creating a phone with the Pine64 and need a bit of help CHAOZM4 4 596 09-24-2016, 01:21 PM
Last Post: ltorsini
  Is Pine64 good for Ethereum? kermitas 10 908 09-09-2016, 09:35 AM
Last Post: ltorsini
  Pine64 and UFO/wild animals observations. kermitas 3 324 09-02-2016, 12:17 PM
Last Post: Ghost

Forum Jump:


Users browsing this thread: 1 Guest(s)