summaryrefslogtreecommitdiffstats
path: root/services/audiopolicy/engineconfigurable/wrapper/config/audio_policy_criteria.conf
blob: a4ffdd534f145a4705d32653c6db3fb3853a3a0b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
################################################################################################
#
# @NOTE:
# Audio Policy Criteria file example for generic device build
#
# Any vendor shall have its own configuration within the corresponding device folder
#
################################################################################################

#########################################################
# Criterion type Example:
# For each criterion, a couple of numerical, literal values must be provided to the PFW.
# The numerical part is not mandatory. If not filled by the user, a default numerical value will be
# automatically provided by audio HAL using the following logic:
#   - Exclusive criterion:
#          * 0 -> first literal value,
#          * 1 -> second literal value,
#               ...
#          * N -> (N+1)th literal value.
#   - Inclusive criterion:
#          * 1 << 0 -> first literal value,
#          * 1 << 1 -> second literal value,
#               ...
#          * 1 << N -> (N+1)th literal value,
#
#########################################################
# Route|Audio {
#    InclusiveCriterionType|ExclusiveCriterionType {
#        <Criterion Name>  [numerical value 1:]<literal value 1>,[numerical value 2:]<literal value 2>,<literal value 3>,...
#    }
# }

#########################################################
# Criterion:
#########################################################
# Route|Audio {
#    Criterion {
#        <Criterion Name> {
#            Type            <Criterion type name>
#            Default         <default value of the criterion>
#        }
#    }
# }

Policy {
    ExclusiveCriterionType {
        #
        # The values of the mode MUST be aligned with the definition of the audio_mode_t
        # from system/audio.h
        #
        AndroidModeType     0:Normal,1:RingTone,2:InCall,3:InCommunication
    }
    InclusiveCriterionType {
        #
        # DO NOT CHANGE ORDER. This definition must be aligned with the definition of
        # AUDIO_DEVICE_OUT_* within <system/audio.h> file of android.
        #
        OutputDevicesMaskType   Earpiece,Speaker,WiredHeadset,WiredHeadphone,BluetoothSco,BluetoothScoHeadset,BluetoothScoCarkit,BluetoothA2dp,BluetoothA2dpHeadphones,BluetoothA2dpSpeaker,Hdmi,AnlgDockHeadset,DgtlDockHeadset,UsbAccessory,UsbDevice,RemoteSubmix,TelephonyTx,Line,HdmiArc,Spdif,Fm,AuxLine,SpeakerSafe
    }
    InclusiveCriterionType {
        #
        # DO NOT CHANGE ORDER. This definition must be aligned with the definition of
        # AUDIO_DEVICE_IN_* within <system/audio.h> file of android.
        # Note also that direction bit will be decimated by AudioHAL in order to allow using a mask
        # with the cardinality of 1 between a bit and an input device.
        #
        InputDevicesMaskType    Communication,Ambient,BuiltinMic,BluetoothScoHeadset,WiredHeadset,Hdmi,TelephonyRx,BackMic,RemoteSubmix,AnlgDockHeadset,DgtlDockHeadset,UsbAccessory,UsbDevice,FmTuner,TvTune,Line,Spdif,BluetoothA2dp,Loopback
    }
    ExclusiveCriterionType {
        #
        # The values of the mode MUST be aligned with the definition of the
        # audio_policy_forced_config_t from system/audio.h
        #
        ForceUseForCommunicationType    0:ForceNone,1:ForceSpeaker,3:ForceBtSco
    }
    ExclusiveCriterionType {
        #
        # The values of the mode MUST be aligned with the definition of the
        # audio_policy_forced_config_t from system/audio.h
        #
        ForceUseForMediaType            0:ForceNone,1:ForceSpeaker,2:ForceHeadphones,4:ForceBtA2dp,5:ForceWiredAccessory,8:ForceAnalogDock,9:ForceDigitalDock,10:ForceNoBtA2dp
    }
    ExclusiveCriterionType {
        #
        # The values of the mode MUST be aligned with the definition of the
        # audio_policy_forced_config_t from system/audio.h
        #
        ForceUseForRecordType           0:ForceNone,3:ForceBtSco,5:ForceWiredAccessory
    }
    ExclusiveCriterionType {
        #
        # The values of the mode MUST be aligned with the definition of the
        # audio_policy_forced_config_t from system/audio.h
        #
        ForceUseForDockType             0:ForceNone,5:ForceWiredAccessory,6:ForceBtCarDock,7:ForceBtDeskDock,8:ForceAnalogDock,9:ForceDigitalDock
    }
    ExclusiveCriterionType {
        #
        # The values of the mode MUST be aligned with the definition of the
        # audio_policy_forced_config_t from system/audio.h
        #
        ForceUseForSystemType           0:ForceNone,11:ForceSystemEnforced
    }
    ExclusiveCriterionType {
        #
        # The values of the mode MUST be aligned with the definition of the
        # audio_policy_forced_config_t from system/audio.h
        #
        ForceUseForHdmiSystemAudioType  0:ForceNone,12:ForceHdmiSystemEnforced
    }
    ExclusiveCriterionType {
        Rate   8000,11025,12000,16000,22050,24000,32000,44100,48000,96000,176400,192000
    }
    ExclusiveCriterionType {
        Format  Mp3,AmrNb,AmrWb,Aac,HeAacV1,HeAacV2,Vorbis,Pcm16Bit,Pcm8Bit,Pcm32Bit,Pcm8_24Bit
    }
    InclusiveCriterionType {
        OutputChannelMask    FrontLeft,FrontRight,FrontCenter,LowFrequence,BackLeft,BackRight,FromLeftOfCenter,FromRightOfCenter,BackCenter,SideLeft,SideRight,TopCenter,TopFrontLeft,TopFrontCenter,TopFrontRight,TopBackLeft,TopBackCenter,TopBackRight
    }
    ExclusiveCriterionType {
        OutputChannelMasks    Mono,Stereo,Quad,QuadBack,QuadSide,5Point1,5Point1Back,5Point1Side,7Point1,All
    }
    InclusiveCriterionType {
        InputChannelMask   Left,Right,Front,Back,LeftProcessed,RightProcessed,FrontProcessed,BackProcessed,Pressure,XAxis,YAxis,ZAxis,VoiceUplink,VoiceDnlink
    }
    ExclusiveCriterionType {
        InputChannelMasks   Mono,Stereo,FrontBack,VoiceUplinkDnlink,All
    }
    InclusiveCriterionType {
        OutputFlags  Direct,Primary,Fast,DeepBuffer,CompressOffload,NonBlocking,HwAvSync
    }
    ExclusiveCriterionType {
        InputSource     Default,Mic,VoiceUplink,VoiceDownlink,VoiceCall,Camcorder,VoiceRecognition,VoiceCommunication,RemoteSubmix,Hotword
    }


    Criterion {
        AvailableInputDevices {
            Type            InputDevicesMaskType
            Default         none
        }
    }
    Criterion {
        AvailableOutputDevices {
            Type            OutputDevicesMaskType
            Default         none
        }
    }
    Criterion {
        TelephonyMode {
            Type            AndroidModeType
            Default         Normal
        }
    }
    Criterion {
        ForceUseForCommunication {
            Type            ForceUseForCommunicationType
            Default         ForceNone
        }
    }
    Criterion {
        ForceUseForMedia {
            Type            ForceUseForMediaType
            Default         ForceNone
        }
    }
    Criterion {
        ForceUseForRecord {
            Type            ForceUseForRecordType
            Default         ForceNone
        }
    }
    Criterion {
        ForceUseForDock {
            Type            ForceUseForDockType
            Default         ForceNone
        }
    }
    Criterion {
        ForceUseForSystem {
            Type            ForceUseForSystemType
            Default         ForceNone
        }
    }
    Criterion {
        ForceUseForHdmiSystemAudio {
            Type            ForceUseForHdmiSystemAudioType
            Default         ForceNone
        }
    }
}