According to its documentation, the tegra30 audio hub (AHUB) driver in the Linux source tree also supports the AHUB peripheral in tegra124 (K1), which includes SPDIF I/O. Does anyone know if it’s possible to pinmux those signals anywhere on the Jetson TK1 expansion headers, and wire up a coaxial digital output?
Where does the pinmux information reside anyway? I have the TRM but haven’t found that yet.
Ok, found the pinmux section. It looks like balls AUX_UART2_RXD_0 and AUX_UART2_TXD_0 (J3A2 pins 65 and 68) can be assigned the SPDIF function. (It’s not clear which is SPDIF in and which is SPDIF out.)
Anybody tried it? A coax driver is needed to convert from logic levels, but that’s easy–see e.g. http://sound.westhost.com/project85.htm at the bottom of the page. (That’s for 5V not 1.8V logic.)
I’m admittedly making some assumptions, but since there is still UART hardware involved when run as S/PDIF, the pin marked RX would have to be for S/PDIF in modes (e.g., external audio source), and TX would have to be for S/PDIF out mode (e.g., external amplifier or speakers).
I may give this a try. It looks super easy to interface an optical transmitter like
Only needs a level converter from 1.8 -> 3.3.
Speaking of UART pins, I noticed that on the wiki (http://elinux.org/Jetson/GPIO) all TXD pins are marked as inputs and all RXD pins are marked as outputs. What gives?
It may be a typo…TX should be output, RX input. The other half of the mating circuit though would be the opposite if describing what connects to it.
I wonder about that. Seems a pretty obvious typo to escape notice for this long, especially as the same mistake was made in multiple places.
Anyway, about SPDIF… it turns out that the Linux kernel has an AHUB driver, but that is just a fancy set of FIFOs and crossbar mux, and child drivers are needed for the various audio I/O standards. The tegra30-i2s driver handles I2S but there is no driver for SPDIF. Someone wrote one way back in 3.10 which was used in an Android kernel but never made it to mainline. The author thinks it might be a good starting point. We’ll see. I can’t devote a lot of time to this project so the odds are not high.