blob: 2e860d89fcec80579bf28345c5142f1dbf31c326 [file] [log] [blame]
Shunkai Yao60b34b72022-11-10 17:16:50 +00001<?xml version="1.0" encoding="UTF-8"?>
2<audio_effects_conf version="2.0" xmlns="http://schemas.android.com/audio/audio_effects_conf/v2_0">
3 <!-- Overview.
4 This example config file was copy from existing one: frameworks/av/media/libeffects/data/
5 audio_effects.xml, with effect library names updated to AIDL libraries we currently have.
6
7 All "library" attributes in "effect" element must must match a "library" element with the
8 same value of the "name" attribute.
9 All "effect" attributes in "preprocess" and "postprocess" element must match an "effect"
10 element with the same value of the "name" attribute.
11
12 AIDL EffectFactory are relying on the "name" attribute in "effect" element to identify the
13 effect type, so it's necessary to have the mapping from name to effect type UUID. Make
14 sure to either use existing effect name as key of
15 ::android::hardware::audio::effect::kUuidNameTypeMap, or add a new {name, typeUUID} map
16 item to the kUuidNameTypeMap.
17
18 Existing audio_effects.xml should working without any change as long as:
19 1. "path" attribute of "library" element matches with the actual effect library name.
20 2. "name" attribute of "effect" and "effectProxy" element correctly added as key of
21 kUuidNameTypeMap, with value matches Identity.type in Descriptor.aidl.
22 3. "uuid" attribute of "effect" element matches Identity.uuid in Descriptor.aidl.
23 4. "uuid" attribute of "effectProxy" element matches Identity.proxy in Descriptor.aidl.
24 -->
25
26 <!-- List of effect libraries to load.
27 Each library element must contain a "name" attribute and a "path" attribute giving the
28 name of a library .so file on the target device.
29 -->
30 <libraries>
Shunkai Yaobd862b82022-12-20 00:11:41 +000031 <library name="aecsw" path="libaecsw.so"/>
Shraddha Basantwanicac2e682023-02-15 18:03:58 +053032 <library name="agc1sw" path="libagc1sw.so"/>
Shraddha Basantwani84ea32e2023-02-01 16:22:37 +053033 <library name="agc2sw" path="libagc2sw.so"/>
Shunkai Yao60b34b72022-11-10 17:16:50 +000034 <library name="bassboostsw" path="libbassboostsw.so"/>
35 <library name="bundle" path="libbundleaidl.so"/>
Shraddha Basantwani4ff86982022-12-13 16:31:49 +053036 <library name="downmix" path="libdownmixaidl.so"/>
Ram Mohane4064ce2022-12-20 18:05:14 +053037 <library name="dynamics_processing" path="libdynamicsprocessingaidl.so"/>
Shunkai Yao60b34b72022-11-10 17:16:50 +000038 <library name="equalizersw" path="libequalizersw.so"/>
Shunkai Yao922576f2024-10-17 00:05:58 +000039 <library name="erasersw" path="liberasersw.so"/>
Shraddha Basantwaniae7dde52022-12-18 15:01:14 +053040 <library name="haptic_generator" path="libhapticgeneratoraidl.so"/>
Shraddha Basantwani22834ea2022-12-08 16:09:05 +053041 <library name="loudness_enhancer" path="libloudnessenhanceraidl.so"/>
Shunkai Yaobd862b82022-12-20 00:11:41 +000042 <library name="nssw" path="libnssw.so"/>
Shunkai Yao812d5b42022-11-16 18:08:50 +000043 <library name="env_reverbsw" path="libenvreverbsw.so"/>
Shraddha Basantwani9b5893a2023-01-20 23:51:23 +053044 <library name="pre_processing" path="libpreprocessingaidl.so"/>
Shunkai Yao812d5b42022-11-16 18:08:50 +000045 <library name="preset_reverbsw" path="libpresetreverbsw.so"/>
Shraddha Basantwanib83ec072022-12-29 19:43:38 +053046 <library name="reverb" path="libreverbaidl.so"/>
Shunkai Yao60b34b72022-11-10 17:16:50 +000047 <library name="virtualizersw" path="libvirtualizersw.so"/>
Shunkai Yaoe39cd362022-12-22 00:23:34 +000048 <library name="visualizer" path="libvisualizeraidl.so"/>
Shunkai Yao60b34b72022-11-10 17:16:50 +000049 <library name="volumesw" path="libvolumesw.so"/>
Shunkai Yao85b01692023-02-15 22:04:57 +000050 <library name="extensioneffect" path="libextensioneffect.so"/>
Shunkai Yaof60fc372023-12-12 17:48:18 +000051 <library name="spatializersw" path="libspatializersw.so"/>
Shunkai Yao60b34b72022-11-10 17:16:50 +000052 </libraries>
53
54 <!-- list of effects to load.
Shunkai Yao80e58502023-07-14 22:10:46 +000055 Each "effect" element must contain a "name", "library" and a "uuid" attribute, an optional
56 "type" attribute can be used to add any customized effect type.
Shunkai Yao60b34b72022-11-10 17:16:50 +000057 The value of the "library" attribute must correspond to the name of one library element in
58 the "libraries" element.
59 The "name" attribute used to specific effect type, and should be mapping to a key of
60 aidl::android::hardware::audio::effect::kUuidNameTypeMap.
61 The "uuid" attribute is the implementation specific UUID as specified by the effect vendor.
62
63 Effect proxy can be supported with "effectProxy" element, each sub-element should contain
64 "library" and "uuid" attribute, all other attributes were ignored. Framework side use
65 result of IFactory.queryEffects() to decide which effect implementation should be part of
66 proxy and which not.
67
Shunkai Yao80e58502023-07-14 22:10:46 +000068 Only "name", "library", "uuid", and "type" attributes in "effects" element are meaningful
69 and parsed out by EffectConfig class, all other attributes are ignored.
Shunkai Yao60b34b72022-11-10 17:16:50 +000070 Only "name" and "uuid" attributes in "effectProxy" element are meaningful and parsed out
71 by EffectConfig class, all other attributes are ignored.
72 -->
73
74 <effects>
Shraddha Basantwani9b5893a2023-01-20 23:51:23 +053075 <effect name="automatic_gain_control_v2" library="pre_processing" uuid="89f38e65-d4d2-4d64-ad0e-2b3e799ea886"/>
Shunkai Yao7a0eb7b2024-03-07 20:15:51 +000076 <effect name="bassboost" library="bundle" uuid="8631f300-72e2-11df-b57e-0002a5d5c51b"/>
Shraddha Basantwani4ff86982022-12-13 16:31:49 +053077 <effect name="downmix" library="downmix" uuid="93f04452-e4fe-41cc-91f9-e475b6d1d69f"/>
Ram Mohane4064ce2022-12-20 18:05:14 +053078 <effect name="dynamics_processing" library="dynamics_processing" uuid="e0e6539b-1781-7261-676f-6d7573696340"/>
Shunkai Yao240c1d42024-11-24 18:40:58 +000079 <effect name="eraser" library="erasersw" uuid="fa81ab46-588b-11ed-9b6a-0242ac120002"/>
Shraddha Basantwaniae7dde52022-12-18 15:01:14 +053080 <effect name="haptic_generator" library="haptic_generator" uuid="97c4acd1-8b82-4f2f-832e-c2fe5d7a9931"/>
Shraddha Basantwani22834ea2022-12-08 16:09:05 +053081 <effect name="loudness_enhancer" library="loudness_enhancer" uuid="fa415329-2034-4bea-b5dc-5b381c8d1e2c"/>
Shraddha Basantwanib83ec072022-12-29 19:43:38 +053082 <effect name="reverb_env_aux" library="reverb" uuid="4a387fc0-8ab3-11df-8bad-0002a5d5c51b"/>
83 <effect name="reverb_env_ins" library="reverb" uuid="c7a511a0-a3bb-11df-860e-0002a5d5c51b"/>
84 <effect name="reverb_pre_aux" library="reverb" uuid="f29a1400-a3bb-11df-8ddc-0002a5d5c51b"/>
85 <effect name="reverb_pre_ins" library="reverb" uuid="172cdf00-a3bc-11df-a72f-0002a5d5c51b"/>
Shunkai Yao7a0eb7b2024-03-07 20:15:51 +000086 <effect name="virtualizer" library="bundle" uuid="1d4033c0-8557-11df-9f2d-0002a5d5c51b"/>
Shunkai Yaoe39cd362022-12-22 00:23:34 +000087 <effect name="visualizer" library="visualizer" uuid="d069d9e0-8329-11df-9168-0002a5d5c51b"/>
Sham Rathod51d16c62022-12-19 17:21:59 +053088 <effect name="volume" library="bundle" uuid="119341a0-8469-11df-81f9-0002a5d5c51b"/>
Shunkai Yao7a0eb7b2024-03-07 20:15:51 +000089 <effect name="equalizer" library="bundle" uuid="ce772f20-847d-11df-bb17-0002a5d5c51b"/>
Shunkai Yao80e58502023-07-14 22:10:46 +000090 <effect name="extension_effect" library="extensioneffect" uuid="fa81dd00-588b-11ed-9b6a-0242ac120002" type="fa81de0e-588b-11ed-9b6a-0242ac120002"/>
Sneha Patil71b814c2023-12-08 14:33:34 +053091 <effect name="acoustic_echo_canceler" library="pre_processing" uuid="bb392ec0-8d4d-11e0-a896-0002a5d5c51b"/>
92 <effect name="noise_suppression" library="pre_processing" uuid="c06c8400-8e06-11e0-9cb6-0002a5d5c51b"/>
Shunkai Yao60b34b72022-11-10 17:16:50 +000093 </effects>
94
Shunkai Yao5824efb2023-05-08 21:16:13 +000095 <preprocess>
96 <stream type="voice_communication">
97 <apply effect="acoustic_echo_canceler"/>
98 <apply effect="noise_suppression"/>
99 </stream>
100 </preprocess>
101
Shunkai Yao60b34b72022-11-10 17:16:50 +0000102 <!-- Audio pre processor configurations.
103 The pre processor configuration is described in a "preprocess" element and consists in a
104 list of elements each describing pre processor settings for a given use case or "stream".
105 Each stream element has a "type" attribute corresponding to the input source used.
106 Valid types are these defined in system/hardware/interfaces/media/aidl/android/media/audio/
107 common/AudioSource.aidl.
108 Each "stream" element contains a list of "apply" elements indicating one effect to apply.
109 The effect to apply is designated by its name in the "effects" elements.
110 If there are more than one effect apply to one stream, the audio framework will apply them
111 in the same equence as they listed in "stream" element.
112
113 <preprocess>
114 <stream type="voice_communication">
115 <apply effect="aec"/>
116 <apply effect="ns"/>
117 </stream>
118 </preprocess>
119 -->
120
121 <!-- Audio post processor configurations.
122 The post processor configuration is described in a "postprocess" element and consists in a
123 list of elements each describing post processor settings for a given use case or "stream".
124 Each stream element has a "type" attribute corresponding to the stream type used.
125 Valid types are these defined in system/hardware/interfaces/media/aidl/android/media/audio/
126 common/AudioStreamType.aidl.
127 Each "stream" element contains a list of "apply" elements indicating one effect to apply.
128 The effect to apply is designated by its name in the "effects" elements.
129 If there are more than one effect apply to one stream, the audio framework will apply them
130 in the same equence as they listed in "stream" element.
131
132 <postprocess>
133 <stream type="music">
134 <apply effect="music_post_proc"/>
135 </stream>
136 <stream type="voice_call">
137 <apply effect="voice_post_proc"/>
138 </stream>
139 <stream type="notification">
140 <apply effect="notification_post_proc"/>
141 </stream>
142 </postprocess>
143 -->
144
François Gaffieed095e62024-05-30 13:50:50 +0200145 <!-- Device pre/post processor configurations.
146 The device pre/post processor configuration is described in a deviceEffects element and
147 consists in a list of elements each describing pre/post processor settings for a given
148 device.
149 Each device element has a "type" attribute corresponding to the device type (e.g.
150 speaker, bus), an "address" attribute corresponding to the device address and contains a
151 list of "apply" elements indicating one effect to apply.
152 If the device is a source, only pre processing effects are expected, if the
153 device is a sink, only post processing effects are expected.
154 The effect to apply is designated by its name in the "effects" elements.
155 The effect will be enabled by default and the audio framework will automatically add
156 and activate the effect if the given port is involved in an audio patch.
157 If the patch is "HW", the effect must be HW accelerated.
158 Note:
159 -Device are not expected to be always attached. It may be loaded dynamically. As the device
160 effect manager is getting called on any audio patch operation, it will ensure if the given
161 device is involved in an audio patch and attach the requested effect.
162 -Address is optional. If not set, the match to instantiate the device effect will be done
163 using the given type and device (of this type) with empty address only.
164
165 <deviceEffects>
166 <device type="AUDIO_DEVICE_OUT_BUS" address="BUS00_USAGE_MAIN">
167 <apply effect="equalizer"/>
168 </device>
169 <device type="AUDIO_DEVICE_OUT_BUS" address="BUS04_USAGE_VOICE">
170 <apply effect="volume"/>
171 </device>
172 <device type="AUDIO_DEVICE_IN_BUILTIN_MIC" address="bottom">
173 <apply effect="agc"/>
174 </device>
175 </deviceEffects>
176 -->
177
Shunkai Yao60b34b72022-11-10 17:16:50 +0000178</audio_effects_conf>