Important note:

I've switched from OpenELEC to LibreELEC. New LibreELEC builds are available from here:
http://www.horus.com/~hias/libreelec-cirrus.html
Please update your bookmarks.

Archived "HiassofT" OpenELEC RPi builds

Here are my "HiassofT" OpenELEC Raspberry Pi builds with support for the Wolfson / Cirrus Logic Audio Card. These builds offer the following features:

Downloads

latest version:
6.0.3
2016-03-01
RPi RPi2 builds
Source code
  • Based on OpenELEC 6.0.3 release
6.0.3 + RPi3 fixes
2016-03-11
RPi3 build
Source code
Fixup release for RPi3 issues
  • remove I2S config from bt_pins to fix clash with I2S cards
  • use spi-bcm2708 instead of spi-bcm2835 to save DMA channels
  • update GPU firmware to fix socvirtgpio error
old versions:
  Download from archive Read Changelog.txt for details

The source code is available on my GitHub repository https://github.com/HiassofT/OpenELEC.tv.

If you want to download the source of a specific / older release select the appropriate VERSION-cirrus tag (eg 6.0.0-cirrus).

Installation

First-time installation

Upgrade to a newer Wolfson / Cirrus build

Just do a manual update using the .tar file and reboot, that's all

Configuration

Editing /flash/config.txt

By default the /flash partition is mounted read-only, you have to remount it read-write before you can edit /flash/config.txt:

mount -o remount,rw /flash
nano /flash/config.txt

Using a GPIO IR receiver

The default lirc-rpi GPIOs 17/18 will conflict with the Wolfson / Cirrus card. But you can use the following line in /flash/config.txt to use an IR receiver connected to GPIO 5 (pin 14 of the J2 connector on the Cirrus card):

dtoverlay=lirc-rpi,gpio_out_pin=12,gpio_in_pin=5

Audio card configuration

On bootup the audio card is configured via a udev rule in the file

/storage/.config/udev.rules.d/90-wolfson.rules

This file is created automatically on initial boot and you can change it to your needs. If you messed up, just delete it and reboot, it will be re-created with default contents.

Here's what the file usually looks like, SPDIF out, lineout and headset out enabled via the standard "usecase" scripts:

# init wolfson card, enable SPDIF, lineout and headset playback
SUBSYSTEM=="sound", ACTION=="add|change", ATTR{id}=="sndrpiwsp", \
        RUN+="/usr/bin/SPDIF_playback.sh -q", \
        RUN+="/usr/bin/Playback_to_Lineout.sh -q", \
        RUN+="/usr/bin/Playback_to_Headset.sh -q"

Enabling only SPDIF out

If you intend to use the passthrough feature it's best to disable all analog outputs - they'd output noise when you send passthrough data to your receiver via SPDIF.

# enable only SPDIF out
SUBSYSTEM=="sound", ACTION=="add|change", ATTR{id}=="sndrpiwsp", \
        RUN+="/usr/bin/SPDIF_playback.sh -q"

Enable Speaker out

If you want to use the integrated amplifier in addition to the analog outputs, add the Playback_to_Speakers.sh script:

# enable SPDIF plus all analog outputs
SUBSYSTEM=="sound", ACTION=="add|change", ATTR{id}=="sndrpiwsp", \
        RUN+="/usr/bin/SPDIF_playback.sh -q", \
        RUN+="/usr/bin/Playback_to_Lineout.sh -q", \
        RUN+="/usr/bin/Playback_to_Headset.sh -q", \
        RUN+="/usr/bin/Playback_to_Speakers.sh -q"

Custom mixer settings

The Wolfson / Cirrus audio card supports rather sophisticated mixing, for example you could configure headphone out to mix OpenELEC audio output with line in input and apply and equalizer while at the same time providing bit-perfect OpenELEC only output on SPDIF out.

As an initial starting point look at this thread on the element 14 site, especially the "listen scripts" by Ragnar Jensen.

To understand the internal mixing of the WM5102 chip read the postings in this thread and the digital core section of the WM5102 datasheet.

The usecase and listen scripts just configure the WM5102 using amixer commands. If you want to create your own setup it's best you put your commands into a shell script, let's say /storage/.config/my_mixer_settings.sh and then add this script to the udev file. For example:

# enable SPDIF output plus custom config
SUBSYSTEM=="sound", ACTION=="add|change", ATTR{id}=="sndrpiwsp", \
        RUN+="/usr/bin/SPDIF_playback.sh -q", \
        RUN+="/storage/.config/my_mixer_settings.sh"

Questions?

Please post your questions in this thread on the OpenELEC forum.


Home