Android Automotive SIG Audio Hardware Abstraction Layer HAL
Android Automotive SIG - Audio Hardware Abstraction Layer (HAL) Android in a Car Audio System Suhasini Raghuram, Analog Devices ; Wassim Filali, BMW October 2020
Agenda • Assessment of the Proof of Concept • Role of Android in Car audio system • Use cases to be covered with Android • Audio transport in the car network • Virtualization & Containerization • Latency & performance • Using Linux components with Android • Bluetooth device control and support • Interaction of Android with external safety signals May 2020 |. Copyright © GENIVI Alliance 2020 2
Assessment of the Proof of Concept
Demo environment Linux VM Kitchen sink ALSA Audio. Flinger Audio HAL TCP listener audiorelay Android emulator TCP Windows HOST May 2020 |. Copyright © GENIVI Alliance 2020 TCP VMs router TCP Sound devices 4
Proof of Concept components • Genivi device configuration: configuration • custom audio hal: • audiorelay: May 2020 |. Copyright © GENIVI Alliance 2020 derived from Android emulator, altered to work with named sockets instead of tinyalsa reference component that receives audio data from HAL and exposes it to TCP ports 5
Zone configuration primary zone • bus 0_media_out • bus 1_navigation_out • bus 2_voice_command_out • bus 3_call_ring_out • bus 4_call_out • bus 5_alarm_out TCP ports • 5000 • 5004 • 5005 • 5001 • 5006 • bus 6_notification_out • 5007 • bus 7_system_sound_out • 5003 rear seat zone • bus 100_rear_seat May 2020 |. Copyright © GENIVI Alliance 2020 • 5008 6
Proof of Concept Details - why Data Flow Android Audio framework Audio HAL is forbidden to use network HIDL Audio HAL TCP is easy to access named socket TCP Audio. Relay May 2020 |. Copyright © GENIVI Alliance 2020 PCM Writer 7
System Design Discussions
Role of Android in a Car Audio system • Android as audio router - routing different streams? • Android as an audio control master - master controller that controls the overall audio system. • Android as a source only ? May 2020 |. Copyright © GENIVI Alliance 2020 9
Use cases to be covered with Android Applications – • Telephony • Voice assistance • Multichannel video streaming • Audio zones – ⁃ Play different audio at the same time on different speakers How does Android help / hinder these applications? • Sync between two operating systems – Head Unit and Rear Seat Entertainment unit? May 2020 |. Copyright © GENIVI Alliance 2020 10
Audio Transport in the car network Supporting and controlling external audio devices How android would handle this? May 2020 |. Copyright © GENIVI Alliance 2020 • Transporting protocols (AVB, A 2 B, MOST ) • Trunk amp / Rear seat entertainment units' control • Encryption - Decryption for content protected streams ( Netflix / Spotify streaming services) 11
Virtualization and Containerization Virtualization • Why do we really need to virtualize ? • Communication between host and guest ( hypervisor or container? ) • Performance vs practicality ? Shared memory ? TCPIP ? • Virt. IO? ( Android 11 is pointing to this) • Audio transport and communicating between containers / vms ? • Does a virtualized Ethernet support AVB ? May 2020 |. Copyright © GENIVI Alliance 2020 12
Virtualization and Containerization • Partitioning of Audio HAL and vendor development • Preference over virtualization • Transport mechanism • How to control effects? • Using different OS, one for infotainment and one for safety? May 2020 |. Copyright © GENIVI Alliance 2020 13
Latency and Performance • Latency ⁃ How is latency measured today (Testing ITU) ⁃ How can we support low latency applications with Android? (AAudio, . . . ) • CPU offloading • Low latency framework (Gaming, AAudio) ⁃ The framework is not directly one layer above HW. What do we do when there are many other layers above HW? (Gaming, AAudio) May 2020 |. Copyright © GENIVI Alliance 2020 14
Latency and Performance Game latency AAudio framework latency External mixer latency Car amplifier May 2020 |. Copyright © GENIVI Alliance 2020 15
Linux components with Android Should we be looking at using some Linux components with Android? • Example : use Audio control from Android and audio routing transport libraries from AGL • Other examples exist such as the Genivi Linux Audio Manager • Counter example (bad example) : mixing two audio managements concepts in the same system, one in Android and one in Linux ⁃ integration complexities • Are there any features in Linux which is already adapted to automotive use cases that can be brought in directly into Android. • Is there scope for maybe making this more similar in design to AGL (for specific features) May 2020 |. Copyright © GENIVI Alliance 2020 17
Bluetooth support • Bluetooth device control and support ⁃ Any difficulties in accessing and controlling Bluetooth devices ⁃ Possible solutions? May 2020 |. Copyright © GENIVI Alliance 2020 18
Safety and Android Audio? • Safety implementation in Audio? ⁃ Interaction of Android with external safety signals (or in general with external sources) ⁃ Assumptions : Android Audio subsystem is developed only for infotainment purposes. Safetyrelated features need to be implemented in another RTOS May 2020 |. Copyright © GENIVI Alliance 2020 19
Testing Lava Test Farm Status
Open Floor
Working with GENIVI Valuable Input but Few Resources ⁃ During GENIVI summits, different problem statements and suggestions are shared. The AUDIO_HAL resources however are limited. So problems statements and suggestions are prioritized by resource availability. ⁃ However some problems are being tackled alone in individual companies. Working with GENIVI ⁃ You don’t have to work alone. ⁃ Align your daily tasks to be part of the GENIVI tasks. ⁃ Attend the weekly status update. Your Advantages ⁃ Have your name and your employers name as part of the GENIVI Audio_HAL group. ⁃ Collaborate with different companies and learn other perspectives and experiences. ⁃ Be part of the team that delivers suggestions and AA change requests directly to Google. May 2020 |. Copyright © GENIVI Alliance 2020 22
Thank you! Visit GENIVI: http: //www. genivi. org http: //projects. genivi. org Contact us: help@genivi. org
- Slides: 22