Wednesday, January 28, 2015

Linux audio support for RIoTboard

RIoTboard support was introduced with mainline Linux v3.17. Since when I got this board, I was interested in using the on-board audio codec (SGTL5000), but initially didn't managed to have the audio working properly. Later I managed to get it working, and this is a short report to remind and others what works so far:

Kernel        Status
====================
Linux 3.17.0  OK
Linux 3.17.1  OK
Linux 3.17.2  OK
Linux 3.17.3  OK
Linux 3.17.4  OK
Linux 3.17.5  OK
Linux 3.17.6  OK
Linux 3.17.7  OK
Linux 3.17.8  OK
Linux 3.18.0  OK
Linux 3.18.1  OK
Linux 3.18.2  OK
Linux 3.18.3  OK
Linux 3.18.4  OK

All the kernels have been compiled natively on the RIoTboard itself (running Debian Wheezy on external USB drive). Each build takes about 70m, so please be patient.

PS: Just found out that the RIoTboard audio subsystem is somewhat screwed-up:
1. HP_VGND is connected to analog ground, while the datasheets explicitly says that it shouldn't be connected anywhere else other than the headphones jack. This effectively shorts out the virtual ground amplifier and leads to #2.
2. Headphones are connected via 2x 47uF ceramic capacitors. Electrolytic capacitor 100-220uF would be much better, and no capacitor would be best in terms of audio quality (but this needs proper connection to HP_VGND).
3. Line-in inputs are... well, not connected. That's really bad, as it rules out a number of use cases where we need stereo line-in and/or better quality ADC, so we're left with Lo-Fi mono microphone input (say goodbay to the low-cost SDR). I feel crushed...