diff options
author | Denis 'GNUtoo' Carikli <GNUtoo@cyberdimension.org> | 2020-10-12 17:48:52 +0200 |
---|---|---|
committer | Denis 'GNUtoo' Carikli <GNUtoo@cyberdimension.org> | 2020-10-12 17:53:57 +0200 |
commit | e359178175d19538022f9eb32379c87836ec72ee (patch) | |
tree | 8d2371982a646d88e6f758d027d0a4a9afe80f8f | |
parent | 2ff3eb48b7d073d856525904aa0fe50e65a956ce (diff) | |
download | device_samsung_midas_common-e359178175d19538022f9eb32379c87836ec72ee.tar.gz device_samsung_midas_common-e359178175d19538022f9eb32379c87836ec72ee.tar.bz2 device_samsung_midas_common-e359178175d19538022f9eb32379c87836ec72ee.zip |
import audio config for future overriding
Signed-off-by: Denis 'GNUtoo' Carikli <GNUtoo@cyberdimension.org>
-rw-r--r-- | audio/audiopolicy/audio_policy_configuration_stub.xml | 34 | ||||
-rw-r--r-- | audio/audiopolicy/audio_policy_volumes.xml | 205 | ||||
-rw-r--r-- | audio/audiopolicy/default_volume_tables.xml | 129 | ||||
-rw-r--r-- | audio/audiopolicy/r_submix_audio_policy_configuration.xml | 47 | ||||
-rw-r--r-- | audio/audiopolicy/stub_audio_policy_configuration.xml | 46 | ||||
-rw-r--r-- | audio/audiopolicy/surround_sound_configuration_5_0.xml | 31 | ||||
-rw-r--r-- | audio/libeffects/audio_effects.xml | 102 | ||||
-rw-r--r-- | midas.mk | 14 |
8 files changed, 601 insertions, 7 deletions
diff --git a/audio/audiopolicy/audio_policy_configuration_stub.xml b/audio/audiopolicy/audio_policy_configuration_stub.xml new file mode 100644 index 0000000..8350eb8 --- /dev/null +++ b/audio/audiopolicy/audio_policy_configuration_stub.xml @@ -0,0 +1,34 @@ +<?xml version="1.0" encoding="UTF-8" standalone="yes"?> +<!-- Copyright (C) 2016 The Android Open Source Project + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +--> + +<audioPolicyConfiguration version="1.0" xmlns:xi="http://www.w3.org/2001/XInclude"> + <!-- Global configuration Decalaration --> + <globalConfiguration speaker_drc_enabled="false"/> + + <modules> + <!-- Stub Audio HAL --> + <xi:include href="stub_audio_policy_configuration.xml"/> + + <!-- Remote Submix Audio HAL --> + <xi:include href="r_submix_audio_policy_configuration.xml"/> + + </modules> + + <xi:include href="audio_policy_volumes.xml"/> + <xi:include href="default_volume_tables.xml"/> + <xi:include href="surround_sound_configuration_5_0.xml"/> + +</audioPolicyConfiguration> diff --git a/audio/audiopolicy/audio_policy_volumes.xml b/audio/audiopolicy/audio_policy_volumes.xml new file mode 100644 index 0000000..ec64a7c --- /dev/null +++ b/audio/audiopolicy/audio_policy_volumes.xml @@ -0,0 +1,205 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- Copyright (C) 2015 The Android Open Source Project + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +--> +<!-- Volume section defines a volume curve for a given use case and device category. +It contains a list of points of this curve expressing the attenuation in Millibels for a given +volume index from 0 to 100. +<volume stream=”AUDIO_STREAM_MUSIC” deviceCategory=””> +<point>0,-9600</point> +<point>100,0</point> +</volume> +--> + +<volumes> + <volume stream="AUDIO_STREAM_VOICE_CALL" deviceCategory="DEVICE_CATEGORY_HEADSET"> + <point>0,-4200</point> + <point>33,-2800</point> + <point>66,-1400</point> + <point>100,0</point> + </volume> + <volume stream="AUDIO_STREAM_VOICE_CALL" deviceCategory="DEVICE_CATEGORY_SPEAKER"> + <point>0,-2400</point> + <point>33,-1600</point> + <point>66,-800</point> + <point>100,0</point> + </volume> + <volume stream="AUDIO_STREAM_VOICE_CALL" deviceCategory="DEVICE_CATEGORY_EARPIECE"> + <point>0,-2400</point> + <point>33,-1600</point> + <point>66,-800</point> + <point>100,0</point> + </volume> + <volume stream="AUDIO_STREAM_VOICE_CALL" deviceCategory="DEVICE_CATEGORY_EXT_MEDIA" + ref="DEFAULT_MEDIA_VOLUME_CURVE"/> + <volume stream="AUDIO_STREAM_VOICE_CALL" deviceCategory="DEVICE_CATEGORY_HEARING_AID" + ref="DEFAULT_HEARING_AID_VOLUME_CURVE"/> + <volume stream="AUDIO_STREAM_SYSTEM" deviceCategory="DEVICE_CATEGORY_HEADSET"> + <point>1,-3000</point> + <point>33,-2600</point> + <point>66,-2200</point> + <point>100,-1800</point> + </volume> + <volume stream="AUDIO_STREAM_SYSTEM" deviceCategory="DEVICE_CATEGORY_SPEAKER" + ref="DEFAULT_SYSTEM_VOLUME_CURVE"/> + <volume stream="AUDIO_STREAM_SYSTEM" deviceCategory="DEVICE_CATEGORY_EARPIECE" + ref="DEFAULT_SYSTEM_VOLUME_CURVE"/> + <volume stream="AUDIO_STREAM_SYSTEM" deviceCategory="DEVICE_CATEGORY_EXT_MEDIA" + ref="DEFAULT_DEVICE_CATEGORY_EXT_MEDIA_VOLUME_CURVE"/> + <volume stream="AUDIO_STREAM_SYSTEM" deviceCategory="DEVICE_CATEGORY_HEARING_AID" + ref="DEFAULT_HEARING_AID_VOLUME_CURVE"/> + <volume stream="AUDIO_STREAM_RING" deviceCategory="DEVICE_CATEGORY_HEADSET" + ref="DEFAULT_DEVICE_CATEGORY_HEADSET_VOLUME_CURVE"/> + <volume stream="AUDIO_STREAM_RING" deviceCategory="DEVICE_CATEGORY_SPEAKER"> + <point>1,-2970</point> + <point>33,-2010</point> + <point>66,-1020</point> + <point>100,0</point> + </volume> + <volume stream="AUDIO_STREAM_RING" deviceCategory="DEVICE_CATEGORY_EARPIECE" + ref="DEFAULT_DEVICE_CATEGORY_EARPIECE_VOLUME_CURVE"/> + <volume stream="AUDIO_STREAM_RING" deviceCategory="DEVICE_CATEGORY_EXT_MEDIA" + ref="DEFAULT_DEVICE_CATEGORY_EXT_MEDIA_VOLUME_CURVE"/> + <volume stream="AUDIO_STREAM_RING" deviceCategory="DEVICE_CATEGORY_HEARING_AID" + ref="DEFAULT_HEARING_AID_VOLUME_CURVE"/> + <volume stream="AUDIO_STREAM_MUSIC" deviceCategory="DEVICE_CATEGORY_HEADSET" + ref="DEFAULT_MEDIA_VOLUME_CURVE"/> + <volume stream="AUDIO_STREAM_MUSIC" deviceCategory="DEVICE_CATEGORY_SPEAKER" + ref="DEFAULT_DEVICE_CATEGORY_SPEAKER_VOLUME_CURVE"/> + <volume stream="AUDIO_STREAM_MUSIC" deviceCategory="DEVICE_CATEGORY_EARPIECE" + ref="DEFAULT_MEDIA_VOLUME_CURVE"/> + <volume stream="AUDIO_STREAM_MUSIC" deviceCategory="DEVICE_CATEGORY_EXT_MEDIA" + ref="DEFAULT_MEDIA_VOLUME_CURVE"/> + <volume stream="AUDIO_STREAM_MUSIC" deviceCategory="DEVICE_CATEGORY_HEARING_AID" + ref="DEFAULT_HEARING_AID_VOLUME_CURVE"/> + <volume stream="AUDIO_STREAM_ALARM" deviceCategory="DEVICE_CATEGORY_HEADSET" + ref="DEFAULT_NON_MUTABLE_HEADSET_VOLUME_CURVE"/> + <volume stream="AUDIO_STREAM_ALARM" deviceCategory="DEVICE_CATEGORY_SPEAKER"> + <point>0,-2970</point> + <point>33,-2010</point> + <point>66,-1020</point> + <point>100,0</point> + </volume> + <volume stream="AUDIO_STREAM_ALARM" deviceCategory="DEVICE_CATEGORY_EARPIECE" + ref="DEFAULT_NON_MUTABLE_EARPIECE_VOLUME_CURVE"/> + <volume stream="AUDIO_STREAM_ALARM" deviceCategory="DEVICE_CATEGORY_EXT_MEDIA" + ref="DEFAULT_NON_MUTABLE_EXT_VOLUME_CURVE"/> + <volume stream="AUDIO_STREAM_ALARM" deviceCategory="DEVICE_CATEGORY_HEARING_AID" + ref="DEFAULT_NON_MUTABLE_HEARING_AID_VOLUME_CURVE"/> + <volume stream="AUDIO_STREAM_NOTIFICATION" deviceCategory="DEVICE_CATEGORY_HEADSET" + ref="DEFAULT_DEVICE_CATEGORY_HEADSET_VOLUME_CURVE"/> + <volume stream="AUDIO_STREAM_NOTIFICATION" deviceCategory="DEVICE_CATEGORY_SPEAKER"> + <point>1,-2970</point> + <point>33,-2010</point> + <point>66,-1020</point> + <point>100,0</point> + </volume> + <volume stream="AUDIO_STREAM_NOTIFICATION" deviceCategory="DEVICE_CATEGORY_EARPIECE" + ref="DEFAULT_DEVICE_CATEGORY_EARPIECE_VOLUME_CURVE"/> + <volume stream="AUDIO_STREAM_NOTIFICATION" deviceCategory="DEVICE_CATEGORY_EXT_MEDIA" + ref="DEFAULT_DEVICE_CATEGORY_EXT_MEDIA_VOLUME_CURVE"/> + <volume stream="AUDIO_STREAM_NOTIFICATION" deviceCategory="DEVICE_CATEGORY_HEARING_AID" + ref="DEFAULT_DEVICE_CATEGORY_HEADSET_VOLUME_CURVE"/> + <volume stream="AUDIO_STREAM_BLUETOOTH_SCO" deviceCategory="DEVICE_CATEGORY_HEADSET"> + <point>0,-4200</point> + <point>33,-2800</point> + <point>66,-1400</point> + <point>100,0</point> + </volume> + <volume stream="AUDIO_STREAM_BLUETOOTH_SCO" deviceCategory="DEVICE_CATEGORY_SPEAKER"> + <point>0,-2400</point> + <point>33,-1600</point> + <point>66,-800</point> + <point>100,0</point> + </volume> + <volume stream="AUDIO_STREAM_BLUETOOTH_SCO" deviceCategory="DEVICE_CATEGORY_EARPIECE"> + <point>0,-4200</point> + <point>33,-2800</point> + <point>66,-1400</point> + <point>100,0</point> + </volume> + <volume stream="AUDIO_STREAM_BLUETOOTH_SCO" deviceCategory="DEVICE_CATEGORY_EXT_MEDIA" + ref="DEFAULT_MEDIA_VOLUME_CURVE"/> + <volume stream="AUDIO_STREAM_BLUETOOTH_SCO" deviceCategory="DEVICE_CATEGORY_HEARING_AID" + ref="DEFAULT_HEARING_AID_VOLUME_CURVE"/> + <volume stream="AUDIO_STREAM_ENFORCED_AUDIBLE" deviceCategory="DEVICE_CATEGORY_HEADSET"> + <point>1,-3000</point> + <point>33,-2600</point> + <point>66,-2200</point> + <point>100,-1800</point> + </volume> + <volume stream="AUDIO_STREAM_ENFORCED_AUDIBLE" deviceCategory="DEVICE_CATEGORY_SPEAKER" + ref="DEFAULT_SYSTEM_VOLUME_CURVE"/> + <volume stream="AUDIO_STREAM_ENFORCED_AUDIBLE" deviceCategory="DEVICE_CATEGORY_EARPIECE" + ref="DEFAULT_SYSTEM_VOLUME_CURVE"/> + <volume stream="AUDIO_STREAM_ENFORCED_AUDIBLE" deviceCategory="DEVICE_CATEGORY_EXT_MEDIA" + ref="DEFAULT_DEVICE_CATEGORY_EXT_MEDIA_VOLUME_CURVE"/> + <volume stream="AUDIO_STREAM_ENFORCED_AUDIBLE" deviceCategory="DEVICE_CATEGORY_HEARING_AID" + ref="DEFAULT_HEARING_AID_VOLUME_CURVE"/> + <volume stream="AUDIO_STREAM_DTMF" deviceCategory="DEVICE_CATEGORY_HEADSET"> + <point>1,-3000</point> + <point>33,-2600</point> + <point>66,-2200</point> + <point>100,-1800</point> + </volume> + <volume stream="AUDIO_STREAM_DTMF" deviceCategory="DEVICE_CATEGORY_SPEAKER" + ref="DEFAULT_SYSTEM_VOLUME_CURVE"/> + <volume stream="AUDIO_STREAM_DTMF" deviceCategory="DEVICE_CATEGORY_EARPIECE" + ref="DEFAULT_SYSTEM_VOLUME_CURVE"/> + <volume stream="AUDIO_STREAM_DTMF" deviceCategory="DEVICE_CATEGORY_EXT_MEDIA" + ref="DEFAULT_DEVICE_CATEGORY_EXT_MEDIA_VOLUME_CURVE"/> + <volume stream="AUDIO_STREAM_DTMF" deviceCategory="DEVICE_CATEGORY_HEARING_AID" + ref="DEFAULT_HEARING_AID_VOLUME_CURVE"/> + <volume stream="AUDIO_STREAM_TTS" deviceCategory="DEVICE_CATEGORY_HEADSET" + ref="SILENT_VOLUME_CURVE"/> + <volume stream="AUDIO_STREAM_TTS" deviceCategory="DEVICE_CATEGORY_SPEAKER" + ref="FULL_SCALE_VOLUME_CURVE"/> + <volume stream="AUDIO_STREAM_TTS" deviceCategory="DEVICE_CATEGORY_EARPIECE" + ref="SILENT_VOLUME_CURVE"/> + <volume stream="AUDIO_STREAM_TTS" deviceCategory="DEVICE_CATEGORY_EXT_MEDIA" + ref="SILENT_VOLUME_CURVE"/> + <volume stream="AUDIO_STREAM_TTS" deviceCategory="DEVICE_CATEGORY_HEARING_AID" + ref="SILENT_VOLUME_CURVE"/> + <volume stream="AUDIO_STREAM_ACCESSIBILITY" deviceCategory="DEVICE_CATEGORY_HEADSET" + ref="DEFAULT_NON_MUTABLE_VOLUME_CURVE"/> + <volume stream="AUDIO_STREAM_ACCESSIBILITY" deviceCategory="DEVICE_CATEGORY_SPEAKER" + ref="DEFAULT_NON_MUTABLE_SPEAKER_VOLUME_CURVE"/> + <volume stream="AUDIO_STREAM_ACCESSIBILITY" deviceCategory="DEVICE_CATEGORY_EARPIECE" + ref="DEFAULT_NON_MUTABLE_VOLUME_CURVE"/> + <volume stream="AUDIO_STREAM_ACCESSIBILITY" deviceCategory="DEVICE_CATEGORY_EXT_MEDIA" + ref="DEFAULT_NON_MUTABLE_VOLUME_CURVE"/> + <volume stream="AUDIO_STREAM_ACCESSIBILITY" deviceCategory="DEVICE_CATEGORY_HEARING_AID" + ref="DEFAULT_NON_MUTABLE_HEARING_AID_VOLUME_CURVE"/> + <volume stream="AUDIO_STREAM_REROUTING" deviceCategory="DEVICE_CATEGORY_HEADSET" + ref="FULL_SCALE_VOLUME_CURVE"/> + <volume stream="AUDIO_STREAM_REROUTING" deviceCategory="DEVICE_CATEGORY_SPEAKER" + ref="FULL_SCALE_VOLUME_CURVE"/> + <volume stream="AUDIO_STREAM_REROUTING" deviceCategory="DEVICE_CATEGORY_EARPIECE" + ref="FULL_SCALE_VOLUME_CURVE"/> + <volume stream="AUDIO_STREAM_REROUTING" deviceCategory="DEVICE_CATEGORY_EXT_MEDIA" + ref="FULL_SCALE_VOLUME_CURVE"/> + <volume stream="AUDIO_STREAM_REROUTING" deviceCategory="DEVICE_CATEGORY_HEARING_AID" + ref="FULL_SCALE_VOLUME_CURVE"/> + <volume stream="AUDIO_STREAM_PATCH" deviceCategory="DEVICE_CATEGORY_HEADSET" + ref="FULL_SCALE_VOLUME_CURVE"/> + <volume stream="AUDIO_STREAM_PATCH" deviceCategory="DEVICE_CATEGORY_SPEAKER" + ref="FULL_SCALE_VOLUME_CURVE"/> + <volume stream="AUDIO_STREAM_PATCH" deviceCategory="DEVICE_CATEGORY_EARPIECE" + ref="FULL_SCALE_VOLUME_CURVE"/> + <volume stream="AUDIO_STREAM_PATCH" deviceCategory="DEVICE_CATEGORY_EXT_MEDIA" + ref="FULL_SCALE_VOLUME_CURVE"/> + <volume stream="AUDIO_STREAM_PATCH" deviceCategory="DEVICE_CATEGORY_HEARING_AID" + ref="FULL_SCALE_VOLUME_CURVE"/> +</volumes> + diff --git a/audio/audiopolicy/default_volume_tables.xml b/audio/audiopolicy/default_volume_tables.xml new file mode 100644 index 0000000..207be41 --- /dev/null +++ b/audio/audiopolicy/default_volume_tables.xml @@ -0,0 +1,129 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- Copyright (C) 2015 The Android Open Source Project + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +--> +<!-- Default Volume Tables included by Audio Policy Configuration file --> +<!-- Full Default Volume table for all device category --> +<volumes> + <reference name="FULL_SCALE_VOLUME_CURVE"> + <!-- Full Scale reference Volume Curve --> + <point>0,0</point> + <point>100,0</point> + </reference> + <reference name="SILENT_VOLUME_CURVE"> + <point>0,-9600</point> + <point>100,-9600</point> + </reference> + <reference name="DEFAULT_SYSTEM_VOLUME_CURVE"> + <!-- Default System reference Volume Curve --> + <point>1,-2400</point> + <point>33,-1800</point> + <point>66,-1200</point> + <point>100,-600</point> + </reference> + <reference name="DEFAULT_MEDIA_VOLUME_CURVE"> + <!-- Default Media reference Volume Curve --> + <point>1,-5800</point> + <point>20,-4000</point> + <point>60,-1700</point> + <point>100,0</point> + </reference> + <reference name="DEFAULT_DEVICE_CATEGORY_HEADSET_VOLUME_CURVE"> + <!--Default Volume Curve --> + <point>1,-4950</point> + <point>33,-3350</point> + <point>66,-1700</point> + <point>100,0</point> + </reference> + <reference name="DEFAULT_DEVICE_CATEGORY_SPEAKER_VOLUME_CURVE"> + <!-- Default is Speaker Media Volume Curve --> + <point>1,-5800</point> + <point>20,-4000</point> + <point>60,-1700</point> + <point>100,0</point> + </reference> + <reference name="DEFAULT_DEVICE_CATEGORY_EARPIECE_VOLUME_CURVE"> + <!--Default Volume Curve --> + <point>1,-4950</point> + <point>33,-3350</point> + <point>66,-1700</point> + <point>100,0</point> + </reference> + <reference name="DEFAULT_DEVICE_CATEGORY_EXT_MEDIA_VOLUME_CURVE"> + <!-- Default is Ext Media System Volume Curve --> + <point>1,-5800</point> + <point>20,-4000</point> + <point>60,-2100</point> + <point>100,-1000</point> + </reference> + <reference name="DEFAULT_HEARING_AID_VOLUME_CURVE"> + <!-- Default Hearing Aid Volume Curve --> + <point>1,-12700</point> + <point>20,-8000</point> + <point>60,-4000</point> + <point>100,0</point> + </reference> + <!-- **************************************************************** --> + <!-- Non-mutable default volume curves: --> + <!-- * first point is always for index 0 --> + <!-- * attenuation is small enough that stream can still be heard --> + <reference name="DEFAULT_NON_MUTABLE_VOLUME_CURVE"> + <!-- Default non-mutable reference Volume Curve --> + <!-- based on DEFAULT_MEDIA_VOLUME_CURVE --> + <point>0,-5800</point> + <point>20,-4000</point> + <point>60,-1700</point> + <point>100,0</point> + </reference> + <reference name="DEFAULT_NON_MUTABLE_HEADSET_VOLUME_CURVE"> + <!--Default non-mutable Volume Curve for headset --> + <!-- based on DEFAULT_DEVICE_CATEGORY_HEADSET_VOLUME_CURVE --> + <point>0,-4950</point> + <point>33,-3350</point> + <point>66,-1700</point> + <point>100,0</point> + </reference> + <reference name="DEFAULT_NON_MUTABLE_SPEAKER_VOLUME_CURVE"> + <!-- Default non-mutable Speaker Volume Curve --> + <!-- based on DEFAULT_DEVICE_CATEGORY_SPEAKER_VOLUME_CURVE --> + <point>0,-5800</point> + <point>20,-4000</point> + <point>60,-1700</point> + <point>100,0</point> + </reference> + <reference name="DEFAULT_NON_MUTABLE_EARPIECE_VOLUME_CURVE"> + <!--Default non-mutable Volume Curve --> + <!-- based on DEFAULT_DEVICE_CATEGORY_EARPIECE_VOLUME_CURVE --> + <point>0,-4950</point> + <point>33,-3350</point> + <point>66,-1700</point> + <point>100,0</point> + </reference> + <reference name="DEFAULT_NON_MUTABLE_EXT_VOLUME_CURVE"> + <!-- Default non-mutable Ext Media System Volume Curve --> + <!-- based on DEFAULT_DEVICE_CATEGORY_EXT_MEDIA_VOLUME_CURVE --> + <point>0,-5800</point> + <point>20,-4000</point> + <point>60,-2100</point> + <point>100,-1000</point> + </reference> + <reference name="DEFAULT_NON_MUTABLE_HEARING_AID_VOLUME_CURVE"> + <!-- Default non-mutable Hearing Aid Volume Curve --> + <!-- based on DEFAULT_HEARING_AID_VOLUME_CURVE --> + <point>0,-12700</point> + <point>20,-8000</point> + <point>60,-4000</point> + <point>100,0</point> + </reference> +</volumes> diff --git a/audio/audiopolicy/r_submix_audio_policy_configuration.xml b/audio/audiopolicy/r_submix_audio_policy_configuration.xml new file mode 100644 index 0000000..dc2a5ec --- /dev/null +++ b/audio/audiopolicy/r_submix_audio_policy_configuration.xml @@ -0,0 +1,47 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- Copyright (C) 2015 The Android Open Source Project + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +--> +<!-- Remote Submix Audio Policy Configuration file --> +<module name="r_submix" halVersion="2.0"> + <attachedDevices> + <item>Remote Submix In</item> + </attachedDevices> + <mixPorts> + <mixPort name="r_submix output" role="source"> + <profile name="" format="AUDIO_FORMAT_PCM_16_BIT" + samplingRates="48000" channelMasks="AUDIO_CHANNEL_OUT_STEREO"/> + </mixPort> + <mixPort name="r_submix input" role="sink"> + <profile name="" format="AUDIO_FORMAT_PCM_16_BIT" + samplingRates="48000" channelMasks="AUDIO_CHANNEL_IN_STEREO"/> + </mixPort> + </mixPorts> + <devicePorts> + <devicePort tagName="Remote Submix Out" type="AUDIO_DEVICE_OUT_REMOTE_SUBMIX" role="sink"> + <profile name="" format="AUDIO_FORMAT_PCM_16_BIT" + samplingRates="48000" channelMasks="AUDIO_CHANNEL_OUT_STEREO"/> + </devicePort> + <devicePort tagName="Remote Submix In" type="AUDIO_DEVICE_IN_REMOTE_SUBMIX" role="source"> + <profile name="" format="AUDIO_FORMAT_PCM_16_BIT" + samplingRates="48000" channelMasks="AUDIO_CHANNEL_IN_STEREO"/> + </devicePort> + </devicePorts> + <routes> + <route type="mix" sink="Remote Submix Out" + sources="r_submix output"/> + <route type="mix" sink="r_submix input" + sources="Remote Submix In"/> + </routes> +</module> diff --git a/audio/audiopolicy/stub_audio_policy_configuration.xml b/audio/audiopolicy/stub_audio_policy_configuration.xml new file mode 100644 index 0000000..17005d2 --- /dev/null +++ b/audio/audiopolicy/stub_audio_policy_configuration.xml @@ -0,0 +1,46 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- Copyright (C) 2017 The Android Open Source Project + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +--> + +<module name="stub" halVersion="2.0"> + <attachedDevices> + <item>Default Out</item> + <item>Default In</item> + </attachedDevices> + <defaultOutputDevice>Default Out</defaultOutputDevice> + <mixPorts> + <mixPort name="stub output" role="source" flags="AUDIO_OUTPUT_FLAG_PRIMARY"> + <profile name="" format="AUDIO_FORMAT_PCM_16_BIT" + samplingRates="48000" channelMasks="AUDIO_CHANNEL_OUT_STEREO"/> + </mixPort> + + <mixPort name="stub input" role="sink"> + <profile name="" format="AUDIO_FORMAT_PCM_16_BIT" + samplingRates="48000" channelMasks="AUDIO_CHANNEL_IN_STEREO"/> + </mixPort> + </mixPorts> + <devicePorts> + <devicePort tagName="Default Out" type="AUDIO_DEVICE_OUT_STUB" role="sink"> + </devicePort> + + <devicePort tagName="Default In" type="AUDIO_DEVICE_IN_STUB" role="source"> + </devicePort> + </devicePorts> + <routes> + <route type="mix" sink="Default Out" sources="stub output"/> + + <route type="mix" sink="stub input" sources="Default In"/> + </routes> +</module> diff --git a/audio/audiopolicy/surround_sound_configuration_5_0.xml b/audio/audiopolicy/surround_sound_configuration_5_0.xml new file mode 100644 index 0000000..590a181 --- /dev/null +++ b/audio/audiopolicy/surround_sound_configuration_5_0.xml @@ -0,0 +1,31 @@ +<?xml version="1.0" encoding="UTF-8" standalone="yes"?> +<!-- Copyright (C) 2018 The Android Open Source Project + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +--> +<surroundSound> + <!-- Each of the listed formats gets an entry in Surround Settings dialog on TV devices. + There must be a corresponding Java ENCODING_... contant defined in AudioFormat.java, + and a display name defined in AudioFormat.toDisplayName. For the formats that don't + need a dedicated Surrond Settings dialog entry, a subformats list has to be used. --> + <formats> + <format name="AUDIO_FORMAT_AC3" /> + <format name="AUDIO_FORMAT_E_AC3" /> + <format name="AUDIO_FORMAT_E_AC3_JOC" /> + <format name="AUDIO_FORMAT_DOLBY_TRUEHD" /> + <format name="AUDIO_FORMAT_DTS" /> + <format name="AUDIO_FORMAT_DTS_HD" /> + <format name="AUDIO_FORMAT_AAC_LC" subformats="AUDIO_FORMAT_AAC_HE_V1 AUDIO_FORMAT_AAC_HE_V2 AUDIO_FORMAT_AAC_ELD AUDIO_FORMAT_AAC_XHE" /> + <format name="AUDIO_FORMAT_AC4" /> + </formats> +</surroundSound> diff --git a/audio/libeffects/audio_effects.xml b/audio/libeffects/audio_effects.xml new file mode 100644 index 0000000..3f85052 --- /dev/null +++ b/audio/libeffects/audio_effects.xml @@ -0,0 +1,102 @@ +<?xml version="1.0" encoding="UTF-8"?> +<audio_effects_conf version="2.0" xmlns="http://schemas.android.com/audio/audio_effects_conf/v2_0"> + <!-- 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 in /vendor/lib/soundfx on the target + + If offloadable effects are present, the AOSP library libeffectproxy.so must be listed as + well as one library for the SW implementation and one library for the DSP implementation: + <library name="proxy" path="libeffectproxy.so"/> + <library name="some_fx_sw" path="lib_some_fx_sw.so"/> + <library name="some_fx_hw" path="lib_some_fx_hw.so"/> + + If the audio HAL implements support for AOSP software audio pre-processing effects, + the following library must be added: + <library name="pre_processing" path="libaudiopreprocessing.so"/> + --> + <libraries> + <library name="bundle" path="libbundlewrapper.so"/> + <library name="reverb" path="libreverbwrapper.so"/> + <library name="visualizer" path="libvisualizer.so"/> + <library name="downmix" path="libdownmix.so"/> + <library name="loudness_enhancer" path="libldnhncr.so"/> + <library name="dynamics_processing" path="libdynproc.so"/> + </libraries> + + <!-- list of effects to load. + Each "effect" element must contain a "name", "library" and a "uuid" attribute. + The value of the "library" element must correspond to the name of one library element in + the "libraries" element. + The "name" attribute is indicative, only the value of the "uuid" attribute designates + the effect. + The uuid is the implementation specific UUID as specified by the effect vendor. This is not + the generic effect type UUID. + + Offloadable effects are described by an "effectProxy" element which contains one "libsw" + element containing the "uuid" and "library" for the SW implementation and one "libhw" + element containing the "uuid" and "library" for the DSP implementation. + The "uuid" value for the "effectProxy" element must be unique and will override the default + uuid in the AOSP proxy effect implementation. + + If the audio HAL implements support for AOSP software audio pre-processing effects, + the following effects can be added: + <effect name="agc" library="pre_processing" uuid="aa8130e0-66fc-11e0-bad0-0002a5d5c51b"/> + <effect name="aec" library="pre_processing" uuid="bb392ec0-8d4d-11e0-a896-0002a5d5c51b"/> + <effect name="ns" library="pre_processing" uuid="c06c8400-8e06-11e0-9cb6-0002a5d5c51b"/> + --> + + <effects> + <effect name="bassboost" library="bundle" uuid="8631f300-72e2-11df-b57e-0002a5d5c51b"/> + <effect name="virtualizer" library="bundle" uuid="1d4033c0-8557-11df-9f2d-0002a5d5c51b"/> + <effect name="equalizer" library="bundle" uuid="ce772f20-847d-11df-bb17-0002a5d5c51b"/> + <effect name="volume" library="bundle" uuid="119341a0-8469-11df-81f9-0002a5d5c51b"/> + <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="visualizer" library="visualizer" uuid="d069d9e0-8329-11df-9168-0002a5d5c51b"/> + <effect name="downmix" library="downmix" uuid="93f04452-e4fe-41cc-91f9-e475b6d1d69f"/> + <effect name="loudness_enhancer" library="loudness_enhancer" uuid="fa415329-2034-4bea-b5dc-5b381c8d1e2c"/> + <effect name="dynamics_processing" library="dynamics_processing" uuid="e0e6539b-1781-7261-676f-6d7573696340"/> + </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: + "mic", "camcorder", "voice_recognition", "voice_communication" + 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. + + <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: + "music", "ring", "alarm", "notification", "voice_call" + 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. + + <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> + --> + +</audio_effects_conf> @@ -75,13 +75,13 @@ PRODUCT_PACKAGES += \ sound_trigger.stub.default \ PRODUCT_COPY_FILES += \ - frameworks/av/media/libeffects/data/audio_effects.xml:$(TARGET_COPY_OUT_VENDOR)/etc/audio_effects.xml \ - frameworks/av/services/audiopolicy/config/audio_policy_configuration_stub.xml:$(TARGET_COPY_OUT_VENDOR)/etc/audio_policy_configuration.xml \ - frameworks/av/services/audiopolicy/config/stub_audio_policy_configuration.xml:$(TARGET_COPY_OUT_VENDOR)/etc/stub_audio_policy_configuration.xml \ - frameworks/av/services/audiopolicy/config/r_submix_audio_policy_configuration.xml:$(TARGET_COPY_OUT_VENDOR)/etc/r_submix_audio_policy_configuration.xml \ - frameworks/av/services/audiopolicy/config/audio_policy_volumes.xml:$(TARGET_COPY_OUT_VENDOR)/etc/audio_policy_volumes.xml \ - frameworks/av/services/audiopolicy/config/default_volume_tables.xml:$(TARGET_COPY_OUT_VENDOR)/etc/default_volume_tables.xml \ - frameworks/av/services/audiopolicy/config/surround_sound_configuration_5_0.xml:$(TARGET_COPY_OUT_VENDOR)/etc/surround_sound_configuration_5_0.xml + $(LOCAL_PATH)/audio/libeffects/audio_effects.xml:$(TARGET_COPY_OUT_VENDOR)/etc/audio_effects.xml \ + $(LOCAL_PATH)/audio/audiopolicy/audio_policy_configuration_stub.xml:$(TARGET_COPY_OUT_VENDOR)/etc/audio_policy_configuration.xml \ + $(LOCAL_PATH)/audio/audiopolicy/stub_audio_policy_configuration.xml:$(TARGET_COPY_OUT_VENDOR)/etc/stub_audio_policy_configuration.xml \ + $(LOCAL_PATH)/audio/audiopolicy/r_submix_audio_policy_configuration.xml:$(TARGET_COPY_OUT_VENDOR)/etc/r_submix_audio_policy_configuration.xml \ + $(LOCAL_PATH)/audio/audiopolicy/audio_policy_volumes.xml:$(TARGET_COPY_OUT_VENDOR)/etc/audio_policy_volumes.xml \ + $(LOCAL_PATH)/audio/audiopolicy/default_volume_tables.xml:$(TARGET_COPY_OUT_VENDOR)/etc/default_volume_tables.xml \ + $(LOCAL_PATH)/audio/audiopolicy/surround_sound_configuration_5_0.xml:$(TARGET_COPY_OUT_VENDOR)/etc/surround_sound_configuration_5_0.xml # Copy list of unsupported HW features PRODUCT_COPY_FILES += \ |