151 lines
8.8 KiB
XML
151 lines
8.8 KiB
XML
<?xml version="1.0" encoding="UTF-8"?>
|
|
<audio_effects_conf version="2.0" xmlns="http://schemas.android.com/audio/audio_effects_conf/v2_0">
|
|
<!-- Overview.
|
|
This example config file was copy from existing one: frameworks/av/media/libeffects/data/
|
|
audio_effects.xml, with effect library names updated to AIDL libraries we currently have.
|
|
|
|
All "library" attributes in "effect" element must must match a "library" element with the
|
|
same value of the "name" attribute.
|
|
All "effect" attributes in "preprocess" and "postprocess" element must match an "effect"
|
|
element with the same value of the "name" attribute.
|
|
|
|
AIDL EffectFactory are relying on the "name" attribute in "effect" element to identify the
|
|
effect type, so it's necessary to have the mapping from name to effect type UUID. Make
|
|
sure to either use existing effect name as key of
|
|
::android::hardware::audio::effect::kUuidNameTypeMap, or add a new {name, typeUUID} map
|
|
item to the kUuidNameTypeMap.
|
|
|
|
Existing audio_effects.xml should working without any change as long as:
|
|
1. "path" attribute of "library" element matches with the actual effect library name.
|
|
2. "name" attribute of "effect" and "effectProxy" element correctly added as key of
|
|
kUuidNameTypeMap, with value matches Identity.type in Descriptor.aidl.
|
|
3. "uuid" attribute of "effect" element matches Identity.uuid in Descriptor.aidl.
|
|
4. "uuid" attribute of "effectProxy" element matches Identity.proxy in Descriptor.aidl.
|
|
-->
|
|
|
|
<!-- List of effect libraries to load.
|
|
Each library element must contain a "name" attribute and a "path" attribute giving the
|
|
name of a library .so file on the target device.
|
|
-->
|
|
<libraries>
|
|
<library name="bundle" path="libbundleaidl_rpi.so"/>
|
|
<library name="downmix" path="libdownmixaidl_rpi.so"/>
|
|
<library name="dynamics_processing" path="libdynamicsprocessingaidl_rpi.so"/>
|
|
<library name="loudness_enhancer" path="libloudnessenhanceraidl_rpi.so"/>
|
|
<library name="reverb" path="libreverbaidl_rpi.so"/>
|
|
<library name="visualizer" path="libvisualizeraidl_rpi.so"/>
|
|
</libraries>
|
|
|
|
<!-- list of effects to load.
|
|
Each "effect" element must contain a "name", "library" and a "uuid" attribute, an optional
|
|
"type" attribute can be used to add any customized effect type.
|
|
The value of the "library" attribute must correspond to the name of one library element in
|
|
the "libraries" element.
|
|
The "name" attribute used to specific effect type, and should be mapping to a key of
|
|
aidl::android::hardware::audio::effect::kUuidNameTypeMap.
|
|
The "uuid" attribute is the implementation specific UUID as specified by the effect vendor.
|
|
|
|
Effect proxy can be supported with "effectProxy" element, each sub-element should contain
|
|
"library" and "uuid" attribute, all other attributes were ignored. Framework side use
|
|
result of IFactory.queryEffects() to decide which effect implementation should be part of
|
|
proxy and which not.
|
|
|
|
Only "name", "library", "uuid", and "type" attributes in "effects" element are meaningful
|
|
and parsed out by EffectConfig class, all other attributes are ignored.
|
|
Only "name" and "uuid" attributes in "effectProxy" element are meaningful and parsed out
|
|
by EffectConfig class, all other attributes are ignored.
|
|
-->
|
|
|
|
<effects>
|
|
<effect name="bassboost" library="bundle" uuid="8631f300-72e2-11df-b57e-0002a5d5c51b"/>
|
|
<effect name="downmix" library="downmix" uuid="93f04452-e4fe-41cc-91f9-e475b6d1d69f"/>
|
|
<effect name="dynamics_processing" library="dynamics_processing" uuid="e0e6539b-1781-7261-676f-6d7573696340"/>
|
|
<effect name="equalizer" library="bundle" uuid="ce772f20-847d-11df-bb17-0002a5d5c51b"/>
|
|
<effect name="loudness_enhancer" library="loudness_enhancer" uuid="fa415329-2034-4bea-b5dc-5b381c8d1e2c"/>
|
|
<effect name="reverb_env_aux" library="reverb" uuid="4a387fc0-8ab3-11df-8bad-0002a5d5c51b"/>
|
|
<effect name="reverb_env_ins" library="reverb" uuid="c7a511a0-a3bb-11df-860e-0002a5d5c51b"/>
|
|
<effect name="reverb_pre_aux" library="reverb" uuid="f29a1400-a3bb-11df-8ddc-0002a5d5c51b"/>
|
|
<effect name="reverb_pre_ins" library="reverb" uuid="172cdf00-a3bc-11df-a72f-0002a5d5c51b"/>
|
|
<effect name="virtualizer" library="bundle" uuid="1d4033c0-8557-11df-9f2d-0002a5d5c51b"/>
|
|
<effect name="visualizer" library="visualizer" uuid="d069d9e0-8329-11df-9168-0002a5d5c51b"/>
|
|
<effect name="volume" library="bundle" uuid="119341a0-8469-11df-81f9-0002a5d5c51b"/>
|
|
</effects>
|
|
|
|
<!-- Audio pre processor configurations.
|
|
The pre processor configuration is described in a "preprocess" element and consists in a
|
|
list of elements each describing pre processor settings for a given use case or "stream".
|
|
Each stream element has a "type" attribute corresponding to the input source used.
|
|
Valid types are these defined in system/hardware/interfaces/media/aidl/android/media/audio/
|
|
common/AudioSource.aidl.
|
|
Each "stream" element contains a list of "apply" elements indicating one effect to apply.
|
|
The effect to apply is designated by its name in the "effects" elements.
|
|
If there are more than one effect apply to one stream, the audio framework will apply them
|
|
in the same equence as they listed in "stream" element.
|
|
|
|
<preprocess>
|
|
<stream type="voice_communication">
|
|
<apply effect="aec"/>
|
|
<apply effect="ns"/>
|
|
</stream>
|
|
</preprocess>
|
|
-->
|
|
|
|
<!-- Audio post processor configurations.
|
|
The post processor configuration is described in a "postprocess" element and consists in a
|
|
list of elements each describing post processor settings for a given use case or "stream".
|
|
Each stream element has a "type" attribute corresponding to the stream type used.
|
|
Valid types are these defined in system/hardware/interfaces/media/aidl/android/media/audio/
|
|
common/AudioStreamType.aidl.
|
|
Each "stream" element contains a list of "apply" elements indicating one effect to apply.
|
|
The effect to apply is designated by its name in the "effects" elements.
|
|
If there are more than one effect apply to one stream, the audio framework will apply them
|
|
in the same equence as they listed in "stream" element.
|
|
|
|
<postprocess>
|
|
<stream type="music">
|
|
<apply effect="music_post_proc"/>
|
|
</stream>
|
|
<stream type="voice_call">
|
|
<apply effect="voice_post_proc"/>
|
|
</stream>
|
|
<stream type="notification">
|
|
<apply effect="notification_post_proc"/>
|
|
</stream>
|
|
</postprocess>
|
|
-->
|
|
|
|
<!-- Device pre/post processor configurations.
|
|
The device pre/post processor configuration is described in a deviceEffects element and
|
|
consists in a list of elements each describing pre/post processor settings for a given
|
|
device.
|
|
Each device element has a "type" attribute corresponding to the device type (e.g.
|
|
speaker, bus), an "address" attribute corresponding to the device address and contains a
|
|
list of "apply" elements indicating one effect to apply.
|
|
If the device is a source, only pre processing effects are expected, if the
|
|
device is a sink, only post processing effects are expected.
|
|
The effect to apply is designated by its name in the "effects" elements.
|
|
The effect will be enabled by default and the audio framework will automatically add
|
|
and activate the effect if the given port is involved in an audio patch.
|
|
If the patch is "HW", the effect must be HW accelerated.
|
|
Note:
|
|
-Device are not expected to be always attached. It may be loaded dynamically. As the device
|
|
effect manager is getting called on any audio patch operation, it will ensure if the given
|
|
device is involved in an audio patch and attach the requested effect.
|
|
-Address is optional. If not set, the match to instantiate the device effect will be done
|
|
using the given type and device (of this type) with empty address only.
|
|
|
|
<deviceEffects>
|
|
<device type="AUDIO_DEVICE_OUT_BUS" address="BUS00_USAGE_MAIN">
|
|
<apply effect="equalizer"/>
|
|
</device>
|
|
<device type="AUDIO_DEVICE_OUT_BUS" address="BUS04_USAGE_VOICE">
|
|
<apply effect="volume"/>
|
|
</device>
|
|
<device type="AUDIO_DEVICE_IN_BUILTIN_MIC" address="bottom">
|
|
<apply effect="agc"/>
|
|
</device>
|
|
</deviceEffects>
|
|
-->
|
|
|
|
</audio_effects_conf>
|