Skip to content

Audio Driver

The audio driver loads a per-board miniDSP configuration for the TLV320AIC3256 codec, named by the device tree's firmware-name property. libretouch ships one for every supported board and installs it to /lib/firmware/, so nothing has to be prepared by hand.

To use a configuration of your own, install it under the name the device tree asks for and restart the device:

install -D -m 0644 my-config.cfg /lib/firmware/spotty_sm2_normal.cfg

Playback

Set a low playback volume in alsamixer before enabling the amplifier. The amplifier standby signal is GPIO 75 and is enabled by driving it high:

echo 75 > /sys/class/gpio/export
echo out > /sys/class/gpio/gpio75/direction
echo 1 > /sys/class/gpio/gpio75/value

If GPIO 75 is already exported, omit the first command. Begin with a short test file:

aplay test.wav

For MP3 playback, use a larger buffer to avoid underruns:

mpg123 -b 2048 music.mp3

Recording

Use arecord to capture audio; for example, this records ten seconds to a WAV file:

arecord -d 10 capture.wav

Recording has not been well tested. Check the captured file for correct level, channel order, and sample rate before relying on it.