Android Automotive OS (AAOS) uses flags and configurations to enable different features, starting with dynamic routing to more generic feature flags, such as volume control from the car service. Current AAOS configuration flags for audio management are described here.
|Defined in the car service config file to
Enable AAOS routing.
The config must be set to
routing and much of
CarAudioService, are disabled and the OS
falls back to the default behavior described in
Configuring audio policies.
|Defined in car service config file to enable the muting of individual
volume groups. When set to
false (the default value), muting of
individual volume groups is disabled. Instead, muting toggles master mute.
When set to
true, car volume group muting is enabled and each
individual volume group can be muted separately. When
volume group muting must be implemented at the
Audio Control HAL.
|Defined in the car service config file to enable the
IAudioControl#onDevicesToDuckChange API to inform HAL when to
true (default value), the API receives signals indicating which
output devices to duck and what usages hold focus. When
the API is not called. The API isn't called unless the
Audio Control HAL
|Defined in the car service config file, this is the component name for
the OEM customization service. OEMs can opt to implement this service to
customize car service actions for different policies. If OEMs opt to
implement this component, they must implement a service to extend
OemCarService exposed by car-lib, and then implement
the required component services. For car audio service specifically, OEMs
can implement any of the audio sub services to manage audio action. For
Car Audio Plugin Service.
If the component name is invalid,
CarService would not connect
to any OEM service. The component name can't be a third party package. It
must be pre-installed.
Defined in the car service config file, configuration to select the version of volume adjustment context priority list.
Version 1 includes all audio contexts, in this order:
Version 2 is limited to the following contexts, in this order.
The default version is
|Defined in car service config file, configuration to persist global
mute state. When
true (the default value) Android restores the
global mute state on boot. When
true, this has no impact on persisting mute changes as mute
changes are based on individual volume groups. The default value is set to
true and must be overwritten when master mute should not be
persisted for a device.
Defined in the car service config file, configuration to indicate the timeout in milliseconds while a car volume group is considered active for volume control changes during volume key events. The configuration is used as follows:
The default value is
|Defined in the car service config file, configuration to enable callback
events to volume groups. When
true, clients receive callback
ICarVolumeGroupEvent to events that impact volume
groups. When enabled:
The default value is
Must be set to
true to allow for car audio service to manage
volume control. When the
config_useFixedVolume flag is not
set, or is set to
false (the default value), apps can call the
AudioManager volume management APIs and change the volume by
stream type in the software mixer. This may be undesirable because of the
potential effect on other apps and the fact that volume attenuation in the
software mixer can result in fewer significant bits available in the
signal when received at the hardware amplifier. New devices that have not
been configured and that are set to
true receive volume changes
AudioManager volume and mute APIs.
be set to
true to allow for car audio service to intercept
volume key events. If set to
false (the default value) volume
key events can be forwarded to the foreground app and can lead to adverse
results from volume key event management outside the car audio service.
Car audio service configs
Before Android 13, car service configs were overwritten
with a product configuration overlay (to learn more, see
Customizing the build with resource overlays)
PRODUCT_PACKAGE_OVERLAYS := <path_to_overlay>
The location of the config file from
<path_to_overlay> to the actual
location should include
Car service RROs
Since Android 13, AAOS supports
Runtime resource overlays. Use an RRO to change the
value of the car audio configuration. For example, see the RROs for the
cuttlefish reference in
audioUseDynamicRouting config is overridden in
The resource overlay map is contained in
The resource overlay manifest defined in
targetPackage set as
See these resources for more information:
The method returns
true if the feature is enabled on the device, otherwise
false. In the
CarAudioManager#isAudioFeatureEnabled API, the parameter
passed in must be one of: