I have two boards of nanopi-a64. after following the instructions here to enable usb and hdmi audio, i've tried also making the audio jack working (at least for audio output).
I did the inclusion of a custom board config as stated in post #1 of this thread.
Here is my patch file I add to <armbian-build-path>/patch/kernel/sunxi-dev/
I named it xxx-xxx-nanopi-a64-fix-usb-and-audio.patch so that it would be executed last on the patching stage of the build.
diff --git a/arch/arm64/boot/dts/allwinner/sun50i-a64-nanopi-a64.dts b/arch/arm64/boot/dts/allwinner/sun50i-a64-nanopi-a64.dts
index 9b9d915..0b671c7 100644
--- a/arch/arm64/boot/dts/allwinner/sun50i-a64-nanopi-a64.dts
+++ b/arch/arm64/boot/dts/allwinner/sun50i-a64-nanopi-a64.dts
@@ -283,3 +283,48 @@
&usbphy {
status = "okay";
};
+
+&codec {
+ status = "okay";
+};
+
+&codec_analog {
+ cpvdd-supply = <®_eldo1>;
+ status = "okay";
+};
+
+&dai {
+ status = "okay";
+};
+
+&i2s1 {
+ status = "okay";
+};
+
+&i2s2 {
+ status = "okay";
+};
+
+&sound {
+ simple-audio-card,aux-devs = <&codec_analog>;
+ simple-audio-card,widgets = "Microphone", "Microphone Jack",
+ "Headphone", "Headphone Jack";
+ simple-audio-card,routing =
+ "Left DAC", "AIF1 Slot 0 Left",
+ "Right DAC", "AIF1 Slot 0 Right",
+ "Headphone Jack", "HP",
+ "AIF1 Slot 0 Left ADC", "Left ADC",
+ "AIF1 Slot 0 Right ADC", "Right ADC",
+ "MIC2", "Microphone Jack";
+ status = "okay";
+};
+
+&sound_hdmi {
+ status = "okay";
+};
+
+&usb_otg {
+ dr_mode = "host";
+ status = "okay";
+};
+
Adding it at the patching stage avoids having to decompile and recompile into dtb and replacing the one at the boot.
So far so good, audio on hdmi and the audio jack works, you just have to set the default sink device on pulse audio's settings if you want to use either audio outputs.
Be aware though that is needed to hold the linux-dtb-dev-sunxi and linux-dtb-dev-sunxi64 packages so that the patches above wont be lost when running apt-get upgrade.