[Android Automotive 12] Audio output through USB device on i.MX 8QuadMax

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 
已解决

[Android Automotive 12] Audio output through USB device on i.MX 8QuadMax

跳至解决方案
2,442 次查看
alx_dlb
Contributor II

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!

0 项奖励
回复
1 解答
2,426 次查看
JorgeCas
NXP TechSupport
NXP TechSupport

Hello,

In the Android Automotive release, the route is configured as follows: Alarm, notification, and system sounds are played from the audio jack on the CPU board. Other sounds such as music are played from the extended audio board.

According to the Android Automotive reference manual, audio output through USB device is not documented and unfortunately there are no examples about how to do it or even if it is possible.

Additionally, Android Automotive is supported under Professional Services scheme. You could refer to the following link for additional details:

NXP Professional Services | NXP

Best regards.

在原帖中查看解决方案

0 项奖励
回复
6 回复数
2,254 次查看
alx_dlb
Contributor II

Hey,

so I totally understand the whole automotive situation. However, I just tested the USB audio output also with the mobile version of Android (NXP sample image) on the board and got the same outcome. This surprised me. Shouldn't this be working at least?

0 项奖励
回复
2,239 次查看
JorgeCas
NXP TechSupport
NXP TechSupport

Hello,

Got it, for both, Android and Android Automotive the audio route is through headphone jacks and audio boards, there are not applications to implement audio through USB devices.

Best regards.

2,419 次查看
alx_dlb
Contributor II

Thanks @JorgeCas !

One question regarding the "extended audio board" as I find it hard to get some detailed information:

  1. Is the board included when bying the MCIMX8-8X-BB?
  2. Does it work with i.MX 8QuadMax?
  3. How many audio outputs does it have, 8 channels?
0 项奖励
回复
2,390 次查看
JorgeCas
NXP TechSupport
NXP TechSupport

Hello,

1. Yes, it is included buying the MCIMX8-8X-BB.

2. Yes, it works with i.MX 8QuadMax.

3. It has 6 outputs and 4 inputs.

Best regards.

2,375 次查看
alx_dlb
Contributor II
Thanks much, I'll order one then.
2,427 次查看
JorgeCas
NXP TechSupport
NXP TechSupport

Hello,

In the Android Automotive release, the route is configured as follows: Alarm, notification, and system sounds are played from the audio jack on the CPU board. Other sounds such as music are played from the extended audio board.

According to the Android Automotive reference manual, audio output through USB device is not documented and unfortunately there are no examples about how to do it or even if it is possible.

Additionally, Android Automotive is supported under Professional Services scheme. You could refer to the following link for additional details:

NXP Professional Services | NXP

Best regards.

0 项奖励
回复