A20 Board with Audio Amplifier

60 views
Skip to first unread message

mullappil...@gmail.com

unread,
Mar 7, 2022, 5:25:27 AM3/7/22
to linux-sunxi
i have a board with A20 and  PAM8620 audio amplifier. 3.4 kernel works with good audio along with patches on sunxi-codec.c, now moved to kernel 5.16, and audio is not working.
the fex file has following entry

[audio_para]
audio_used = 1
audio_pa_ctrl = port:PH15<1><default><default><0>
audio_mute_ctrl = port:PH25<1><default><default><0>


any help is appreciated

Daft Soft

unread,
Mar 25, 2022, 11:18:55 AM3/25/22
to linux-sunxi
Hi!
Is FEX-file applicable on 5.x kernel?

Samuel Holland

unread,
Mar 28, 2022, 12:41:08 AM3/28/22
to daft...@yandex.ru, linux-sunxi
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

Daft Soft

unread,
Mar 28, 2022, 5:34:59 AM3/28/22
to linux-sunxi
Hi, Samuel!

On Monday, 28 March 2022 at 07:41:08 UTC+3 sam...@sholland.org wrote:
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.

That was a leading question for topic starter
Reply all
Reply to author
Forward
0 new messages