This branch holds all the code used to package an installer for the RaspDacMini LCD.
Make sure you are using the LCD version of the RaspDacMini. None of this will work on the previous OLED version (see picture below if you have any doubt).
If you need to work on a version with an OLED display, you should go there instead.
If you are a regular user with a RaspDacMini LCD who seeks to have the display & remote working after a first install, this is not the right place for you. The easy and fast way to achieve this is to use a precompiled patch archive.
The point of this repo is to provide a way to rebuild the customizations if for whatever reason you lost the display / remote / SPDIF support after a software update and the pre-built patch does not work anymore on the newly updated distribution. You can also use this branch as a work basis when porting the display to new hardware (the fbcp-ili9341 driver used here supports others LCD display).
The RDMLCD uses different pieces of software (pink) to make use of its specific hardware (red).
flowchart BT
DAC["DAC CHIP ES9038Q2M<br>(Audio output)"]
DISTRIBUTION{"Distribution <br> (moOde, Volumio)"}
GRAPHICS(Graphics Renderer)
DRIVER(FBCP-ILI9341)
DISPLAY["ILI9341 DISPLAY"]
LIRC("LIRC + IREXEC")
IR["InfraRed Receiver"]
APESSQ2M("Shell wrapper<br>for DAC / ALSA")
GRAPHICS --> |"Basic functions <br>(blank,poweroff) <br>through RPIO"| DISPLAY
DRIVER -->|"Draws image on<br> display through SPI"| DISPLAY
IR --> LIRC
LIRC -->|"Translates remote inputs <br>as streamer commands"| DISTRIBUTION
GRAPHICS -->|"Renders image<br>for display"| DRIVER
GRAPHICS -->|"Gets DAC<br> state"| APESSQ2M
APESSQ2M -->|"ALSA"| DAC
GRAPHICS -->|"Gets streamer<br> state"| DISTRIBUTION
DISTRIBUTION -->|"MPD + ALSA"| DAC
style DRIVER stroke:#f700f7,stroke-width:3px
style APESSQ2M stroke:#f700f7,stroke-width:3px
style GRAPHICS stroke:#f700f7,stroke-width:3px
style LIRC stroke:#f700f7,stroke-width:3px
style DAC stroke:#f70000,stroke-width:2px
style DISPLAY stroke:#f70000,stroke-width:2px
style IR stroke:#f70000,stroke-width:2px
The goal of this patch compiler is to provide an archive containing everything needed to have the right software (pink elements) at the right place in the distribution you picked. The method vary largely depending on what is available through the package manager of the distribution.
FBCP-ILI9341 is the (awesome) driver in charge of using the SPI bus to provide a smooth and nice image on the display. Here is the source repository for the project if you want to know more about it.
rdmlcdfb
in charge of running the whole set of commands needed to have the display framebuffer running properly and hiding the console at boot.
The Graphic Renderer is a nodeJS app using node-canvas (a wrapper for Cairo surface) to render a real-time image representing the Streamer current state (what you see on the display).
The LIRC + IREXEC section mainly consists of providing a script for automatic installation of LIRC & IREXEC binaries on the distribution through package manager. It also creates an archive containing the configuration files to allow LIRC to work with the remote we provided with the RDMLCD. All of this is done here.
The Shell wrapper for DAC / ALSA includes :
apessq2m
.Which translates in code as :
# Get the source files
wget -O patch_compiler.tar.gz https://github.com/audiophonics/RaspDacMinilcd/archive/patch_compiler.tar.gz
# Extract the archive
tar -xvzf patch_compiler.tar.gz
# Enter directory
cd RaspDacMinilcd-patch_compiler
# install build dependencies (this command is interactive and will ask for a target distribution)
# When workin on Volumio, this needs sudo.
uname -a | grep -q volumio && sudo sh install_dependencies.sh volumio || sh install_dependencies.sh
# build all components as a single archive (this command is interactive and will ask for a target distribution)
uname -a | grep -q volumio && sudo sh build_all.sh || sh build_all.sh
I left in this repo a couple scripts to be used as build tools. At the root of this project are the following scripts :
install_dependencies.sh
: installing toolchains and dependencies for compiling all the RDMLCD components.build_all.sh
: building all components in a directory named release.clear.sh
: remove all previously built components.packsources.sh
: use this after modifying the source code to get an archive with all the contents of the patch_compiler directory (do not forget to run clear.sh before doing this or the resulting archive will be 2x heavier than it should).
If you want to (re)build a single specific component, you can instead go to the corresponding directory and run the build.sh
which will create its own local release subdirectory.
If you are targeting a build for moOde Audio, you should use the 64-bit version which will yield a patch compatible with both 32-bit and 64-bit versions. You can build on a 32-bit legacy moOde but the resulting binaries will only run on 32-bit moOde distributions.
When building the patch with build_all.sh
command you can pick either volumio
or plugin_vol
as a target.
volumio
will yield an installer for a stand-alone version of this package. It means the resulting scripts will run along (but not within) the main Volumio service and no configuration options will be available from the main Volumio WebUI. This version will try to overwrite the DAC settings during installation.plugin_vol
will yield a Volumio Plugin with pre-built binaries into the vol_plugin subdirectory. You can either tar the whole directory or run volumio plugin package
to obtain an archive of the plugin. The plugin version allows the user to change / enable some parameters from the Volumio WebUI. However it will not try to apply any automatic configuration for the DAC output and MPD settings (so the user should be the one dealing with that). If you cannot decide whether you need a standalone or a plugin version of this installer for Volumio, use the following rule of thumb : the standalone version is the best option for static systems (rare or no updates) where the user is expected to do as little configuration as possible. On the other hand the plugin version is more robust against system updates and require the user to follow the Volumio configuration wizard.
Still a work in progress.
Before you attempt doing anything with this branch, you should try a precompiled patch. Pick the correct distribution and follow the instructions given by the link :