Compare commits
10 commits
ef051238ac
...
27f6f9056f
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
27f6f9056f | ||
|
|
a391cb0839 | ||
|
|
d25addbc31 | ||
|
|
bc536c0647 | ||
|
|
62e581ebbf | ||
|
|
d01e67eab5 | ||
|
|
b9d53d61c8 | ||
|
|
3dc926ea1b | ||
|
|
8642fc157b | ||
|
|
d4b2b1a166 |
13 changed files with 610 additions and 3 deletions
|
|
@ -48,6 +48,9 @@ TARGET_NO_BOOTLOADER := true
|
||||||
# Display
|
# Display
|
||||||
TARGET_SCREEN_DENSITY ?= 440
|
TARGET_SCREEN_DENSITY ?= 440
|
||||||
|
|
||||||
|
# Camera
|
||||||
|
TARGET_CAMERA_SERVICE_EXT_LIB := //$(COMMON_PATH):libcameraservice_extension.xiaomi_sm8350
|
||||||
|
|
||||||
# Filesystem
|
# Filesystem
|
||||||
TARGET_FS_CONFIG_GEN := $(COMMON_PATH)/config.fs
|
TARGET_FS_CONFIG_GEN := $(COMMON_PATH)/config.fs
|
||||||
|
|
||||||
|
|
|
||||||
348
audio/audio_policy_volumes.xml
Normal file
348
audio/audio_policy_volumes.xml
Normal file
|
|
@ -0,0 +1,348 @@
|
||||||
|
<?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_A2DP">
|
||||||
|
<point>0,-4200</point>
|
||||||
|
<point>33,-2800</point>
|
||||||
|
<point>66,-1400</point>
|
||||||
|
<point>100,0</point>
|
||||||
|
</volume>
|
||||||
|
<!-- Qinhui.Gu@PSW.MM.AudioServer.Policy, 2019/12/11, add USB_HEADSET device category for tuning separately -->
|
||||||
|
<volume stream="AUDIO_STREAM_VOICE_CALL" deviceCategory="DEVICE_CATEGORY_USB_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_NON_MUTABLE_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>
|
||||||
|
<!-- #ifdef
|
||||||
|
//YaJun.Li@MM.AudioServer.Policy, 2019/08/21,modify for voip and a2dp volume -->
|
||||||
|
<volume stream="AUDIO_STREAM_SYSTEM" deviceCategory="DEVICE_CATEGORY_A2DP">
|
||||||
|
<point>1,-3000</point>
|
||||||
|
<point>33,-2600</point>
|
||||||
|
<point>66,-2200</point>
|
||||||
|
<point>100,-1800</point>
|
||||||
|
</volume>
|
||||||
|
<!-- Qinhui.Gu@PSW.MM.AudioServer.Policy, 2019/12/11, add USB_HEADSET device category for tuning separately -->
|
||||||
|
<volume stream="AUDIO_STREAM_SYSTEM" deviceCategory="DEVICE_CATEGORY_USB_HEADSET">
|
||||||
|
<point>1,-3000</point>
|
||||||
|
<point>33,-2600</point>
|
||||||
|
<point>66,-2200</point>
|
||||||
|
<point>100,-1800</point>
|
||||||
|
</volume>
|
||||||
|
<!-- #endif -->
|
||||||
|
<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_A2DP"
|
||||||
|
ref="DEFAULT_DEVICE_CATEGORY_HEADSET_VOLUME_CURVE"/>
|
||||||
|
<volume stream="AUDIO_STREAM_RING" deviceCategory="DEVICE_CATEGORY_USB_HEADSET"
|
||||||
|
ref="DEFAULT_DEVICE_CATEGORY_HEADSET_VOLUME_CURVE"/>
|
||||||
|
<volume stream="AUDIO_STREAM_RING" deviceCategory="DEVICE_CATEGORY_SPEAKER">
|
||||||
|
<point>1,-4050</point>
|
||||||
|
<point>33,-2950</point>
|
||||||
|
<point>66,-2100</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">
|
||||||
|
<!--yanweibo 20180405 sync device ring volume with speaker for call info brocaste!-->
|
||||||
|
<point>1,-2970</point>
|
||||||
|
<point>33,-2010</point>
|
||||||
|
<point>66,-1020</point>
|
||||||
|
<point>100,0</point>
|
||||||
|
<!--modify end!-->
|
||||||
|
</volume>
|
||||||
|
<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">
|
||||||
|
<point>1,-6300</point>
|
||||||
|
<point>20,-3600</point>
|
||||||
|
<point>60,-2300</point>
|
||||||
|
<point>100,-500</point>
|
||||||
|
</volume>
|
||||||
|
<volume stream="AUDIO_STREAM_MUSIC" deviceCategory="DEVICE_CATEGORY_A2DP"
|
||||||
|
ref="DEFAULT_MEDIA_VOLUME_CURVE_A2DP"/>
|
||||||
|
<volume stream="AUDIO_STREAM_MUSIC" deviceCategory="DEVICE_CATEGORY_USB_HEADSET"
|
||||||
|
ref="DEFAULT_MEDIA_VOLUME_CURVE_USB_HEADSET"/>
|
||||||
|
<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_A2DP"
|
||||||
|
ref="DEFAULT_DEVICE_CATEGORY_HEADSET_VOLUME_CURVE"/>
|
||||||
|
<volume stream="AUDIO_STREAM_ALARM" deviceCategory="DEVICE_CATEGORY_USB_HEADSET"
|
||||||
|
ref="DEFAULT_NON_MUTABLE_HEADSET_VOLUME_CURVE"/>
|
||||||
|
<volume stream="AUDIO_STREAM_ALARM" deviceCategory="DEVICE_CATEGORY_SPEAKER">
|
||||||
|
<!--#ifdef
|
||||||
|
rich.yu@MM.Audio, 2020/06/12, fix alarm volume can not set to 0
|
||||||
|
<point>0,-2970</point>-->
|
||||||
|
<point>1,-2970</point>
|
||||||
|
<!--#endif /**/-->
|
||||||
|
<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_A2DP"
|
||||||
|
ref="DEFAULT_DEVICE_CATEGORY_HEADSET_VOLUME_CURVE"/>
|
||||||
|
<volume stream="AUDIO_STREAM_NOTIFICATION" deviceCategory="DEVICE_CATEGORY_USB_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">
|
||||||
|
<!--#ifdef
|
||||||
|
zhangrun@MM.Audio 2019/08/02, [GCEQ-3989],Improve the minimum volume of the bt-sco voip call
|
||||||
|
<point>0,-4200</point>
|
||||||
|
<point>33,-2800</point>
|
||||||
|
<point>66,-1400</point> -->
|
||||||
|
<point>0,-2400</point>
|
||||||
|
<point>33,-1600</point>
|
||||||
|
<point>66,-800</point>
|
||||||
|
<!--#endif /**/-->
|
||||||
|
<point>100,0</point>
|
||||||
|
</volume>
|
||||||
|
<volume stream="AUDIO_STREAM_BLUETOOTH_SCO" deviceCategory="DEVICE_CATEGORY_A2DP">
|
||||||
|
<!--#ifdef
|
||||||
|
zhangrun@MM.Audio 2019/08/02, [GCEQ-3989],Improve the minimum volume of the bt-sco voip call
|
||||||
|
<point>0,-4200</point>
|
||||||
|
<point>33,-2800</point>
|
||||||
|
<point>66,-1400</point> -->
|
||||||
|
<point>0,-2400</point>
|
||||||
|
<point>33,-1600</point>
|
||||||
|
<point>66,-800</point>
|
||||||
|
<!--#endif /**/-->
|
||||||
|
<point>100,0</point>
|
||||||
|
</volume>
|
||||||
|
<volume stream="AUDIO_STREAM_BLUETOOTH_SCO" deviceCategory="DEVICE_CATEGORY_USB_HEADSET">
|
||||||
|
<!--#ifdef
|
||||||
|
zhangrun@MM.Audio 2019/08/02, [GCEQ-3989],Improve the minimum volume of the bt-sco voip call
|
||||||
|
<point>0,-4200</point>
|
||||||
|
<point>33,-2800</point>
|
||||||
|
<point>66,-1400</point> -->
|
||||||
|
<point>0,-2400</point>
|
||||||
|
<point>33,-1600</point>
|
||||||
|
<point>66,-800</point>
|
||||||
|
<!--#endif /**/-->
|
||||||
|
<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_A2DP">
|
||||||
|
<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_USB_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_A2DP">
|
||||||
|
<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_USB_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">
|
||||||
|
<!-- modified by yanweibo increase dtmf volume ref="DEFAULT_SYSTEM_VOLUME_CURVE"/ !-->
|
||||||
|
<point>1,-3000</point>
|
||||||
|
<point>33,-2400</point>
|
||||||
|
<point>66,-1800</point>
|
||||||
|
<point>100,-1000</point>
|
||||||
|
</volume>
|
||||||
|
<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_A2DP"
|
||||||
|
ref="SILENT_VOLUME_CURVE"/>
|
||||||
|
<volume stream="AUDIO_STREAM_TTS" deviceCategory="DEVICE_CATEGORY_USB_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_A2DP"
|
||||||
|
ref="DEFAULT_NON_MUTABLE_VOLUME_CURVE"/>
|
||||||
|
<volume stream="AUDIO_STREAM_ACCESSIBILITY" deviceCategory="DEVICE_CATEGORY_USB_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_ASSISTANT" deviceCategory="DEVICE_CATEGORY_HEADSET"
|
||||||
|
ref="DEFAULT_MEDIA_VOLUME_CURVE"/>
|
||||||
|
<volume stream="AUDIO_STREAM_ASSISTANT" deviceCategory="DEVICE_CATEGORY_A2DP"
|
||||||
|
ref="DEFAULT_MEDIA_VOLUME_CURVE"/>
|
||||||
|
<volume stream="AUDIO_STREAM_ASSISTANT" deviceCategory="DEVICE_CATEGORY_USB_HEADSET"
|
||||||
|
ref="DEFAULT_MEDIA_VOLUME_CURVE"/>
|
||||||
|
<volume stream="AUDIO_STREAM_ASSISTANT" deviceCategory="DEVICE_CATEGORY_SPEAKER"
|
||||||
|
ref="DEFAULT_DEVICE_CATEGORY_SPEAKER_VOLUME_CURVE"/>
|
||||||
|
<volume stream="AUDIO_STREAM_ASSISTANT" deviceCategory="DEVICE_CATEGORY_EARPIECE"
|
||||||
|
ref="DEFAULT_MEDIA_VOLUME_CURVE"/>
|
||||||
|
<volume stream="AUDIO_STREAM_ASSISTANT" deviceCategory="DEVICE_CATEGORY_EXT_MEDIA"
|
||||||
|
ref="DEFAULT_MEDIA_VOLUME_CURVE"/>
|
||||||
|
<volume stream="AUDIO_STREAM_ASSISTANT" deviceCategory="DEVICE_CATEGORY_HEARING_AID"
|
||||||
|
ref="DEFAULT_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_A2DP"
|
||||||
|
ref="FULL_SCALE_VOLUME_CURVE"/>
|
||||||
|
<volume stream="AUDIO_STREAM_REROUTING" deviceCategory="DEVICE_CATEGORY_USB_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_A2DP"
|
||||||
|
ref="FULL_SCALE_VOLUME_CURVE"/>
|
||||||
|
<volume stream="AUDIO_STREAM_PATCH" deviceCategory="DEVICE_CATEGORY_USB_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>
|
||||||
141
audio/default_volume_tables.xml
Normal file
141
audio/default_volume_tables.xml
Normal file
|
|
@ -0,0 +1,141 @@
|
||||||
|
<?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_MEDIA_VOLUME_CURVE_USB_HEADSET">
|
||||||
|
<point>1,-6100</point>
|
||||||
|
<point>20,-4000</point>
|
||||||
|
<point>60,-1650</point>
|
||||||
|
<point>100,0</point>
|
||||||
|
</reference>
|
||||||
|
<reference name="DEFAULT_MEDIA_VOLUME_CURVE_A2DP">
|
||||||
|
<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 -->
|
||||||
|
<!--#ifdef
|
||||||
|
dujie@MM.Audio, 2020/07/06, reduce the minimum volume loudness -->
|
||||||
|
<point>1,-5300</point>
|
||||||
|
<point>20,-3300</point>
|
||||||
|
<point>60,-1000</point>
|
||||||
|
<point>100,0</point>
|
||||||
|
<!--#endif /**/-->
|
||||||
|
</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>
|
||||||
22
camera/Android.bp
Normal file
22
camera/Android.bp
Normal file
|
|
@ -0,0 +1,22 @@
|
||||||
|
//
|
||||||
|
// Copyright (C) 2022 The LineageOS 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.
|
||||||
|
|
||||||
|
cc_library_static {
|
||||||
|
name: "libcameraservice_extension.xiaomi_sm8350",
|
||||||
|
srcs: ["CameraProviderExtension.cpp"],
|
||||||
|
include_dirs: [
|
||||||
|
"frameworks/av/services/camera/libcameraservice/common"
|
||||||
|
],
|
||||||
|
}
|
||||||
74
camera/CameraProviderExtension.cpp
Normal file
74
camera/CameraProviderExtension.cpp
Normal file
|
|
@ -0,0 +1,74 @@
|
||||||
|
/*
|
||||||
|
* Copyright (C) 2024 LibreMobileOS Foundation
|
||||||
|
*
|
||||||
|
* SPDX-License-Identifier: Apache-2.0
|
||||||
|
*/
|
||||||
|
|
||||||
|
#include "CameraProviderExtension.h"
|
||||||
|
|
||||||
|
#include <fstream>
|
||||||
|
|
||||||
|
#define TORCH_BRIGHTNESS "brightness"
|
||||||
|
#define TORCH_MAX_BRIGHTNESS "max_brightness"
|
||||||
|
#define TOGGLE_SWITCH "/sys/devices/platform/soc/c440000.qcom,spmi/spmi-0/spmi0-02/c440000.qcom,spmi:qcom,pm8350c@2:qcom,flash_led@ee00/leds/led:switch_1/brightness"
|
||||||
|
static std::string kTorchLedPath = "/sys/devices/platform/soc/c440000.qcom,spmi/spmi-0/spmi0-02/c440000.qcom,spmi:qcom,pm8350c@2:qcom,flash_led@ee00/leds/led:torch_1";
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Write value to path and close file.
|
||||||
|
*/
|
||||||
|
template <typename T>
|
||||||
|
static void set(const std::string& path, const T& value) {
|
||||||
|
std::ofstream file(path);
|
||||||
|
file << value;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Read value from the path and close file.
|
||||||
|
*/
|
||||||
|
template <typename T>
|
||||||
|
static T get(const std::string& path, const T& def) {
|
||||||
|
std::ifstream file(path);
|
||||||
|
T result;
|
||||||
|
|
||||||
|
file >> result;
|
||||||
|
return file.fail() ? def : result;
|
||||||
|
}
|
||||||
|
|
||||||
|
bool supportsTorchStrengthControlExt() {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
bool supportsSetTorchModeExt() {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
int32_t getTorchDefaultStrengthLevelExt() {
|
||||||
|
return 80;
|
||||||
|
}
|
||||||
|
|
||||||
|
int32_t getTorchMaxStrengthLevelExt() {
|
||||||
|
// In our device, both LEDs has same maximum value
|
||||||
|
// so get from one.
|
||||||
|
auto node = kTorchLedPath + "/" + TORCH_MAX_BRIGHTNESS;
|
||||||
|
return 750;
|
||||||
|
}
|
||||||
|
|
||||||
|
int32_t getTorchStrengthLevelExt() {
|
||||||
|
// We write same value in the both LEDs,
|
||||||
|
// so get from one.
|
||||||
|
auto node = kTorchLedPath + "/" + TORCH_BRIGHTNESS;
|
||||||
|
return get(node, 0);
|
||||||
|
}
|
||||||
|
|
||||||
|
void setTorchStrengthLevelExt(int32_t torchStrength, bool enabled) {
|
||||||
|
set(TOGGLE_SWITCH, 0);
|
||||||
|
auto node = kTorchLedPath + "/" + TORCH_BRIGHTNESS;
|
||||||
|
set(node, torchStrength);
|
||||||
|
if (enabled)
|
||||||
|
set(TOGGLE_SWITCH, 255);
|
||||||
|
}
|
||||||
|
|
||||||
|
void setTorchModeExt(bool enabled) {
|
||||||
|
int32_t strength = getTorchDefaultStrengthLevelExt();
|
||||||
|
setTorchStrengthLevelExt(enabled ? strength : 0, enabled);
|
||||||
|
}
|
||||||
|
|
@ -65,9 +65,11 @@ PRODUCT_COPY_FILES += \
|
||||||
$(LOCAL_PATH)/audio/audio_policy_configuration.xml:$(TARGET_COPY_OUT_VENDOR)/etc/audio/sku_yupik/audio_policy_configuration.xml
|
$(LOCAL_PATH)/audio/audio_policy_configuration.xml:$(TARGET_COPY_OUT_VENDOR)/etc/audio/sku_yupik/audio_policy_configuration.xml
|
||||||
|
|
||||||
PRODUCT_COPY_FILES += \
|
PRODUCT_COPY_FILES += \
|
||||||
frameworks/av/services/audiopolicy/config/audio_policy_volumes.xml:$(TARGET_COPY_OUT_VENDOR)/etc/audio_policy_volumes.xml \
|
$(LOCAL_PATH)/audio/audio_policy_volumes.xml:$(TARGET_COPY_OUT_VENDOR)/etc/audio_policy_volumes.xml \
|
||||||
|
$(LOCAL_PATH)/audio/default_volume_tables.xml:$(TARGET_COPY_OUT_VENDOR)/etc/default_volume_tables.xml \
|
||||||
|
|
||||||
|
PRODUCT_COPY_FILES += \
|
||||||
frameworks/av/services/audiopolicy/config/bluetooth_audio_policy_configuration_7_0.xml:$(TARGET_COPY_OUT_VENDOR)/etc/bluetooth_audio_policy_configuration_7_0.xml \
|
frameworks/av/services/audiopolicy/config/bluetooth_audio_policy_configuration_7_0.xml:$(TARGET_COPY_OUT_VENDOR)/etc/bluetooth_audio_policy_configuration_7_0.xml \
|
||||||
frameworks/av/services/audiopolicy/config/default_volume_tables.xml:$(TARGET_COPY_OUT_VENDOR)/etc/default_volume_tables.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/r_submix_audio_policy_configuration.xml:$(TARGET_COPY_OUT_VENDOR)/etc/r_submix_audio_policy_configuration.xml \
|
||||||
frameworks/av/services/audiopolicy/config/usb_audio_policy_configuration.xml:$(TARGET_COPY_OUT_VENDOR)/etc/usb_audio_policy_configuration.xml \
|
frameworks/av/services/audiopolicy/config/usb_audio_policy_configuration.xml:$(TARGET_COPY_OUT_VENDOR)/etc/usb_audio_policy_configuration.xml \
|
||||||
frameworks/native/data/etc/android.hardware.audio.low_latency.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.hardware.audio.low_latency.xml \
|
frameworks/native/data/etc/android.hardware.audio.low_latency.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.hardware.audio.low_latency.xml \
|
||||||
|
|
|
||||||
|
|
@ -193,6 +193,7 @@ echo 325 > /proc/sys/kernel/walt_low_latency_task_threshold
|
||||||
# cpuset parameters
|
# cpuset parameters
|
||||||
echo 0-3 > /dev/cpuset/background/cpus
|
echo 0-3 > /dev/cpuset/background/cpus
|
||||||
echo 0-3 > /dev/cpuset/system-background/cpus
|
echo 0-3 > /dev/cpuset/system-background/cpus
|
||||||
|
echo 1-2 > /dev/cpuset/audio-app/cpus
|
||||||
|
|
||||||
# configure governor settings for silver cluster
|
# configure governor settings for silver cluster
|
||||||
echo "schedutil" > /sys/devices/system/cpu/cpufreq/policy0/scaling_governor
|
echo "schedutil" > /sys/devices/system/cpu/cpufreq/policy0/scaling_governor
|
||||||
|
|
|
||||||
|
|
@ -146,3 +146,7 @@ firmware_directories /vendor/firmware_mnt/image/
|
||||||
|
|
||||||
# Battery
|
# Battery
|
||||||
/sys/class/qcom-battery reverse_chg_mode 0644 system system
|
/sys/class/qcom-battery reverse_chg_mode 0644 system system
|
||||||
|
|
||||||
|
# Torch control
|
||||||
|
/sys/devices/platform/soc/c440000.qcom,spmi/spmi-0/spmi0-02/c440000.qcom,spmi:qcom,pm8350c@2:qcom,flash_led@ee00/leds/led:torch_1 brightness 0660 cameraserver camera
|
||||||
|
/sys/devices/platform/soc/c440000.qcom,spmi/spmi-0/spmi0-02/c440000.qcom,spmi:qcom,pm8350c@2:qcom,flash_led@ee00/leds/led:switch_1 0660 cameraserver camera
|
||||||
|
|
|
||||||
1
sepolicy/vendor/cameraserver.te
vendored
Normal file
1
sepolicy/vendor/cameraserver.te
vendored
Normal file
|
|
@ -0,0 +1 @@
|
||||||
|
allow cameraserver sysfs_torch:file rw_file_perms;
|
||||||
5
sepolicy/vendor/genfs_contexts
vendored
5
sepolicy/vendor/genfs_contexts
vendored
|
|
@ -7,6 +7,11 @@ genfscon sysfs /devices/platform/soc/soc:fingerprint_fpc
|
||||||
# USB
|
# USB
|
||||||
genfscon sysfs /devices/platform/soc/soc:qcom,pmic_glink/soc:qcom,pmic_glink:qcom,ucsi/typec u:object_r:vendor_sysfs_usb_c:s0
|
genfscon sysfs /devices/platform/soc/soc:qcom,pmic_glink/soc:qcom,pmic_glink:qcom,ucsi/typec u:object_r:vendor_sysfs_usb_c:s0
|
||||||
|
|
||||||
|
# Torch control
|
||||||
|
genfscon sysfs /devices/platform/soc/c440000.qcom,spmi/spmi-0/spmi0-02/c440000.qcom,spmi:qcom,pm8350c@2:qcom,flash_led@ee00/leds/led:torch_1/brightness u:object_r:sysfs_torch:s0
|
||||||
|
genfscon sysfs /devices/platform/soc/c440000.qcom,spmi/spmi-0/spmi0-02/c440000.qcom,spmi:qcom,pm8350c@2:qcom,flash_led@ee00/leds/led:torch_1/max_brightness u:object_r:sysfs_torch:s0
|
||||||
|
genfscon sysfs /devices/platform/soc/c440000.qcom,spmi/spmi-0/spmi0-02/c440000.qcom,spmi:qcom,pm8350c@2:qcom,flash_led@ee00/leds/led:switch_1/brightness u:object_r:sysfs_torch:s0
|
||||||
|
|
||||||
# Wakeup nodes
|
# Wakeup nodes
|
||||||
genfscon sysfs /devices/platform/goodix_ts.0/wakeup u:object_r:sysfs_wakeup:s0
|
genfscon sysfs /devices/platform/goodix_ts.0/wakeup u:object_r:sysfs_wakeup:s0
|
||||||
genfscon sysfs /devices/platform/soc/17300000.qcom,lpass/subsys6/wakeup u:object_r:sysfs_wakeup:s0
|
genfscon sysfs /devices/platform/soc/17300000.qcom,lpass/subsys6/wakeup u:object_r:sysfs_wakeup:s0
|
||||||
|
|
|
||||||
1
sepolicy/vendor/torch.te
vendored
Normal file
1
sepolicy/vendor/torch.te
vendored
Normal file
|
|
@ -0,0 +1 @@
|
||||||
|
type sysfs_torch, fs_type, sysfs_type;
|
||||||
|
|
@ -41,6 +41,11 @@ ro.vendor.qti.sys.fw.bservice_enable=true
|
||||||
DEVICE_PROVISIONED=1
|
DEVICE_PROVISIONED=1
|
||||||
ril.subscription.types=NV,RUIM
|
ril.subscription.types=NV,RUIM
|
||||||
|
|
||||||
|
# Radio VoNR Calling
|
||||||
|
persist.radio.is_vonr_enabled_0=true
|
||||||
|
persist.radio.is_vonr_enabled_1=true
|
||||||
|
persist.vendor.vonr_setting_support=1
|
||||||
|
|
||||||
# Sensors
|
# Sensors
|
||||||
persist.vendor.sensors.enable.mag_filter=true
|
persist.vendor.sensors.enable.mag_filter=true
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -93,7 +93,7 @@ vendor.audio.feature.vbat.enable=true
|
||||||
vendor.audio.feature.wsa.enable=false
|
vendor.audio.feature.wsa.enable=false
|
||||||
vendor.audio.hal.output.suspend.supported=false
|
vendor.audio.hal.output.suspend.supported=false
|
||||||
vendor.audio.hw.aac.encoder=true
|
vendor.audio.hw.aac.encoder=true
|
||||||
vendor.audio.offload.buffer.size.kb=32
|
vendor.audio.offload.buffer.size.kb=256
|
||||||
vendor.audio.offload.gapless.enabled=true
|
vendor.audio.offload.gapless.enabled=true
|
||||||
vendor.audio.offload.multiaac.enable=true
|
vendor.audio.offload.multiaac.enable=true
|
||||||
vendor.audio.offload.multiple.enabled=false
|
vendor.audio.offload.multiple.enabled=false
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue