On Mon, Jul 28, 2014 at 12:27 PM, Mark Brown broonie@kernel.org wrote:
On Mon, Jul 28, 2014 at 09:49:27AM -0400, jonsmirl@gmail.com wrote:
codec: codec@01c22c00 { compatible = "allwinner,sun7i-a20-codec"; reg = <0x01c22c00 0x40>; interrupts = <0 30 4>; clocks = <&pll2 0>, <&apb0_gates 0>, <&codec_clk>; clock-names = "pll", "apb", "codec"; dmas = <&dma 0 19>, <&dma 0 19>; dma-names = "rx", "tx"; widgets = "Mic1 Jack", "Headphone Jack"; external-amp = <&max9768> status = "okay"; };
If external amp is missing I just bind to my internal dummy-codec.
No, the CODEC that's in the device should be there all the time - it's just the same as connecting an external amp to any other device, describe the hardware in the SoC the same way all the time and then connect any attached devices to it.
Allwinner has named their on-chip audio interface 'codec'. This codec just has two FIFOs hooked to the DAC/ADC. I coded everything in the CPU-DAI and left the CODEC-DAI empty.
So what do you want the device tree to look like? Example with no external amp. Example with external amp.