blob: 28a765631b61fc93c46c2c174580b16fd3d1465a [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"/>
32 <library name="agcsw" path="libagcsw.so"/>
Shunkai Yao60b34b72022-11-10 17:16:50 +000033 <library name="bassboostsw" path="libbassboostsw.so"/>
34 <library name="bundle" path="libbundleaidl.so"/>
Shraddha Basantwani4ff86982022-12-13 16:31:49 +053035 <library name="downmix" path="libdownmixaidl.so"/>
Shunkai Yao60b34b72022-11-10 17:16:50 +000036 <library name="dynamics_processingsw" path="libdynamicsprocessingsw.so"/>
37 <library name="equalizersw" path="libequalizersw.so"/>
38 <library name="haptic_generatorsw" path="libhapticgeneratorsw.so"/>
Shraddha Basantwani22834ea2022-12-08 16:09:05 +053039 <library name="loudness_enhancer" path="libloudnessenhanceraidl.so"/>
Shunkai Yaobd862b82022-12-20 00:11:41 +000040 <library name="nssw" path="libnssw.so"/>
Shunkai Yao812d5b42022-11-16 18:08:50 +000041 <library name="env_reverbsw" path="libenvreverbsw.so"/>
42 <library name="preset_reverbsw" path="libpresetreverbsw.so"/>
Shunkai Yao60b34b72022-11-10 17:16:50 +000043 <library name="virtualizersw" path="libvirtualizersw.so"/>
44 <library name="visualizersw" path="libvisualizersw.so"/>
45 <library name="volumesw" path="libvolumesw.so"/>
46 </libraries>
47
48 <!-- list of effects to load.
49 Each "effect" element must contain a "name", "library" and a "uuid" attribute.
50 The value of the "library" attribute must correspond to the name of one library element in
51 the "libraries" element.
52 The "name" attribute used to specific effect type, and should be mapping to a key of
53 aidl::android::hardware::audio::effect::kUuidNameTypeMap.
54 The "uuid" attribute is the implementation specific UUID as specified by the effect vendor.
55
56 Effect proxy can be supported with "effectProxy" element, each sub-element should contain
57 "library" and "uuid" attribute, all other attributes were ignored. Framework side use
58 result of IFactory.queryEffects() to decide which effect implementation should be part of
59 proxy and which not.
60
61 Only "name", "library", and "uuid" attributes in "effects" element are meaningful and
62 parsed out by EffectConfig class, all other attributes are ignored.
63 Only "name" and "uuid" attributes in "effectProxy" element are meaningful and parsed out
64 by EffectConfig class, all other attributes are ignored.
65 -->
66
67 <effects>
Shunkai Yaobd862b82022-12-20 00:11:41 +000068 <effect name="acoustic_echo_canceler" library="aecsw" uuid="bb392ec0-8d4d-11e0-a896-0002a5d5c51b"/>
69 <effect name="automatic_gain_control" library="agcsw" uuid="89f38e65-d4d2-4d64-ad0e-2b3e799ea886"/>
Shraddha Basantwani3a2fb032022-11-22 11:04:35 +053070 <effectProxy name="bassboost" uuid="14804144-a5ee-4d24-aa88-0002a5d5c51b">
71 <libsw library="bassboostsw" uuid="fa8181f2-588b-11ed-9b6a-0242ac120002"/>
72 <libsw library="bundle" uuid="8631f300-72e2-11df-b57e-0002a5d5c51b"/>
73 </effectProxy>
Shraddha Basantwani4ff86982022-12-13 16:31:49 +053074 <effect name="downmix" library="downmix" uuid="93f04452-e4fe-41cc-91f9-e475b6d1d69f"/>
Shunkai Yao60b34b72022-11-10 17:16:50 +000075 <effect name="dynamics_processing" library="dynamics_processingsw" uuid="fa818d78-588b-11ed-9b6a-0242ac120002"/>
76 <effect name="haptic_generator" library="haptic_generatorsw" uuid="fa819110-588b-11ed-9b6a-0242ac120002"/>
Shraddha Basantwani22834ea2022-12-08 16:09:05 +053077 <effect name="loudness_enhancer" library="loudness_enhancer" uuid="fa415329-2034-4bea-b5dc-5b381c8d1e2c"/>
Shunkai Yao812d5b42022-11-16 18:08:50 +000078 <effect name="env_reverb" library="env_reverbsw" uuid="fa819886-588b-11ed-9b6a-0242ac120002"/>
Shunkai Yaobd862b82022-12-20 00:11:41 +000079 <effect name="noise_suppression" library="nssw" uuid="c06c8400-8e06-11e0-9cb6-0002a5d5c51b"/>
Shunkai Yao812d5b42022-11-16 18:08:50 +000080 <effect name="preset_reverb" library="preset_reverbsw" uuid="fa8199c6-588b-11ed-9b6a-0242ac120002"/>
Shunkai Yao60b34b72022-11-10 17:16:50 +000081 <effect name="virtualizer" library="virtualizersw" uuid="fa819d86-588b-11ed-9b6a-0242ac120002"/>
82 <effect name="visualizer" library="visualizersw" uuid="fa81a0f6-588b-11ed-9b6a-0242ac120002"/>
83 <effect name="volume" library="volumesw" uuid="fa81a718-588b-11ed-9b6a-0242ac120002"/>
Shunkai Yao812d5b42022-11-16 18:08:50 +000084 <effectProxy name="equalizer" uuid="c8e70ecd-48ca-456e-8a4f-0002a5d5c51b">
Shunkai Yao60b34b72022-11-10 17:16:50 +000085 <libsw library="equalizersw" uuid="0bed4300-847d-11df-bb17-0002a5d5c51b"/>
86 <libsw library="bundle" uuid="ce772f20-847d-11df-bb17-0002a5d5c51b"/>
87 </effectProxy>
88 </effects>
89
90 <!-- Audio pre processor configurations.
91 The pre processor configuration is described in a "preprocess" element and consists in a
92 list of elements each describing pre processor settings for a given use case or "stream".
93 Each stream element has a "type" attribute corresponding to the input source used.
94 Valid types are these defined in system/hardware/interfaces/media/aidl/android/media/audio/
95 common/AudioSource.aidl.
96 Each "stream" element contains a list of "apply" elements indicating one effect to apply.
97 The effect to apply is designated by its name in the "effects" elements.
98 If there are more than one effect apply to one stream, the audio framework will apply them
99 in the same equence as they listed in "stream" element.
100
101 <preprocess>
102 <stream type="voice_communication">
103 <apply effect="aec"/>
104 <apply effect="ns"/>
105 </stream>
106 </preprocess>
107 -->
108
109 <!-- Audio post processor configurations.
110 The post processor configuration is described in a "postprocess" element and consists in a
111 list of elements each describing post processor settings for a given use case or "stream".
112 Each stream element has a "type" attribute corresponding to the stream type used.
113 Valid types are these defined in system/hardware/interfaces/media/aidl/android/media/audio/
114 common/AudioStreamType.aidl.
115 Each "stream" element contains a list of "apply" elements indicating one effect to apply.
116 The effect to apply is designated by its name in the "effects" elements.
117 If there are more than one effect apply to one stream, the audio framework will apply them
118 in the same equence as they listed in "stream" element.
119
120 <postprocess>
121 <stream type="music">
122 <apply effect="music_post_proc"/>
123 </stream>
124 <stream type="voice_call">
125 <apply effect="voice_post_proc"/>
126 </stream>
127 <stream type="notification">
128 <apply effect="notification_post_proc"/>
129 </stream>
130 </postprocess>
131 -->
132
133</audio_effects_conf>