Programming the codec using ALSA?
Posted: Sun Apr 21, 2019 5:51 pm
The Allwinner H2+ has the same audio subsystem as the H3, and it is apparently similar to other Allwinner audio subsystems. There is Linux kernel support for these codec, and ALSA can see them and manipulate them. Ther is a block diagram onf eh subsystem in the Allwinner H2+ Dartasheet V1.2.pdf on page 267. It shows all of the controllable elements: there are more than 30 of them. the ALSA command-line program, amixer, reports that is can control various functinsof the sound subsystem, giving each of these functions a name. My problem is that I cannot determine the mapping from these ALSA names to the controllable elements shown in the picture, it's simply not obvious to me how to turn off the path that routes the DAC_L output to the ADC_L input. I can see the element is wich to control on the diagram: it'sone of the 5 inputs to the ADC_L mux, but I don't know what command to amixer will set it. Basically, I want to turn off all switches except the one from MIC1 to ADC-L, the one from DAC_L to the left output mux, and the one from the left output mux to teh left line out. I then want to turn off all the amps except MIC1, ADC_L, and Lineout_L.