This project provides an example of adding A2B transceiver as a sound card in the Android Common Kernel on Raspberry Pi 4B
Followed the below page for the integration of AOSP into RPI 4B.
https://grapeup.com/blog/android-automotive-os-13-on-raspberry-pi-4b/
Cloned the Linux Kernel by following the below github repo:
https://github.com/raspberry-vanilla/android_kernel_manifest/tree/android-13.0
-
Initially built without any modifications using the commands as per the above github
-
Added the DTS overlay file (rpi-a2bgeneric-overlay.dts) in the Kernel path "arch/arm/boot/dts/overlays"
-
Make sure the below configs are enabled (=y) (Didn't verified with loadable kernel modules)
- CONFIG_SND_SOC
- CONFIG_SND_BCM2835_SOC_I2S
- CONFIG_SND_SIMPLE_CARD
- CONFIG_SND_SOC_SPDIF
-
Make sure I2S is enabled ("okay") in the BCM2711 DTS
-
Build the Kernel
-
Replace the new Kernel image, DTB & DTBO's in the path prebuilts path of the android repo
-
Build the Android image (boot image alone can also be built as there will be only change in the boot)
-
Once Android boots up & connect to the adb terminal, list the sound cards. In this step, "a2bgeneric" will also be listing as a sound card in the list. Please find the below snippet of sound cards in RPI 4B.
- Grapeup (explaining about the AOSP integration into RPI 4B)
- Raspberry - Vanilla Github repo
- Kernel documentation reference for adding A2B as a Simple Sound Card:
- Reference for creating a simple sound card: