1################################################################################################ 2# 3# @NOTE: 4# Audio Policy Criteria file example for generic device build 5# 6# Any vendor shall have its own configuration within the corresponding device folder 7# 8################################################################################################ 9 10######################################################### 11# Criterion type Example: 12# For each criterion, a couple of numerical, literal values must be provided to the PFW. 13# The numerical part is not mandatory. If not filled by the user, a default numerical value will be 14# automatically provided by audio HAL using the following logic: 15# - Exclusive criterion: 16# * 0 -> first literal value, 17# * 1 -> second literal value, 18# ... 19# * N -> (N+1)th literal value. 20# - Inclusive criterion: 21# * 1 << 0 -> first literal value, 22# * 1 << 1 -> second literal value, 23# ... 24# * 1 << N -> (N+1)th literal value, 25# 26######################################################### 27# Policy { 28# InclusiveCriterionType|ExclusiveCriterionType { 29# <Criterion Name> [numerical value 1:]<literal value 1>,[numerical value 2:]<literal value 2>,<literal value 3>,... 30# } 31# } 32 33######################################################### 34# Criterion: 35######################################################### 36# Policy { 37# Criterion { 38# <Criterion Name> { 39# Type <Criterion type name> 40# Default <default value of the criterion> 41# } 42# } 43# } 44 45Policy { 46 InclusiveCriterionType { 47 # 48 # DO NOT CHANGE ORDER. This definition must be aligned with the definition of 49 # AUDIO_DEVICE_OUT_* within <system/audio.h> file of android. 50 # 51 OutputDevicesMaskType Earpiece,Speaker,WiredHeadset,WiredHeadphone,BluetoothSco,BluetoothScoHeadset,BluetoothScoCarkit,BluetoothA2dp,BluetoothA2dpHeadphones,BluetoothA2dpSpeaker,Hdmi,AnlgDockHeadset,DgtlDockHeadset,UsbAccessory,UsbDevice,RemoteSubmix,TelephonyTx,Line,HdmiArc,Spdif,Fm,AuxLine,SpeakerSafe 52 # 53 # DO NOT CHANGE ORDER. This definition must be aligned with the definition of 54 # AUDIO_DEVICE_IN_* within <system/audio.h> file of android. 55 # Note also that direction bit will be decimated by AudioHAL in order to allow using a mask 56 # with the cardinality of 1 between a bit and an input device. 57 # 58 InputDevicesMaskType Communication,Ambient,BuiltinMic,BluetoothScoHeadset,WiredHeadset,Hdmi,TelephonyRx,BackMic,RemoteSubmix,AnlgDockHeadset,DgtlDockHeadset,UsbAccessory,UsbDevice,FmTuner,TvTune,Line,Spdif,BluetoothA2dp,Loopback 59 } 60 ExclusiveCriterionType { 61 # 62 # The values of the mode MUST be aligned with the definition of the audio_mode_t 63 # from system/audio.h 64 # 65 AndroidModeType 0:Normal,1:RingTone,2:InCall,3:InCommunication 66 # 67 # The values of the mode MUST be aligned with the definition of the 68 # audio_policy_forced_config_t from system/audio.h 69 # 70 ForceUseForCommunicationType 0:ForceNone,1:ForceSpeaker,3:ForceBtSco 71 # 72 # The values of the mode MUST be aligned with the definition of the 73 # audio_policy_forced_config_t from system/audio.h 74 # 75 ForceUseForMediaType 0:ForceNone,1:ForceSpeaker,2:ForceHeadphones,4:ForceBtA2dp,5:ForceWiredAccessory,8:ForceAnalogDock,9:ForceDigitalDock,10:ForceNoBtA2dp 76 # 77 # The values of the mode MUST be aligned with the definition of the 78 # audio_policy_forced_config_t from system/audio.h 79 # 80 ForceUseForRecordType 0:ForceNone,3:ForceBtSco,5:ForceWiredAccessory 81 # 82 # The values of the mode MUST be aligned with the definition of the 83 # audio_policy_forced_config_t from system/audio.h 84 # 85 ForceUseForDockType 0:ForceNone,5:ForceWiredAccessory,6:ForceBtCarDock,7:ForceBtDeskDock,8:ForceAnalogDock,9:ForceDigitalDock 86 # 87 # The values of the mode MUST be aligned with the definition of the 88 # audio_policy_forced_config_t from system/audio.h 89 # 90 ForceUseForSystemType 0:ForceNone,11:ForceSystemEnforced 91 # 92 # The values of the mode MUST be aligned with the definition of the 93 # audio_policy_forced_config_t from system/audio.h 94 # 95 ForceUseForHdmiSystemAudioType 0:ForceNone,12:ForceHdmiSystemEnforced 96 # 97 # The values of the mode MUST be aligned with the definition of the 98 # audio_policy_forced_config_t from system/audio_policy.h 99 # 100 ForceUseForEncodedSurroundType 0:ForceNone,13:ForceEncodedSurroundNever,14:ForceEncodedSurroundAlways 101 } 102 103 Criterion { 104 AvailableInputDevices { 105 Type InputDevicesMaskType 106 Default none 107 } 108 AvailableOutputDevices { 109 Type OutputDevicesMaskType 110 Default none 111 } 112 TelephonyMode { 113 Type AndroidModeType 114 Default Normal 115 } 116 ForceUseForCommunication { 117 Type ForceUseForCommunicationType 118 Default ForceNone 119 } 120 ForceUseForMedia { 121 Type ForceUseForMediaType 122 Default ForceNone 123 } 124 ForceUseForRecord { 125 Type ForceUseForRecordType 126 Default ForceNone 127 } 128 ForceUseForDock { 129 Type ForceUseForDockType 130 Default ForceNone 131 } 132 ForceUseForSystem { 133 Type ForceUseForSystemType 134 Default ForceNone 135 } 136 ForceUseForHdmiSystemAudio { 137 Type ForceUseForHdmiSystemAudioType 138 Default ForceNone 139 } 140 ForceUseForEncodedSurround { 141 Type ForceUseForEncodedSurroundType 142 Default ForceNone 143 } 144 } 145} 146 147