berlna: update audio, overlays, rootdir from S1RMS32.48-18-11-2-19

Signed-off-by: Andrew Hexen <SyberHexen@gmail.com>
Change-Id: I7511c63493d554b21d85f2774ff9054eb2fc02f1
This commit is contained in:
Andrew Hexen 2023-01-26 03:55:56 -08:00
parent 648bb269bd
commit a1a654e3c4
No known key found for this signature in database
GPG key ID: 8A690B4B0CD461A2
9 changed files with 320 additions and 89 deletions

View file

@ -11,6 +11,7 @@
<library name="loudness_enhancer" path="libldnhncr.so"/>
<library name="audio_pre_processing" path="libqcomvoiceprocessing.so"/>
<library name="maxxaudio3" path="libmaxxeffect-cembedded.so"/>
<library name="bc360" path="libbc360.so"/>
</libraries>
<effects>
<effect name="bassboost" library="bundle" uuid="8631f300-72e2-11df-b57e-0002a5d5c51b"/>
@ -29,6 +30,7 @@
<effect name="aec" library="audio_pre_processing" uuid="0f8d0d2a-59e5-45fe-b6e4-248c8a799109"/>
<effect name="ns" library="audio_pre_processing" uuid="1d97bb0b-9e2f-4403-9ae3-58c2554306f8"/>
<effect library="maxxaudio3" name="maxxaudio3" uuid="ae12da60-99ac-11df-b456-0002a5d5c51b"/>
<effect name="boomcloud" library="bc360" uuid="5ec83eb9-9403-43ae-924f-c124589c8bd4"/>
</effects>
<preprocess>
<stream type="voice_communication">

View file

@ -50,6 +50,21 @@
samplingRates="8000,11025,12000,16000,22050,24000,32000,44100,48000" channelMasks="AUDIO_CHANNEL_OUT_STEREO"/>
</mixPort>
<mixPort name="hifi_playback" role="source" />
<mixPort name="direct_pcm" role="source"
flags="AUDIO_OUTPUT_FLAG_DIRECT">
<profile name="" format="AUDIO_FORMAT_PCM_16_BIT"
samplingRates="8000,11025,12000,16000,22050,24000,32000,44100,48000,64000,88200,96000,128000,176400,192000"
channelMasks="AUDIO_CHANNEL_OUT_MONO,AUDIO_CHANNEL_OUT_STEREO,AUDIO_CHANNEL_OUT_2POINT1,AUDIO_CHANNEL_OUT_QUAD,AUDIO_CHANNEL_OUT_PENTA,AUDIO_CHANNEL_OUT_5POINT1,AUDIO_CHANNEL_OUT_6POINT1,AUDIO_CHANNEL_OUT_7POINT1"/>
<profile name="" format="AUDIO_FORMAT_PCM_8_24_BIT"
samplingRates="8000,11025,12000,16000,22050,24000,32000,44100,48000,64000,88200,96000,128000,176400,192000,352800,384000"
channelMasks="AUDIO_CHANNEL_OUT_MONO,AUDIO_CHANNEL_OUT_STEREO,AUDIO_CHANNEL_OUT_2POINT1,AUDIO_CHANNEL_OUT_QUAD,AUDIO_CHANNEL_OUT_PENTA,AUDIO_CHANNEL_OUT_5POINT1,AUDIO_CHANNEL_OUT_6POINT1,AUDIO_CHANNEL_OUT_7POINT1"/>
<profile name="" format="AUDIO_FORMAT_PCM_24_BIT_PACKED"
samplingRates="8000,11025,12000,16000,22050,24000,32000,44100,48000,64000,88200,96000,128000,176400,192000,352800,384000"
channelMasks="AUDIO_CHANNEL_OUT_MONO,AUDIO_CHANNEL_OUT_STEREO,AUDIO_CHANNEL_OUT_2POINT1,AUDIO_CHANNEL_OUT_QUAD,AUDIO_CHANNEL_OUT_PENTA,AUDIO_CHANNEL_OUT_5POINT1,AUDIO_CHANNEL_OUT_6POINT1,AUDIO_CHANNEL_OUT_7POINT1"/>
<profile name="" format="AUDIO_FORMAT_PCM_32_BIT"
samplingRates="8000,11025,12000,16000,22050,24000,32000,44100,48000,64000,88200,96000,128000,176400,192000,352800,384000"
channelMasks="AUDIO_CHANNEL_OUT_MONO,AUDIO_CHANNEL_OUT_STEREO,AUDIO_CHANNEL_OUT_2POINT1,AUDIO_CHANNEL_OUT_QUAD,AUDIO_CHANNEL_OUT_PENTA,AUDIO_CHANNEL_OUT_5POINT1,AUDIO_CHANNEL_OUT_6POINT1,AUDIO_CHANNEL_OUT_7POINT1"/>
</mixPort>
<mixPort name="compressed_offload" role="source"
flags="AUDIO_OUTPUT_FLAG_DIRECT|AUDIO_OUTPUT_FLAG_COMPRESS_OFFLOAD|AUDIO_OUTPUT_FLAG_NON_BLOCKING">
<profile name="" format="AUDIO_FORMAT_MP3"
@ -162,35 +177,35 @@
<!-- route declaration, i.e. list all available sources for a given sink -->
<routes>
<route type="mix" sink="Earpiece"
sources="primary output,deep_buffer,compressed_offload,voip_rx"/>
sources="primary output,deep_buffer,direct_pcm,compressed_offload,voip_rx"/>
<route type="mix" sink="Speaker"
sources="primary output,deep_buffer,compressed_offload,voip_rx"/>
sources="primary output,deep_buffer,direct_pcm,compressed_offload,voip_rx"/>
<route type="mix" sink="Wired Headset"
sources="primary output,deep_buffer,compressed_offload,voip_rx"/>
sources="primary output,deep_buffer,direct_pcm,compressed_offload,voip_rx"/>
<route type="mix" sink="Wired Headphones"
sources="primary output,deep_buffer,compressed_offload,voip_rx"/>
sources="primary output,deep_buffer,direct_pcm,compressed_offload,voip_rx"/>
<route type="mix" sink="Line Out"
sources="primary output,deep_buffer,compressed_offload,voip_rx"/>
sources="primary output,deep_buffer,direct_pcm,compressed_offload,voip_rx"/>
<route type="mix" sink="Dock Headset"
sources="primary output,deep_buffer,voip_rx"/>
<route type="mix" sink="BT SCO"
sources="primary output,deep_buffer,voip_rx"/>
sources="primary output,deep_buffer,direct_pcm,voip_rx"/>
<route type="mix" sink="BT SCO Headset"
sources="primary output,deep_buffer,voip_rx"/>
sources="primary output,deep_buffer,direct_pcm,voip_rx"/>
<route type="mix" sink="BT SCO Car Kit"
sources="primary output,deep_buffer,voip_rx"/>
sources="primary output,deep_buffer,direct_pcm,voip_rx"/>
<route type="mix" sink="HDMI Out"
sources="primary output,deep_buffer,compressed_offload,voip_rx"/>
sources="primary output,deep_buffer,direct_pcm,compressed_offload,voip_rx"/>
<route type="mix" sink="USB Device Out"
sources="primary output,deep_buffer,compressed_offload,hifi_playback,voip_rx"/>
sources="primary output,deep_buffer,direct_pcm,compressed_offload,hifi_playback,voip_rx"/>
<route type="mix" sink="USB Headset Out"
sources="primary output,deep_buffer,compressed_offload,hifi_playback,voip_rx"/>
sources="primary output,deep_buffer,direct_pcm,compressed_offload,hifi_playback,voip_rx"/>
<route type="mix" sink="Telephony Tx"
sources="voice_tx,incall_music_uplink"/>
<route type="mix" sink="voice_rx"
sources="Telephony Rx"/>
<route type="mix" sink="Proxy"
sources="primary output,deep_buffer,compressed_offload"/>
sources="primary output,deep_buffer,direct_pcm,compressed_offload"/>
<route type="mix" sink="voip_tx"
sources="Built-In Mic,Built-In Back Mic,BT SCO Headset Mic,USB Device In,USB Headset In,Wired Headset Mic"/>
<route type="mix" sink="primary input"

View file

@ -27,17 +27,17 @@
</reference>
<reference name="NOTIFICATION_CATEGORY_SPEAKER_VOLUME_CURVE">
<!-- Speaker Sonification reference Volume Curve -->
<point>1,-4000</point>
<point>70,-1600</point>
<point>84,-800</point>
<point>1,-5300</point>
<point>70,-2390</point>
<point>84,-1010</point>
<point>100,0</point>
</reference>
<reference name="DEFAULT_SYSTEM_VOLUME_CURVE">
<!-- Default System reference Volume Curve -->
<point>1,-3200</point>
<point>33,-2700</point>
<point>66,-2200</point>
<point>100,-1700</point>
<point>1,-3800</point>
<point>33,-3300</point>
<point>66,-2800</point>
<point>100,-2300</point>
</reference>
<reference name="DEFAULT_MEDIA_VOLUME_CURVE">
<!-- Default Media reference Volume Curve -->
@ -62,12 +62,12 @@
</reference>
<reference name="DEFAULT_DEVICE_CATEGORY_SPEAKER_VOLUME_CURVE">
<!-- Default is Speaker Media Volume Curve -->
<point>1,-5000</point>
<point>30,-3300</point>
<point>43,-2000</point>
<point>65,-1200</point>
<point>85,-600</point>
<point>93,-300</point>
<point>1,-6400</point>
<point>30,-4300</point>
<point>43,-2600</point>
<point>65,-1400</point>
<point>85,-750</point>
<point>93,-500</point>
<point>100,0</point>
</reference>
<reference name="DEFAULT_DEVICE_CATEGORY_EARPIECE_VOLUME_CURVE">

View file

@ -84,6 +84,7 @@
<usecase name="USECASE_AUDIO_RECORD_AFE_PROXY" type="in" id="6"/>
<usecase name="USECASE_AUDIO_RECORD_AFE_PROXY2" type="in" id="42"/>
<usecase name="USECASE_AUDIO_RECORD_LOW_LATENCY" type="in" id="13" />
<usecase name="USECASE_AUDIO_RECORD_VOIP_LOW_LATENCY" type="in" id="13" />
<usecase name="USECASE_AUDIO_PLAYBACK_ULL" type="out" id="13" />
<usecase name="USECASE_AUDIO_PLAYBACK_SILENCE" type="out" id="23" />
<usecase name="USECASE_AUDIO_PLAYBACK_VOIP" type="out" id="12" />
@ -155,6 +156,7 @@
<device name="SND_DEVICE_OUT_VOICE_USB_HEADSET" acdb_id="245" />
<device name="SND_DEVICE_OUT_VOICE_USB_HEADPHONES" acdb_id="245" />
<device name="SND_DEVICE_OUT_VOLTE_NB_TX" acdb_id="246" />
<device name="SND_DEVICE_OUT_AFE_PROXY" acdb_id="19" />
<!-- Input devices -->
<device name="SND_DEVICE_IN_CAPTURE_VI_FEEDBACK" acdb_id="102" />
@ -351,6 +353,7 @@
<device name="SND_DEVICE_IN_SPEAKER_DMIC_AEC_NS_BROADSIDE" interface="TX_CDC_DMA_TX_3"/>
<device name="SND_DEVICE_IN_VOICE_FLUENCE_DMIC_AANC" interface="TX_CDC_DMA_TX_3"/>
<device name="SND_DEVICE_IN_THREE_MIC" interface="TX_CDC_DMA_TX_3"/>
<device name="SND_DEVICE_IN_VOICE_HEARING_AID" interface="TX_CDC_DMA_TX_3"/>
<device name="SND_DEVICE_IN_HANDSET_TMIC_FLUENCE_PRO" interface="TX_CDC_DMA_TX_3"/>
<device name="SND_DEVICE_IN_HANDSET_TMIC" interface="TX_CDC_DMA_TX_3"/>
<device name="SND_DEVICE_IN_HANDSET_TMIC_AEC" interface="TX_CDC_DMA_TX_3"/>
@ -366,6 +369,7 @@
<device name="SND_DEVICE_OUT_VOICE_SPEAKER_AND_VOICE_ANC_HEADSET" backend="speaker-and-headphones" interface="SEN_MI2S_RX-and-RX_CDC_DMA_RX_0"/>
<device name="SND_DEVICE_OUT_SPEAKER_AND_BT_SCO" backend="speaker-and-bt-sco" interface="SEN_MI2S_RX-and-SLIMBUS_7_RX"/>
<device name="SND_DEVICE_OUT_SPEAKER_AND_BT_SCO_WB" backend="speaker-and-bt-sco-wb" interface="SEN_MI2S_RX-and-SLIMBUS_7_RX"/>
<device name="SND_DEVICE_OUT_SPEAKER_AND_BT_SCO_SWB" backend="speaker-and-bt-sco-swb" interface="TERT_MI2S_RX-and-SLIMBUS_7_RX"/>
<device name="SND_DEVICE_OUT_SPEAKER_AND_USB_HEADSET" backend="speaker-and-usb-headset" interface="SEN_MI2S_RX-and-USB_AUDIO_RX"/>
<device name="SND_DEVICE_OUT_VOICE_TTY_FULL_USB" backend="usb-headset" interface="USB_AUDIO_RX"/>
<device name="SND_DEVICE_OUT_VOICE_TTY_VCO_USB" backend="usb-headset" interface="USB_AUDIO_RX"/>

View file

@ -165,8 +165,6 @@
<ctl name="AUDIO_REF_EC_UL1 MUX" value="None" />
<ctl name="AUDIO_REF_EC_UL10 MUX" value="None" />
<ctl name="EC Reference Channels" value="Zero"/>
<ctl name="SPK ASP TX1 Source" value="VMON" />
<ctl name="SPK ASP TX2 Source" value="Zero" />
<!-- usb headset -->
<ctl name="AFE_PCM_RX Audio Mixer MultiMedia1" value="0" />
<ctl name="AFE_PCM_RX Audio Mixer MultiMedia2" value="0" />
@ -281,7 +279,6 @@
<!-- audio record compress end-->
<!-- split a2dp -->
<ctl name="BT SampleRate" value="KHZ_8" />
<ctl name="AFE Input Channels" value="Zero" />
<ctl name="SLIM7_RX ADM Channels" value="Zero" />
<!-- split a2dp end-->
@ -318,8 +315,6 @@
<ctl name="AUX_RDAC Switch" value="0" />
<ctl name="RDAC3_MUX" value="RX1" />
<ctl name="RX_EAR Mode" value="OFF" />
<ctl name="SEN_MI2S_RX Channels" value="One" />
<ctl name="SEN_MI2S_TX Channels" value="One" />
<!-- TX Controls -->
<!-- Enable these switches at the end of a path -->
@ -446,17 +441,6 @@
<ctl name="RX_Softclip Enable" value="0" />
<ctl name="RX INT2_1 VBAT RX AUX VBAT Enable" value="0" />
<!-- smart amplifier start -->
<ctl name="SPK DSP1 Firmware" value="protection" />
<ctl name="SPK DSP1 Preload Switch" value="1" />
<ctl name="SPK DSP RX1 Source" value="ASPRX1" />
<ctl name="SPK DSP RX2 Source" value="ASPRX1" />
<ctl name="SPK AMP PCM Gain" value="10" />
<ctl name="SPK PCM Source" value="ASP" />
<ctl name="SPK AMP Enable Switch" value="0" />
<ctl name="SPK PCM Soft Ramp" value="Off" />
<!-- smart amplifier end -->
<!-- Codec controls end -->
<!-- defaults for mmap record -->
@ -467,6 +451,9 @@
<ctl name="RX_CDC_DMA_RX_6 Audio Mixer MultiMedia32" value="0"/>
<ctl name="RX_CDC_DMA_RX_6 Channels" value="One" />
<ctl name="SEN_MI2S_RX Channels" value="One" />
<ctl name="SEN_MI2S_TX Channels" value="Two" />
<!-- These are audio route (FE to BE) specific mixer settings -->
<path name="gsm-mode">
<ctl name="RX_GSM mode Enable" value="ON" />
@ -508,6 +495,21 @@
<path name="echo-reference bt-sco" />
</path>
<path name="echo-reference-voip-low-latency">
<ctl name="AUDIO_REF_EC_UL8 MUX" value="TERT_MI2S_RX" />
<ctl name="EC Reference Channels" value="Two"/>
</path>
<path name="echo-reference-voip-low-latency handset">
<ctl name="AUDIO_REF_EC_UL8 MUX" value="TERT_MI2S_RX" />
<ctl name="EC Reference Channels" value="One"/>
</path>
<path name="echo-reference-voip-low-latency headphones">
<ctl name="AUDIO_REF_EC_UL8 MUX" value="TERT_MI2S_RX" />
<ctl name="EC Reference Channels" value="Two"/>
</path>
<path name="echo-reference-voip">
<ctl name="AUDIO_REF_EC_UL10 MUX" value="SEN_MI2S_TX" />
<ctl name="EC Reference Channels" value="One"/>
@ -544,7 +546,6 @@
</path>
<path name="deep-buffer-playback bt-sco-wb">
<ctl name="BT SampleRate" value="KHZ_16" />
<path name="deep-buffer-playback bt-sco" />
</path>
@ -615,7 +616,6 @@
</path>
<path name="low-latency-playback bt-sco-wb">
<ctl name="BT SampleRate" value="KHZ_16" />
<path name="low-latency-playback bt-sco" />
</path>
@ -699,7 +699,6 @@
</path>
<path name="audio-ull-playback bt-sco-wb">
<ctl name="BT SampleRate" value="KHZ_16" />
<path name="audio-ull-playback bt-sco" />
</path>
@ -756,7 +755,6 @@
</path>
<path name="compress-offload-playback bt-sco-wb">
<ctl name="BT SampleRate" value="KHZ_16" />
<path name="compress-offload-playback bt-sco" />
</path>
@ -908,7 +906,6 @@
</path>
<path name="audio-record bt-sco-wb">
<ctl name="BT SampleRate" value="KHZ_16" />
<path name="audio-record bt-sco" />
</path>
@ -933,7 +930,6 @@
</path>
<path name="audio-record-compress bt-sco-wb">
<ctl name="BT SampleRate" value="KHZ_16" />
<path name="audio-record-compress bt-sco" />
</path>
@ -958,7 +954,6 @@
</path>
<path name="audio-record-compress2 bt-sco-wb">
<ctl name="BT SampleRate" value="KHZ_16" />
<path name="audio-record-compress2 bt-sco" />
</path>
@ -983,7 +978,6 @@
</path>
<path name="low-latency-record bt-sco-wb">
<ctl name="BT SampleRate" value="KHZ_16" />
<path name="low-latency-record bt-sco" />
</path>
@ -1161,7 +1155,6 @@
</path>
<path name="compress-voip-call bt-sco-wb">
<ctl name="BT SampleRate" value="KHZ_16" />
<path name="compress-voip-call bt-sco" />
</path>
@ -1190,7 +1183,6 @@
</path>
<path name="voicemmode1-call speaker">
<ctl name="VOC_EXT_EC MUX" value="SEN_MI2S_TX" />
<ctl name="SEN_MI2S_RX_Voice Mixer VoiceMMode1" value="1" />
<ctl name="VoiceMMode1_Tx Mixer TX_CDC_DMA_TX_3_MMode1" value="1" />
</path>
@ -1221,7 +1213,6 @@
</path>
<path name="voicemmode1-call bt-sco-wb">
<ctl name="BT SampleRate" value="KHZ_16" />
<path name="voicemmode1-call bt-sco" />
</path>
@ -1250,7 +1241,6 @@
</path>
<path name="voicemmode2-call speaker">
<ctl name="VOC_EXT_EC MUX" value="SEN_MI2S_TX" />
<ctl name="SEN_MI2S_RX_Voice Mixer VoiceMMode2" value="1" />
<ctl name="VoiceMMode2_Tx Mixer TX_CDC_DMA_TX_3_MMode2" value="1" />
</path>
@ -1271,7 +1261,6 @@
</path>
<path name="voicemmode2-call bt-sco-wb">
<ctl name="BT SampleRate" value="KHZ_16" />
<path name="voicemmode2-call bt-sco" />
</path>
@ -1326,7 +1315,6 @@
</path>
<path name="audio-playback-voip bt-sco-wb">
<ctl name="BT SampleRate" value="KHZ_16" />
<path name="audio-playback-voip bt-sco" />
</path>
@ -1351,6 +1339,10 @@
</path>
<!-- VoIP Tx settings -->
<path name="audio-record-voip-low-latency">
<ctl name="MultiMedia8 Mixer TX_CDC_DMA_TX_3" value="1" />
</path>
<path name="audio-record-voip">
<ctl name="MultiMedia10 Mixer TX_CDC_DMA_TX_3" value="1" />
<ctl name="TX_DEC2 Volume" value="84" />
@ -1369,7 +1361,6 @@
</path>
<path name="audio-record-voip bt-sco-wb">
<ctl name="BT SampleRate" value="KHZ_16" />
<path name="audio-record-voip bt-sco" />
</path>
@ -1590,10 +1581,18 @@
<path name="incall_music_uplink2" />
</path>
<path name="incall_music_uplink2 handset">
<path name="incall_music_uplink2" />
</path>
<path name="incall_music_uplink2 handset-hac">
<path name="incall_music_uplink2" />
</path>
<path name="incall_music_uplink2 display-port">
<path name="incall_music_uplink2" />
</path>
<path name="incall_music_uplink2 bt-sco">
<path name="incall_music_uplink2" />
</path>
@ -1606,6 +1605,10 @@
<path name="incall_music_uplink2" />
</path>
<path name="incall_music_uplink2 speaker-and-display-port">
<path name="incall_music_uplink2" />
</path>
<path name="incall_music_uplink2 afe-proxy">
<path name="incall_music_uplink2" />
</path>
@ -1638,6 +1641,10 @@
<path name="incall_music_uplink2" />
</path>
<path name="incall_music_uplink2 voice-tty-hco-handset">
<path name="incall_music_uplink2" />
</path>
<path name="incall_music_uplink2 speaker-and-bt-a2dp">
<path name="incall_music_uplink2" />
</path>
@ -1661,6 +1668,7 @@
</path>
<path name="spkr-vi-record">
<ctl name="SEN_MI2S_RX_VI_FB_MUX" value="SEN_MI2S_TX" />
</path>
<!-- These are actual sound device specific mixer settings -->
@ -1790,9 +1798,6 @@
</path>
<path name="speaker">
<ctl name="SPK PCM Source" value="DSP" />
<ctl name="SPK AMP PCM Gain" value="17" />
<ctl name="SPK AMP Enable Switch" value="1" />
</path>
<path name="speaker-mono">
@ -1931,8 +1936,9 @@
</path>
<path name="headset-mic">
<ctl name="TX_DEC0 Volume" value="84" />
<path name="amic2" />
<ctl name="TX_DEC0 Volume" value="84" />
<ctl name="ADC2 Volume" value="8" />
</path>
<path name="external-mic">
@ -1954,7 +1960,6 @@
</path>
<path name="voice-speaker">
<ctl name="SPK PCM Soft Ramp" value="15ms" />
<path name="speaker-mono" />
</path>
@ -1976,6 +1981,7 @@
<path name="voice-headset-mic">
<path name="headset-mic" />
<ctl name="ADC2 Volume" value="8" />
</path>
<path name="speaker-and-headphones">
@ -2065,6 +2071,10 @@
<path name="speaker-dmic-endfire" />
</path>
<path name="hearing-aid-mic">
<path name="voice-speaker-mic"/>
</path>
<path name="voice-dmic-ef-tmus">
<path name="dmic-endfire" />
</path>

View file

@ -127,11 +127,10 @@
@see https://www.w3.org/TR/SVG/paths.html#PathData
-->
<string translatable="false" name="config_mainBuiltInDisplayCutout">
M 0,0
h -35
v 90
h 70
v -90
M -50,0
L 50,0
L 50,115
L -50,115
Z
</string>
@ -288,7 +287,7 @@
the framework from using higher refresh rates, even if display modes with higher refresh
rates are available from hardware composer. Only has an effect if the value is
non-zero. -->
<integer name="config_defaultPeakRefreshRate">60</integer>
<integer name="config_defaultPeakRefreshRate">120</integer>
<!-- MMS user agent string -->
<string name="config_mms_user_agent" translatable="false">motorolaedge</string>

View file

@ -0,0 +1,89 @@
#!/vendor/bin/sh
#
# Identify fingerprint sensor model
#
# Copyright (c) 2019 Lenovo
# All rights reserved.
#
# Changed Log:
# ---------------------------------
# April 15, 2019 chengql2@lenovo.com Initial version
# April 28, 2019 chengql2 Add fps_id creating step
# December 2, 2019 chengql2 Store fps_id into persist fs, and identify sensor
# again when secure unit boots as factory mode.
script_name=${0##*/}
script_name=${script_name%.*}
function log {
echo "$script_name: $*" > /dev/kmsg
}
persist_fps_id=/mnt/vendor/persist/fps/vendor_id
FPS_VENDOR_GOODIX=goodix
FPS_VENDOR_EGIS=egis
FPS_VENDOR_NONE=none
function is_file_ready {
if [ "$(ls $1)" != "" ]; then
return 0
fi
log "$0 - wait for $1 ..."
for i in $(seq 1 100); do
if [ "$(ls $1)" == "" ]; then
continue
fi
return 0
done
log "$0 - timeout"
return 1
}
function ident_fps {
log "- install Goodix FPS kernel module"
insmod /vendor/lib/modules/goodix_fod_mmi.ko
log "- identify Goodix fingerprint sensor"
is_file_ready /dev/goodix_fp
is_file_ready /vendor/firmware_mnt/image/goodixfp.mdt
/vendor/bin/hw/goodix_ident
if [ $? -eq 0 ]; then
log "ok"
echo $FPS_VENDOR_GOODIX > $persist_fps_id
return 0
fi
log "- uninstall Goodix FPS kernel module"
rmmod goodix_fod_mmi
log "- install Egis FPS kernel module"
insmod /vendor/lib/modules/ets_fps_mmi.ko
echo $FPS_VENDOR_EGIS > $persist_fps_id
return 0
}
if [ ! -f $persist_fps_id ]; then
ident_fps
return $?
fi
fps_vendor=$(cat $persist_fps_id)
if [ -z $fps_vendor ]; then
fps_vendor=$FPS_VENDOR_NONE
fi
log "FPS vendor: $fps_vendor"
if [ $fps_vendor == $FPS_VENDOR_EGIS ]; then
log "- install EgisTech FPS kernel module"
insmod /vendor/lib/modules/ets_fps_mmi.ko
return $?
fi
if [ $fps_vendor == $FPS_VENDOR_GOODIX ]; then
log "- install Goodix FPS kernel module"
insmod /vendor/lib/modules/goodix_fod_mmi.ko
return $?
fi
ident_fps
return $?

View file

@ -0,0 +1,109 @@
#!/vendor/bin/sh
#
# Start indicated fingerprint HAL service
#
# Copyright (c) 2019 Lenovo
# All rights reserved.
#
# April 15, 2019 chengql2@lenovo.com Initial version
# December 2, 2019 chengql2 Store fps_id into persist fs
script_name=${0##*/}
script_name=${script_name%.*}
function log {
echo "$script_name: $*" > /dev/kmsg
}
persist_fps_id=/mnt/vendor/persist/fps/vendor_id
persist_fps_id2=/mnt/vendor/persist/fps/last_vendor_id
MAX_TIMES=20
if [ ! -f $persist_fps_id ]; then
log "warn: no associated persist file found"
return -1
fi
FPS_VENDOR_NONE=none
FPS_VENDOR_EGIS=egis
FPS_VENDOR_GOODIX=goodix
prop_fps_status=vendor.hw.fingerprint.status
prop_persist_fps=persist.vendor.hardware.fingerprint
FPS_STATUS_NONE=none
FPS_STATUS_OK=ok
fps_vendor2=$(cat $persist_fps_id2)
if [ -z $fps_vendor2 ]; then
fps_vendor2=$FPS_VENDOR_NONE
fi
log "FPS vendor (last): $fps_vendor2"
fps_vendor=$(cat $persist_fps_id)
if [ -z $fps_vendor ]; then
fps_vendor=$FPS_VENDOR_NONE
fi
log "FPS vendor: $fps_vendor"
if [ $fps_vendor == $FPS_STATUS_NONE ]; then
log "warn: boot as the last FPS"
fps=$fps_vendor2
else
fps=$fps_vendor
fi
for i in $(seq 1 2); do
setprop $prop_fps_status $FPS_STATUS_NONE
if [ $fps == $FPS_VENDOR_GOODIX ]; then
log "- start service 'goodix_hal'"
start goodix_hal
else
log "- start service 'ets_hal'"
start ets_hal
fi
sleep 1.2
fps_status=$(getprop $prop_fps_status)
if [ $fps_status == $FPS_STATUS_NONE ]; then
log "- wait for fingerprint HAL service ..."
for j in $(seq 1 100); do
fps_status=$(getprop $prop_fps_status)
if [ $fps_status != $FPS_STATUS_NONE ]; then
break
fi
sleep 0.2
done
fi
log "status: $fps_status"
if [ $fps_status == $FPS_STATUS_OK ]; then
log "HAL success"
setprop $prop_persist_fps $fps
if [ $fps_vendor2 == $fps ]; then
return 0
fi
log "- update FPS vendor (last)"
echo $fps > $persist_fps_id2
log "- done"
return 0
fi
if [ $fps == $fps_vendor2 ]; then
if [ $fps == $FPS_VENDOR_GOODIX ]; then
rmmod goodix_fod_mmi
insmod /vendor/lib/modules/ets_fps_mmi.ko
fps=$FPS_VENDOR_EGIS
else
rmmod ets_fps_mmi
insmod /vendor/lib/modules/goodix_fod_mmi.ko
fps=$FPS_VENDOR_GOODIX
fi
log "- update FPS vendor"
echo $fps > $persist_fps_id
sleep 1
else
log "error: HAL fail again"
setprop $prop_persist_fps $FPS_VENDOR_NONE
echo $FPS_VENDOR_NONE > $persist_fps_id
log "- done"
return 1
fi
done

View file

@ -10,8 +10,7 @@ on early-init
insmod /vendor/lib/modules/bm_adsp_ulog.ko
insmod /vendor/lib/modules/mmi_charger.ko
insmod /vendor/lib/modules/qti_glink_charger.ko
insmod /vendor/lib/modules/cirrus_wm_adsp.ko
insmod /vendor/lib/modules/cirrus_cs35l41.ko
insmod /vendor/lib/modules/aw882xx_k504.ko
insmod /vendor/lib/modules/mmi_sys_temp.ko
insmod /vendor/lib/modules/wl2864c.ko
insmod /vendor/lib/modules/goodix_mmi.ko
@ -19,12 +18,10 @@ on early-init
insmod /vendor/lib/modules/aw8695.ko
insmod /vendor/lib/modules/cci_intf.ko
insmod /vendor/lib/modules/qpnp_adaptive_charge.ko
insmod /vendor/lib/modules/5.4-gki/camera.ko
insmod /vendor/lib/modules/5.4-gki/aw8695.ko
start vendor.mmi_modules
on fs
# Goodix fingerprint sensor GF3626 reuses the driver "goodix_fod_mmi.ko"
insmod /vendor/lib/modules/goodix_fod_mmi.ko
on post-fs
# Sensors
chown system system /sys/devices/platform/soc/a94000.spi/spi_master/spi0/spi0.0/touchscreen/NVT-ts/double_tap_enabled
@ -45,6 +42,7 @@ on post-fs-data
# Param updater data for various modules
mkdir /data/vendor/param 0775 system system
mkdir /data/vendor/tzstorage/goodix 0770 system system
exec_start vendor.ident-fps-overlay-sh
on early-boot
# Goodix fingerprint
@ -52,26 +50,11 @@ on early-boot
chmod 0664 /dev/goodix_fp
on boot
# allow TCMD to access cci for OIS test
chmod 0660 /dev/cci_intf
chown system camera /dev/cci_intf
#change adsp pmic test command file access permission
chown vendor_tcmd system /sys/devices/platform/soc/soc:qcom,pmic_glink/soc:qcom,pmic_glink:mmi,qti-glink-charger/tcmd
chown vendor_tcmd system /sys/devices/platform/soc/soc:qcom,pmic_glink/soc:qcom,pmic_glink:mmi,qti-glink-charger/force_pmic_icl
chmod 0660 /sys/devices/platform/soc/soc:qcom,pmic_glink/soc:qcom,pmic_glink:mmi,qti-glink-charger/tcmd
chmod 0660 /sys/devices/platform/soc/soc:qcom,pmic_glink/soc:qcom,pmic_glink:mmi,qti-glink-charger/force_pmic_icl
# Touch game mode control
chown system system /sys/class/touchscreen/primary/rotate
chmod 0660 /sys/class/touchscreen/primary/rotate
chown system system /sys/class/touchscreen/primary/interpolation
chmod 0660 /sys/class/touchscreen/primary/interpolation
chown system system /sys/class/touchscreen/primary/edge
chmod 0660 /sys/class/touchscreen/primary/edge
chown system system /sys/class/touchscreen/primary/first_filter
chmod 0660 /sys/class/touchscreen/primary/first_filter
chown system system /sys/class/touchscreen/primary/sensitivity
chmod 0660 /sys/class/touchscreen/primary/sensitivity
chown system system /sys/devices/platform/soc/a94000.i2c/i2c-2/2-0049/double_click
chmod 0660 /sys/devices/platform/soc/a94000.i2c/i2c-2/2-0049/double_click
chown system system /sys/devices/platform/soc/a94000.i2c/i2c-2/2-0049/single_click
@ -94,5 +77,25 @@ on property:sys.boot_completed=1
start capsense_reset
on property:persist.vendor.paramfile.parse_panel=1
write /sys/devices/platform/soc/soc:qcom,dsi-display-primary/dsi_display_parse_para "5"
write /sys/devices/platform/soc/soc:qcom,dsi-display-primary/dsi_display_parse_para "1"
service vendor.ident-fps-overlay-sh /vendor/bin/init.oem.fingerprint.overlay.sh
class core
user root
group drmrpc system
oneshot
disabled
service vendor.ident-fps-sh /vendor/bin/init.oem.fingerprint.sh
class core
user root
group drmrpc system
oneshot
disabled
service egis_ident /vendor/bin/egis_ident
class late_start
user system
group system
oneshot
disabled