Hello,
On 3/25/22 10:18 AM, Daft Soft wrote:
> Hi!
> Is FEX-file applicable on 5.x kernel?
No, mainline Linux describes the audio routing in the device tree, not via FEX.
Normally, external amplifiers use the "simple-audio-amplifier" binding here:
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/Documentation/devicetree/bindings/sound/simple-audio-amplifier.yaml
The amplifier node is an "auxiliary device" referenced from the sound card via
an "aux-devs" property, and the amplifier DAPM widgets (INL, INR, OUTL, OUTR)
are added to the "allwinner,audio-routing" property.
This setup with an external amplifier is common on A64 boards, for example:
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/arch/arm64/boot/dts/allwinner/sun50i-a64-pinephone.dtsi?h=v5.17#n436
The problem with the A20 codec is that the mainline driver does not currently
support an "aux-devs" property. You would need to add a call from
sun4i_codec_create_card() to something like:
snd_soc_of_parse_aux_devs(card, "allwinner,aux-devs");
Then you could use the binding I described above.
Regards,
Samuel