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.
Here are my "HiassofT" OpenELEC Raspberry Pi builds with support for the Wolfson / Cirrus Logic Audio Card. These builds offer the following features:
latest version: | ||
---|---|---|
6.0.3 2016-03-01 |
RPi
RPi2
builds
Source code |
|
6.0.3 + RPi3 fixes 2016-03-11 |
RPi3
build
Source code |
Fixup release for RPi3 issues
|
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).
/flash/config.txt
:
dtoverlay=rpi-cirrus-wm5102
ALSA (snd_rpi_wsp S/PDIF)
Just do a manual update using the .tar file and reboot, that's all
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
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
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"
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"
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"
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"
Please post your questions in this thread on the OpenELEC forum.