author | Tellen Yu <tellen.yu@amlogic.com> | 2018-09-04 10:39:21 (GMT) |
---|---|---|
committer | Gerrit Code Review <gituser@droid04> | 2018-09-04 10:39:21 (GMT) |
commit | 0523f99095a0ddd561f5d5c8c5f6228853a8f43f (patch) | |
tree | 0305da23e7d4daf8411ef805c15b00d6a261efc9 | |
parent | 3290ba4e21be6f047bff9ec730b942775b3ff8ba (diff) | |
parent | 874dddf4cdaba5ed0a6d144269ca178e8e51356b (diff) | |
download | einstein-0523f99095a0ddd561f5d5c8c5f6228853a8f43f.zip einstein-0523f99095a0ddd561f5d5c8c5f6228853a8f43f.tar.gz einstein-0523f99095a0ddd561f5d5c8c5f6228853a8f43f.tar.bz2 |
Merge "AudioVolume:add audio_policy_volumes xml file for device[1/1]" into p-amlogic
-rw-r--r-- | device.mk | 3 | ||||
-rw-r--r-- | files/audio_policy_configuration.xml | 74 | ||||
-rw-r--r-- | files/audio_policy_volumes.xml | 283 |
3 files changed, 334 insertions, 26 deletions
@@ -37,7 +37,8 @@ PRODUCT_COPY_FILES += \ ifeq ($(USE_XML_AUDIO_POLICY_CONF), 1) PRODUCT_COPY_FILES += \ - device/amlogic/einstein/files/audio_policy_configuration.xml:$(TARGET_COPY_OUT_VENDOR)/etc/audio_policy_configuration.xml + device/amlogic/einstein/files/audio_policy_configuration.xml:$(TARGET_COPY_OUT_VENDOR)/etc/audio_policy_configuration.xml \ + device/amlogic/einstein/files/audio_policy_volumes.xml:$(TARGET_COPY_OUT_VENDOR)/etc/audio_policy_volumes.xml else PRODUCT_COPY_FILES += \ device/amlogic/einstein/files/audio_policy.conf:$(TARGET_COPY_OUT_VENDOR)/etc/audio_policy.conf diff --git a/files/audio_policy_configuration.xml b/files/audio_policy_configuration.xml index 55315a3..8275239 100644 --- a/files/audio_policy_configuration.xml +++ b/files/audio_policy_configuration.xml @@ -71,52 +71,76 @@ samplingRates="8000,11025,12000,16000,22050,24000,32000,44100,48000" channelMasks="AUDIO_CHANNEL_IN_MONO,AUDIO_CHANNEL_IN_STEREO"/> </mixPort> + <mixPort name="tunnel raw" role="source" flags="AUDIO_OUTPUT_FLAG_HW_AV_SYNC|AUDIO_OUTPUT_FLAG_DIRECT"> + <profile name="" format="AUDIO_FORMAT_AC3" + samplingRates="8000,11025,16000,22050,24000,32000,44100,48000" + channelMasks="AUDIO_CHANNEL_OUT_MONO,AUDIO_CHANNEL_OUT_STEREO, + AUDIO_CHANNEL_OUT_QUAD,AUDIO_CHANNEL_OUT_QUAD_BACK, + AUDIO_CHANNEL_OUT_QUAD_SIDE,AUDIO_CHANNEL_OUT_5POINT1_BACK, + AUDIO_CHANNEL_OUT_5POINT1_SIDE,AUDIO_CHANNEL_OUT_5POINT1, + AUDIO_CHANNEL_OUT_7POINT1"/> + <profile name="" format="AUDIO_FORMAT_E_AC3" + samplingRates="8000,11025,16000,22050,24000,32000,44100,48000" + channelMasks="AUDIO_CHANNEL_OUT_MONO,AUDIO_CHANNEL_OUT_STEREO, + AUDIO_CHANNEL_OUT_QUAD,AUDIO_CHANNEL_OUT_QUAD_BACK, + AUDIO_CHANNEL_OUT_QUAD_SIDE,AUDIO_CHANNEL_OUT_5POINT1_BACK, + AUDIO_CHANNEL_OUT_5POINT1_SIDE,AUDIO_CHANNEL_OUT_5POINT1, + AUDIO_CHANNEL_OUT_7POINT1"/> + </mixPort> + <mixPort name="tunnel pcm" role="source" flags="AUDIO_OUTPUT_FLAG_HW_AV_SYNC|AUDIO_OUTPUT_FLAG_DIRECT"> + <profile name="" format="AUDIO_FORMAT_PCM_16_BIT" + samplingRates="32000,44100,48000" + channelMasks="AUDIO_CHANNEL_OUT_STEREO"/> + <profile name="" format="AUDIO_FORMAT_PCM_32_BIT" + samplingRates="32000,44100,48000" + channelMasks="AUDIO_CHANNEL_OUT_STEREO"/> + </mixPort> </mixPorts> <devicePorts> <!-- Output devices declaration, i.e. Sink DEVICE PORT --> <devicePort tagName="Speaker" role="sink" type="AUDIO_DEVICE_OUT_SPEAKER"> <gains> <gain name="gain_1" mode="AUDIO_GAIN_MODE_JOINT" - minValueMB="-8400" - maxValueMB="4000" - defaultValueMB="0" - stepValueMB="100"/> + minValueMB="-6000" + maxValueMB="0" + defaultValueMB="-4500" + stepValueMB="60"/> </gains> </devicePort> <devicePort tagName="Spdif In" role="source" type="AUDIO_DEVICE_IN_SPDIF"> <gains> <gain name="gain_1" mode="AUDIO_GAIN_MODE_JOINT" - minValueMB="-8400" - maxValueMB="4000" - defaultValueMB="0" - stepValueMB="100"/> + minValueMB="-6000" + maxValueMB="0" + defaultValueMB="-4500" + stepValueMB="60"/> </gains> </devicePort> <devicePort tagName="HDMI In" role="source" type="AUDIO_DEVICE_IN_HDMI"> <gains> <gain name="gain_1" mode="AUDIO_GAIN_MODE_JOINT" - minValueMB="-8400" - maxValueMB="4000" - defaultValueMB="0" - stepValueMB="100"/> + minValueMB="-6000" + maxValueMB="0" + defaultValueMB="-4500" + stepValueMB="60"/> </gains> </devicePort> <devicePort tagName="Line In" role="source" type="AUDIO_DEVICE_IN_LINE"> <gains> <gain name="gain_1" mode="AUDIO_GAIN_MODE_JOINT" - minValueMB="-8400" - maxValueMB="4000" - defaultValueMB="0" - stepValueMB="100"/> + minValueMB="-6000" + maxValueMB="0" + defaultValueMB="-4500" + stepValueMB="60"/> </gains> </devicePort> <devicePort tagName="Tuner" role="source" type="AUDIO_DEVICE_IN_TV_TUNER"> <gains> <gain name="gain_1" mode="AUDIO_GAIN_MODE_JOINT" - minValueMB="-8400" - maxValueMB="4000" - defaultValueMB="0" - stepValueMB="100"/> + minValueMB="-6000" + maxValueMB="0" + defaultValueMB="-4500" + stepValueMB="60"/> </gains> </devicePort> <devicePort tagName="Spdif" role="sink" type="AUDIO_DEVICE_OUT_SPDIF"> @@ -163,15 +187,15 @@ <!-- route declaration, i.e. list all available sources for a given sink --> <routes> <route type="mix" sink="Speaker" - sources="primary output,BT SCO Headset Mic"/> + sources="primary output,tunnel raw,tunnel pcm,BT SCO Headset Mic"/> <route type="mix" sink="Spdif" - sources="primary output,BT SCO Headset Mic"/> + sources="primary output,tunnel raw,tunnel pcm,BT SCO Headset Mic"/> <route type="mix" sink="HDMI Arc" - sources="primary output,BT SCO Headset Mic"/> + sources="primary output,tunnel raw,tunnel pcm,BT SCO Headset Mic"/> <route type="mix" sink="Wired Headset" - sources="primary output,BT SCO Headset Mic"/> + sources="primary output,tunnel raw,tunnel pcm,BT SCO Headset Mic"/> <route type="mix" sink="Wired Headphones" - sources="primary output,BT SCO Headset Mic"/> + sources="primary output,tunnel raw,tunnel pcm,BT SCO Headset Mic"/> <route type="mix" sink="primary input" sources="Built-In Mic,Built-In Back Mic,Wired Headset Mic,BT SCO Headset Mic,Spdif In,HDMI In,Line In"/> </routes> diff --git a/files/audio_policy_volumes.xml b/files/audio_policy_volumes.xml new file mode 100644 index 0000000..f9282ac --- a/dev/null +++ b/files/audio_policy_volumes.xml @@ -0,0 +1,283 @@ +<?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_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_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_MUSIC" deviceCategory="DEVICE_CATEGORY_HEADSET" + ref="DEFAULT_MEDIA_VOLUME_CURVE"/> + <volume stream="AUDIO_STREAM_MUSIC" deviceCategory="DEVICE_CATEGORY_SPEAKER" + ref="SPEAKER_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_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_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_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_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_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_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_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_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_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"/> + + <reference name="SPEAKER_CURVE"> + <point>0,-11500</point> + <point>1,-6000</point> + <point>2,-5300</point> + <point>3,-4750</point> + <point>4,-4350</point> + <point>5,-3900</point> + <point>6,-3600</point> + <point>7,-3400</point> + <point>8,-3200</point> + <point>9,-3000</point> + <point>10,-2800</point> + <point>11,-2700</point> + <point>12,-2600</point> + <point>13,-2500</point> + <point>14,-2400</point> + <point>15,-2300</point> + <point>16,-2225</point> + <point>17,-2150</point> + <point>18,-2100</point> + <point>19,-2062</point> + <point>20,-2025</point> + <point>21,-1987</point> + <point>22,-1950</point> + <point>23,-1900</point> + <point>24,-1875</point> + <point>25,-1837</point> + <point>26,-1825</point> + <point>27,-1800</point> + <point>28,-1775</point> + <point>29,-1750</point> + <point>30,-1725</point> + <point>31,-1700</point> + <point>32,-1675</point> + <point>33,-1650</point> + <point>34,-1625</point> + <point>35,-1587</point> + <point>36,-1562</point> + <point>37,-1537</point> + <point>38,-1525</point> + <point>39,-1487</point> + <point>40,-1475</point> + <point>41,-1437</point> + <point>42,-1412</point> + <point>43,-1387</point> + <point>44,-1375</point> + <point>45,-1350</point> + <point>46,-1325</point> + <point>47,-1312</point> + <point>48,-1287</point> + <point>49,-1275</point> + <point>50,-1237</point> + <point>51,-1212</point> + <point>52,-1175</point> + <point>53,-1162</point> + <point>54,-1137</point> + <point>55,-1125</point> + <point>56,-1100</point> + <point>57,-1075</point> + <point>58,-1062</point> + <point>59,-1025</point> + <point>60,-1000</point> + <point>61,-975</point> + <point>62,-962</point> + <point>63,-937</point> + <point>64,-925</point> + <point>65,-900</point> + <point>66,-875</point> + <point>67,-837</point> + <point>68,-812</point> + <point>69,-775</point> + <point>70,-750</point> + <point>71,-725</point> + <point>72,-687</point> + <point>73,-675</point> + <point>74,-637</point> + <point>75,-612</point> + <point>76,-575</point> + <point>77,-550</point> + <point>78,-525</point> + <point>79,-500</point> + <point>80,-475</point> + <point>81,-475</point> + <point>82,-450</point> + <point>83,-425</point> + <point>84,-412</point> + <point>85,-375</point> + <point>86,-362</point> + <point>87,-325</point> + <point>88,-300</point> + <point>89,-275</point> + <point>90,-225</point> + <point>91,-212</point> + <point>92,-200</point> + <point>93,-175</point> + <point>94,-150</point> + <point>95,-125</point> + <point>96,-100</point> + <point>97,-75</point> + <point>98,-50</point> + <point>99,-25</point> + <point>100,0</point> + </reference> +</volumes> + |