Are there any examples (schematics and/or device tree snippets) of integrating an AM335x and a TLV320AIC3120 audio codec? I've spent a tremendous amount of time trying to get audio playback working and have not had success. Below are some segments of my device tree. The compatible... line was me following the example to modify the davinci-evm.c code within the kernel to add support.
The issue that I'm having is upon playback, I receive a "write error: Input/output error". Upon scoping the data lines, I see that MCLK is successfully generated by the AM335x for a very short period, then it stops being generated. I also see I2C communication to/from the '3120 during the same period. I feel that if MCLK continued to be generated, I'd successfully have audio.
This is using the linux-ti-staging-4.1 recipe from meta-ti (e.g. same kernel build as part of processor SDK).
&mcasp0 {
pinctrl-names = "default";
pinctrl-0 = <&mcasp0_pins>;
status = "okay";
op-mode = <0>; /* MCASP_IIS_MODE */
tdm-slots = <2>;
num-serializer = <16>;
serial-dir = < /* 0: INACTIVE, 1: TX, 2: RX */
1 2 0 0
0 0 0 0
0 0 0 0
0 0 0 0
>;
tx-num-evt = <1>;
rx-num-evt = <1>;
};
sound {
compatible = "ti,tlv320aic31xx-audio";
ti,model = "AUDIO";
ti,audio-codec = <&tlv320aic3120>;
ti,mcasp-controller = <&mcasp0>;
ti,codec-clock-rate = <24000000>;
ti,audio-routing =
"Speaker", "SPK";
};
Ignore the poor quality of the MCLK signal. This is a result of my scope probe being filtered at ~20 MHz (and the signal is 24 MHz).