|20px||▶ OpenELEC Configuration||▶ Config.txt|
As the Raspberry Pi doesn't have a conventional BIOS, the various system configuration parameters that would normally be kept and set using the BIOS are now stored in a text file named "config.txt".
There are two ways to edit the config.txt file. Via SSH, or by plugging the SD card into another computer running Windows, OSX, or Linux
Editing via SSH
See, How to SSH
mount -o remount,rw /flash
Make your changes, then ctrl+x to save.
mount -o remount,ro /flash
Editing via Another PC
You can take you SD card out and put it in a Windows, Linux, or Mac computer and edit config.txt directly
Codec Licence Keys
The RPi requires you to buy special keys if you want to be able to playback certain codecs. They are:
* MPEG-2 * VC-1
These licences are purchase based on the specific serial number of your RPi.
Purchasing The Licence Keys
The licences can be bought from here http://www.raspberrypi.com/license-keys/
To purchase the licence you will need the serial number of your RPi, this can be done from SSH
Adding The Licence Keys
Add the following to your config.txt
Replace "00000000" with the licence key that you purchased.
Check If The Keys Are Enabled
If you are having issues with your licence there are some tests you can do to confirm if the licence is enabled or not.
SSH into your Raspberry Pi and run the below commands:
vcgencmd codec_enabled MPG2 vcgencmd codec_enabled WVC1
If MPG2 or WVC1 has been successfully enabled it should return something similar to this:
If it returns disabled you will need to check:
- You entered the correct serial number when purchasing the licence.
- You have correctly added the licence key to the config.txt file.
- You uncommented the relevant lines in the config.txt file by removing the # and space from the start of the line.
- You have rebooted before testing.
Device Tree Overlay
Raspberry Pi's latest kernels and firmware now by default use Device Tree (DT) to manage some resource allocation module usage.
The current solution is not a pure Device Tree system -- there is still board support code that creates some platform devices -- but the external interfaces (i2c, i2s, spi) and the audio devices that use them must now be instantiated using a Device Tree Blob (DTB) passed to the kernel by the loader (start.elf).
The main impact of using Device Tree is to change from everything on, relying on module blacklisting to manage contention, to everything off unless requested by the DTB. In order to continue to use external interfaces and the peripherals that attach to them, you will need to add some new settings to your config.txt
Adding Device Tree Overlays
The current supported DTB's can be found in /flash/overlays. These can be set by using any of the following overlays
dtoverlay=hifiberry-dac dtoverlay=hifiberry-dacplus dtoverlay=hifiberry-digi dtoverlay=hifiberry-amp dtoverlay=iqaudio-dac dtoverlay=iqaudio-dacplus
override the defaults for the lirc-rpi module
dtparam=gpio_out_pin=16 dtparam=gpio_in_pin=17 dtparam=gpio_in_pull=down
optional hardware interfaces
dtparam=i2c1=on # For later RPi's dtparam=i2c0=on # For early RPi's dtparam=i2s=on dtparam=spi=on
Please see, http://elinux.org/RPiconfig#Overclocking