Hey there,
I am currently trying to get audio output through an USB device connected to the i.MX 8QuadMax board (which is running Android Automotive 12). The set-up looks like this:
- The USB device is an ESI Gigaport eX which is "100% class compliant" according to its documentation. It's not written if that means UAC1 or UAC2. However, sound output is working out of the box with several other Android devices.
- The AAOS 12 is a custom build but so far I didn't change much except PRODUCT_MODEL and I activated adb tcpip on port 5555 by default. AAOS version: 12.1.0_1.1.0 (Linux 5.15.52 BSP). Lunch target is mek_8q_car-userdebug
- The board is an i.MX 8QuadMax. This one is directly connected through the USB-C socket with the audio interface.
Everything is working smoothly except that I would expect the sound to be output through the USB device as soon as this is connected. Other (non automotive) Androids seem to work like this.
I verified that:
- the USB device seems to be correctly detected (running adb shell dmesg | grep usb)
- the kernel seems to be configured to enable USB host mode. I found CONFIG_SND_USB_AUDIO=y to be set in android_build/vendor/nxp opensource/ kernel_imx /arch/arm64/configs/gki_ defconfig. To be sure I also tried adding CONFIG_SND_USB=y but that didn't help.
As I understand the documentation system sounds are routed through the audio jack socket and media should be routed through IMX-AUD-IO, right?
So it seems to be something with the audio policy configuration. Unfortunately I am not that familiar here. I see that usb_audio_policy_configuration.xml is included in imx8q/mek_8q/audio_policy_configuration_car.xml. So my naive thinking was to just add USB Device Out to car_audio_configuration.xml and assign the media type to it. That didn't work at all.
So would I need to implement a real device into one of the policies or what's the trick here?
I also tried reading through https://source.android.com/docs/core/audio/implement-policy but that also didn't make it that much clearer.
Any hint or point of reference would be really appreciated, thanks!