<?xml version="1.0" encoding="utf-8"?>
<!-- Copyright (C) 2024 The Android Open Source Project
     Licensed under the Apache License, Version 2.0 (the "License");
     you may not use this file except in compliance with the License.
     You may obtain a copy of the License at
          http://www.apache.org/licenses/LICENSE-2.0
     Unless required by applicable law or agreed to in writing, software
     distributed under the License is distributed on an "AS IS" BASIS,
     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
     See the License for the specific language governing permissions and
     limitations under the License.
-->
<carAudioConfiguration version="4">
    <deviceConfigurations>
        <deviceConfiguration name="useHalDuckingSignals" value="false" />
        <deviceConfiguration name="useCoreAudioRouting" value="true" />
        <deviceConfiguration name="useCoreAudioVolume" value="true" />
        <deviceConfiguration name="useCarVolumeGroupMuting" value="false" />
    </deviceConfigurations>
    <oemContexts>
        <oemContext name="oem_context">
            <audioAttributes>
                <audioAttribute usage="AUDIO_USAGE_ASSISTANCE_NAVIGATION_GUIDANCE"
                    contentType="AUDIO_CONTENT_TYPE_SPEECH"
                    tags="oem=extension_8675309" />
            </audioAttributes>
        </oemContext>
        <oemContext name="oem_music">
            <audioAttributes>
                <usage value="AUDIO_USAGE_MEDIA" />
                <usage value="AUDIO_USAGE_GAME" />
                <usage value="AUDIO_USAGE_UNKNOWN" />
            </audioAttributes>
        </oemContext>
        <oemContext name="oem_notification">
            <audioAttributes>
                <usage value="AUDIO_USAGE_NOTIFICATION" />
                <usage value="AUDIO_USAGE_NOTIFICATION_EVENT" />
            </audioAttributes>
        </oemContext>
        <oemContext name="oem_voice_command">
            <audioAttributes>
                <usage value="AUDIO_USAGE_ASSISTANT" />
                <usage value="AUDIO_USAGE_ASSISTANCE_ACCESSIBILITY" />
                <usage value="AUDIO_USAGE_ASSISTANCE_NAVIGATION_GUIDANCE" />
            </audioAttributes>
        </oemContext>
        <oemContext name="oem_call">
            <audioAttributes>
                <usage value="AUDIO_USAGE_VOICE_COMMUNICATION" />
                <usage value="AUDIO_USAGE_CALL_ASSISTANT" />
                <usage value="AUDIO_USAGE_VOICE_COMMUNICATION_SIGNALLING" />
            </audioAttributes>
        </oemContext>
        <oemContext name="oem_call_ring">
            <audioAttributes>
                <usage value="AUDIO_USAGE_NOTIFICATION_TELEPHONY_RINGTONE" />
            </audioAttributes>
        </oemContext>
        <oemContext name="oem_alarm">
            <audioAttributes>
                <usage value="AUDIO_USAGE_ALARM" />
            </audioAttributes>
        </oemContext>
        <oemContext name="oem_system_sound">
            <audioAttributes>
                <usage value="AUDIO_USAGE_ASSISTANCE_SONIFICATION" />
                <usage value="AUDIO_USAGE_EMERGENCY" />
                <usage value="AUDIO_USAGE_SAFETY" />
                <usage value="AUDIO_USAGE_VEHICLE_STATUS" />
                <usage value="AUDIO_USAGE_ANNOUNCEMENT" />
            </audioAttributes>
        </oemContext>
    </oemContexts>
    <activationVolumeConfigs>
        <activationVolumeConfig name="on_boot_config">
            <activationVolumeConfigEntry maxActivationVolumePercentage="80" invocationType="onBoot" />
        </activationVolumeConfig>
        <activationVolumeConfig name="on_source_changed_config">
            <activationVolumeConfigEntry minActivationVolumePercentage="20" maxActivationVolumePercentage="80" invocationType="onSourceChanged" />
        </activationVolumeConfig>
        <activationVolumeConfig name="on_playback_changed_config">
            <activationVolumeConfigEntry minActivationVolumePercentage="10" maxActivationVolumePercentage="90" invocationType="onPlaybackChanged" />
        </activationVolumeConfig>
    </activationVolumeConfigs>
    <mirroringDevices>
        <mirroringDevice address="mirror_bus_device_three"/>
        <mirroringDevice address="mirror_bus_device_four"/>
    </mirroringDevices>
    <zones>
        <zone name="driver zone" isPrimary="true" audioZoneId="0" occupantZoneId="0">
            <zoneConfigs>
                <zoneConfig name="driver zone config 0" isDefault="true">
                    <volumeGroups>
                        <group name="entertainment" activationConfig="on_boot_config">
                            <device address="BUS00_MEDIA">
                                <context context="oem_music"/>
                            </device>
                        </group>
                        <group name="navvoicecommand" activationConfig="on_source_changed_config">
                            <device address="BUS02_NAV_GUIDANCE">
                                <context context="oem_voice_command"/>
                            </device>
                        </group>
                        <group name="telringvol" activationConfig="on_playback_changed_config">
                            <device address="BUS03_PHONE">
                                <context context="oem_call"/>
                                <context context="oem_call_ring"/>
                            </device>
                        </group>
                        <group name="systemalarm" activationConfig="on_source_changed_config">
                            <device address="BUS01_SYS_NOTIFICATION">
                                <context context="oem_alarm"/>
                                <context context="oem_system_sound"/>
                                <context context="oem_notification"/>
                            </device>
                        </group>
                    </volumeGroups>
                    <applyFadeConfigs>
                        <fadeConfig name="relaxed fading" isDefault="true">
                        </fadeConfig>
                        <fadeConfig name="aggressive fading">
                            <audioAttributes>
                                <usage value="AUDIO_USAGE_VOICE_COMMUNICATION" />
                                <usage value="AUDIO_USAGE_ANNOUNCEMENT" />
                                <usage value="AUDIO_USAGE_VEHICLE_STATUS" />
                                <usage value="AUDIO_USAGE_SAFETY" />
                            </audioAttributes>
                        </fadeConfig>
                        <fadeConfig name="disabled fading">
                            <audioAttributes>
                                <usage value="AUDIO_USAGE_EMERGENCY" />
                            </audioAttributes>
                        </fadeConfig>
                    </applyFadeConfigs>
                </zoneConfig>
            </zoneConfigs>
        </zone>
        <zone name="front passenger zone" audioZoneId="1" occupantZoneId="1">
            <zoneConfigs>
                <zoneConfig name="front passenger config 0" isDefault="true">
                    <volumeGroups>
                        <group  name="entertainment" activationConfig="on_boot_config">
                            <device address="BUS_FRONT">
                                <context context="oem_music"/>
                                <context context="oem_voice_command"/>
                                <context context="oem_call"/>
                                <context context="oem_call_ring"/>
                                <context context="oem_alarm"/>
                                <context context="oem_system_sound"/>
                                <context context="oem_notification"/>
                            </device>
                        </group>
                    </volumeGroups>
                    <applyFadeConfigs>
                        <fadeConfig name="relaxed fading" isDefault="true">
                        </fadeConfig>
                        <fadeConfig name="disabled fading">
                            <audioAttributes>
                                <usage value="AUDIO_USAGE_EMERGENCY" />
                            </audioAttributes>
                        </fadeConfig>
                    </applyFadeConfigs>
                </zoneConfig>
            </zoneConfigs>
        </zone>
        <zone name="rear seat zone" audioZoneId="2" occupantZoneId="2">
            <zoneConfigs>
                <zoneConfig name="rear seat config 0" isDefault="true">
                    <volumeGroups>
                        <group  name="entertainment" activationConfig="on_boot_config">
                            <device address="BUS_REAR">
                                <context context="oem_music"/>
                                <context context="oem_voice_command"/>
                                <context context="oem_call"/>
                                <context context="oem_call_ring"/>
                                <context context="oem_alarm"/>
                                <context context="oem_system_sound"/>
                                <context context="oem_notification"/>
                            </device>
                        </group>
                    </volumeGroups>
                    <applyFadeConfigs>
                        <fadeConfig name="relaxed fading" isDefault="true">
                        </fadeConfig>
                        <fadeConfig name="disabled fading">
                            <audioAttributes>
                                <usage value="AUDIO_USAGE_EMERGENCY" />
                            </audioAttributes>
                        </fadeConfig>
                    </applyFadeConfigs>
                </zoneConfig>
            </zoneConfigs>
        </zone>
    </zones>
</carAudioConfiguration>
