"HiassofT" OpenELEC Raspberry Pi builds with support for Wolfson / Cirrus Logic Audio Card. WARNING: this documentation is outdated, please read the info on my website http://www.horus.com/~hias/openelec-cirrus.html ======================================================================== = archived content ======================================================================== 0. Installation Please read the original OpenELEC installation guide http://wiki.openelec.tv/index.php?title=Installing_OpenELEC_on_Raspberry_Pi&oldid=1771 If you don't have access to a Linux box the easiest way to use this testbuild is this: - First install an official OpenELEC version, for example using the diskimage method described in the Wiki. - Then manually update to this testbuild. You just have to copy the tar file from here to the Update share on your Pi and then reboot it. 1. Upgrading from 4.x to 5.x or from 5.x to 6.x If you are upgrading from a OpenELEC 5.x build to 6.x please also check the official release notes - due to the significant changes a fresh install or resetting the system settings is recommended: http://openelec.tv/news/22-releases/172-release-openelec-6-0-released After you updated from 5.x to 6.x please remove the following files and then reboot: - /storage/.config/modprobe.d/cirrus.conf - /storage/.config/udev.rules.d/90-wolfson.rules - /storage/.config/autostart.sh (if you locally modified that file you only need to remove the "sleep 5" line that was added with the 5.x builds - that's no longer needed) 2. Configuration 2.1 Configuration of 5.0.8 and newer builds for RPi and RPi 2 These builds uses a device-tree enabled kernel so you have to add the following line to your config.txt to enable the Cirrus Logic Audio card: dtoverlay=rpi-cirrus-wm5102 If you want to use an IR remote you have to enable and configure LIRC via the device tree, too. Add the following lines to config.txt to get the same setup as in the older builds (IR receiver connected to GPIO 15): dtoverlay=lirc-rpi,gpio_out_pin=14,gpio_in_pin=15 2.2 Configuration of 5.0.6 and older RPi builds On a fresh installation first start up OpenELEC, just go through the main configuration dialogs (setting language, enabling ssh, etc) and immediately after that do a reboot. This reboot is required because OpenELEC installs the supplied lirc config file after the lirc module is loaded and therefore on initial startup lirc conflicts with the Wolfson drivers. The config files installed by this build setup the Wolfson card to output to lineout, SPDIF and headphone out, so the Wolfson card should work fine out of the box. If you upgraded from an official OpenELEC build, go to the system settings and change the audio output to "ALSA (snd_rpi_wsp)". If you upgraded from an older Wolfson testbuild you might get audio output only on SPDIF and/or lineout. In this case remove the .config/udev.rules.d/90-wolfson.rules file and reboot. The new udev rule which outputs to lineout, SPDIF and headphone will then be installed automatically. Important note: This build installs a .config/autostart.sh file with a "sleep 5" so that Kodi startup is slightly delayed. This is needed because currently the Wolfson drivers take quite some time to load and initialize, and without this delay the sound card will not be present at the time Kodi starts up - and Kodi won't see it. If you had installed a .config/autostart.sh by yourself you'll need to add a "sleep 5" to it (smaller values might work, too, but with 5 seconds you are on the safe side). 3. Changes compared to original OpenELEC releases - Include Wolfson/Cirrus driver - Include Cirrus "use case" scripts in /usr/bin - Add udev rule to init Wolfson/Cirrus card for SPDIF, Line, and Headphone output - Add modprobe.d/cirrus.conf file with softdeps as required by the Cirrus driver - Add patch so that Kodi recognizes the Wolfson/Cirrus card as an SPDIF device 4. Source code Links You can download the patches from my github repositories: Linux kernel 4.1 with Wolfson/Cirrus patches is here: https://github.com/HiassofT/rpi-linux/tree/cirrus-4.1.y OpenELEC patches are here: https://github.com/HiassofT/OpenELEC.tv/tree/cirrus-6.0 5. Changelog 2016-01-27 - OpenELEC 6.0.1 based build - Get rid of problematic wm8804 one-time init code and use the reset line instead - Cleanup DAPM code to make sure FLL1 isn't configured multiple times - Implement proper fix for 44.1kHz/48kHz switching bug 2015-11-02 - OpenELEC 6.0 based build 2015-08-24 - OpenELEC 6.0 Beta 4 (5.95.4) based build in 6.0-beta dir - Add commit from RPi foundation kernel to increase number of DMA channels 2015-07-17 - OpenELEC 6.0 Beta 3 (5.95.3) based build in 6.0-beta dir - Updated RPi linux support patches and kernel configuration to fix issues with I2S soundcards - Cirrus driver rebased onto kernel 4.1 - Properly setup GPIO IRQ for Cirrus card - Move Cirrus wm8804 one-time initialization code to separate module to ensure it's only run once - Move cirrus driver (soft-) dependencies to /lib/modprobe.d/ 2015-06-16 - OpenELEC 6.0 Beta 2 (5.95.2) based build in 6.0-beta dir - Use default OpenELEC kernel (4.0.5) - Cirrus drivers rebased onto 4.0 kernel - Update .config/modprobe.d/cirrus.conf file so the driver works with kernel 4.0 - Add driver patch from cirrus git to fix WM8804 init issue - Add hack so that Kodi recognizes the card as SPDIF 2015-04-07 - OpenELEC 5.0.8 based builds for RPi and RPi2 - Switched to kernel 3.18 and new Cirrus driver - Added patch to setup FLL1 as in previous driver, this fixes switching between 44.1kHz and 48kHz - Disabled samplerates below 32kHz - Re-enable CONFIG_PREEMPT, this makes it less likely that the card isn't detected after a reboot - Bump firmware to ab9e773 from April 6th to fix video playback stuttering when using dvdplayer - Note: these builds use a device-tree enabled kernel, so you have to add the following line to your config.txt: dtoverlay=rpi-cirrus-wm5102-overlay 2015-03-27 - OpenELEC 5.0.6 based build for RPi 2 - Note: this build uses a device-tree enabled kernel, so you have to add the following line to your config.txt: dtoverlay=rpi-cirrus-wm5102-overlay 2015-03-14 - OpenELEC 5.0.6 based build 2015-02-26 - OpenELEC 5.0.4 based build 2015-02-11 - OpenELEC 5.0.3 based build - add kernel 3.12.36 I2C patches - enable CONFIG_VMSPLIT_2G in kernel config 2015-02-03 - OpenELEC 5.0.1 based build - update to kernel 3.12.36 2014-12-30 - OpenELEC 5.0 based build 2014-12-22 - OpenELEC 5.0 RC 3 (4.97.3) build in 5.0-rc-cirrus dir - update to kernel 3.12.35 - add more kernel modules and change kernel options so they are more in line with current OpenELEC kernel config - update use-case scripts 2014-12-12 - new OpenELEC 5.0 RC 2 based build in 5.0-rc-cirrus directory - based upon kernel 3.12.34 with latest Cirrus Logic patches from https://github.com/CirrusLogic/rpi-linux - S24LE support is enabled in kernel driver, but samplerates below 44.1kHz are disabled because they result in white noise - added autostart.sh script to delay 5 seconds before starting kodi so that the kernel driver is fully initialized before kodi starts up - added modules-load.d/wolfson.conf to automatically load the snd_rpi_wsp module on startup 2014-12-10 - OpenELEC 5.0 RC 2 (4.97.2) build in 5.0-rc dir 2014-12-02 - OpenELEC 5.0 RC 1 (4.97.1) build in 5.0-rc dir 2014-11-28 - OpenELEC 5.0 Beta 5 (4.95.5) build in 5.0-beta dir - Change default udev rule to output to SPDIF, analog and headset - Disable S24LE support in kernel driver again to fix static with 32kHz and below audio 2014-11-23 - OpenELEC 5.0 Beta 4 (4.95.4) build in 5.0-beta dir 2014-11-13 - OpenELEC 5.0 Beta 2 (4.95.2) build in 5.0-beta dir - Default to ALSA output and RSS feed disabled in new installations - No longer disable S24LE support in kernel driver 2014-11-06 - OpenELEC 5.0 Beta 1 (4.95.1) build in 5.0-beta dir - Add default lirc-rpi.conf file, configure lirc-rpi to use GPIOs 14/15 2014-10-06 - Update to OpenELEC 4.2.1 - Change default udev rule to enable both SPDIF and analog output 2014-09-27 - Update to OpenELEC 4.2.0 2014-07-13 - Update to OpenELEC 4.0.7 - include no_dev_console patch for wolfson kernel, this fixes the "no initial console" issue 2014-06-26 - Update to OpenELEC 4.0.6 2014-06-15 - Update to OpenELEC 4.0.5 2014-06-05 - Update to OpenELEC 4.0.4 2014-06-01 - Update to OpenELEC 4.0.3 plus firmware fixes (commit bf3611a) - Added experimental Helix testbuild (OpenELEC master commit 36c45ec) - Uploaded patchsets to src directory 2014-05-14 - Update to OpenELEC 4.0.1 - Disable sample rates below 32kHz in Wolfson driver to work around driver bug (XBMC resamples lower rates) 2014-05-06 - Initial version based on OpenELEC 4.0 release - Disable S24_LE audio format in Wolfson driver to work around XBMC issues