Audio power management

To support vehicle-specific power management, Android provides a CarPowerManagementService service and a CarPowerManager interface. The power policy affects the Android Automotive OS (AAOS) audio stack and the audio HAL with the audio component, android.car.hardware.power.PowerComponent.AUDIO. To learn more, see Power Management.

In CarAudioService, a CarAudioPowerListener is registered on CarPowerManagementService when the dynamic audio routing is enabled. This allows CarAudioService to listen to power policy changes related to audio. When audio is disabled by the power policy, the following actions take place:

  • Only focus requests of critical audio attribute usages are retained. Other focus requests are abandoned.

  • All incoming focus requests of non-critical audio attribute usages are rejected.

  • If car volume group muting is used, car volume groups that do not contain audio context for critical audio attribute usages are muted.

The following audio attribute usages are considered as critical:

  • Emergency
  • Safety

In Sample configuration (version 2), we recommend you use separate volume groups for system sounds, including emergency and safety, from other contexts in the primary audio zone. In this way, volume groups for all non-critical audio attribute usages are muted when audio is disabled, while emergency and safety sounds remain unmuted.