From 848c5d4808b24bf5d6d2c09b43d90834ef8e55af Mon Sep 17 00:00:00 2001 From: electimon Date: Thu, 23 Feb 2023 08:53:49 +0800 Subject: [PATCH] common: vendor: Introduce dsprpcd module * Based upon LA.UM.9.12.r1-13500.01-SMxx50.QSSI12.0, This module contains *dsprpcd services with a selector to enable the correct services [TODO: Evaluate enabling this component on ALL] Change-Id: I79aaa8fd359ba4c8450f5896b9cfb873cec1f468 Signed-off-by: electimon --- components.mk | 4 ++ vendor/dsprpcd/extract-files.sh | 31 ++++++++++ vendor/dsprpcd/proprietary-files.txt | 57 +++++++++++++++++++ vendor/dsprpcd/qti-dsprpcd.mk | 27 +++++++++ vendor/dsprpcd/setup-makefiles.sh | 25 ++++++++ ...r.qti.adsprpc-guestos-noaudiopd-service.rc | 37 ++++++++++++ .../vendor.qti.adsprpc-guestos-service.rc | 42 ++++++++++++++ .../vendor.qti.adsprpc-sscrpc-service.rc | 50 ++++++++++++++++ vendor/dsprpcd/vendor.sensors.sscrpcd.rc | 37 ++++++++++++ 9 files changed, 310 insertions(+) create mode 100755 vendor/dsprpcd/extract-files.sh create mode 100644 vendor/dsprpcd/proprietary-files.txt create mode 100644 vendor/dsprpcd/qti-dsprpcd.mk create mode 100755 vendor/dsprpcd/setup-makefiles.sh create mode 100644 vendor/dsprpcd/vendor.qti.adsprpc-guestos-noaudiopd-service.rc create mode 100644 vendor/dsprpcd/vendor.qti.adsprpc-guestos-service.rc create mode 100644 vendor/dsprpcd/vendor.qti.adsprpc-sscrpc-service.rc create mode 100644 vendor/dsprpcd/vendor.sensors.sscrpcd.rc diff --git a/components.mk b/components.mk index 31523922..47f350ee 100644 --- a/components.mk +++ b/components.mk @@ -70,6 +70,10 @@ ifneq (,$(filter display, $(TARGET_COMMON_QTI_COMPONENTS))) include $(QCOM_COMMON_PATH)/vendor/display/qti-display.mk endif +ifneq (,$(filter dsprpcd, $(TARGET_COMMON_QTI_COMPONENTS))) + include $(QCOM_COMMON_PATH)/vendor/dsprpcd/qti-dsprpcd.mk +endif + ifeq ($(call is-board-platform-in-list,$(5_10_FAMILY)),true) include $(QCOM_COMMON_PATH)/dlkm/qti-dlkm.mk endif diff --git a/vendor/dsprpcd/extract-files.sh b/vendor/dsprpcd/extract-files.sh new file mode 100755 index 00000000..519cb1c7 --- /dev/null +++ b/vendor/dsprpcd/extract-files.sh @@ -0,0 +1,31 @@ +#!/bin/bash +# +# Copyright (C) 2018-2019 The LineageOS Project +# Copyright (C) 2020 Paranoid Android +# +# 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. +# + +# If we're being sourced by the common script that we called, +# stop right here. No need to go down the rabbit hole. +if [ "${BASH_SOURCE[0]}" != "${0}" ]; then + return +fi + +set -e + +# Required! +export COMPONENT=dsprpcd +export VENDOR=qcom/common/vendor + +"../extract-files.sh" "$@" diff --git a/vendor/dsprpcd/proprietary-files.txt b/vendor/dsprpcd/proprietary-files.txt new file mode 100644 index 00000000..a6473238 --- /dev/null +++ b/vendor/dsprpcd/proprietary-files.txt @@ -0,0 +1,57 @@ +# DSP +vendor/bin/dspservice +vendor/etc/init/vendor.qti.hardware.dsp@1.0-service.rc +vendor/etc/seccomp_policy/vendor.qti.hardware.dsp.policy +vendor/lib/libfastcvdsp_stub.so +-vendor/lib/libfastcvopt.so +vendor/lib/vendor.qti.hardware.dsp@1.0.so +vendor/lib64/libfastcvdsp_stub.so +-vendor/lib64/libfastcvopt.so +vendor/lib64/vendor.qti.hardware.dsp@1.0.so + +# ADSP +vendor/bin/adsprpcd +vendor/lib/libadsp_default_listener.so +vendor/lib/libadsprpc.so +vendor/lib64/libadsp_default_listener.so +vendor/lib64/libadsprpc.so + +# CDSP +vendor/bin/cdsprpcd +vendor/etc/init/vendor.qti.cdsprpc-service.rc +vendor/lib/libcdsp_default_listener.so +vendor/lib/libcdsprpc.so +vendor/lib/libsysmon_cdsp_skel.so +vendor/lib64/libcdsp_default_listener.so +vendor/lib64/libcdsprpc.so +vendor/lib64/libsysmon_cdsp_skel.so + +# MDSP +vendor/lib/libmdsprpc.so +vendor/lib64/libmdsprpc.so + +# Sensors + DSP +vendor/bin/sscrpcd +vendor/bin/sensors.qti +vendor/etc/init/init.vendor.sensors.rc +vendor/etc/init/vendor.sensors.qti.rc +vendor/lib/libsdsprpc.so +vendor/lib/libsensorcal.so +vendor/lib/libsensorslog.so +vendor/lib/libsns_device_mode_stub.so +vendor/lib/libsns_fastRPC_util.so +vendor/lib/libsns_low_lat_stream_stub.so +vendor/lib/libsnsapi.so +vendor/lib/libsnsdiaglog.so +vendor/lib/libssc.so +vendor/lib/libssc_default_listener.so +vendor/lib64/libsdsprpc.so +vendor/lib64/libsensorcal.so +vendor/lib64/libsensorslog.so +vendor/lib64/libsns_device_mode_stub.so +vendor/lib64/libsns_fastRPC_util.so +vendor/lib64/libsns_low_lat_stream_stub.so +vendor/lib64/libsnsapi.so +vendor/lib64/libsnsdiaglog.so +vendor/lib64/libssc.so +vendor/lib64/libssc_default_listener.so diff --git a/vendor/dsprpcd/qti-dsprpcd.mk b/vendor/dsprpcd/qti-dsprpcd.mk new file mode 100644 index 00000000..c3b14aa0 --- /dev/null +++ b/vendor/dsprpcd/qti-dsprpcd.mk @@ -0,0 +1,27 @@ +# Copyright (C) 2021 Paranoid Android +# +# 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. + +ifeq ($(TARGET_KERNEL_VERSION),4.14) +PRODUCT_COPY_FILES += $(QCOM_COMMON_PATH)/vendor/dsprpcd/vendor.qti.adsprpc-sscrpc-service.rc:vendor/etc/init/vendor.qti.adsprpc-sscrpc-service.rc +else +ifneq ($(TARGET_BOARD_PLATFORM),sdm660) +PRODUCT_COPY_FILES += $(QCOM_COMMON_PATH)/vendor/dsprpcd/vendor.qti.adsprpc-guestos-service.rc:vendor/etc/init/vendor.qti.adsprpc-guestos-service.rc +PRODUCT_COPY_FILES += $(QCOM_COMMON_PATH)/vendor/dsprpcd/vendor.sensors.sscrpcd.rc:vendor/etc/init/vendor.sensors.sscrpcd.rc +else +PRODUCT_COPY_FILES += $(QCOM_COMMON_PATH)/vendor/dsprpcd/vendor.qti.adsprpc-guestos-noaudiopd-service.rc:vendor/etc/init/vendor.qti.adsprpc-guestos-noaudiopd-service.rc +endif +endif + +# Get non-open-source specific aspects. +$(call inherit-product-if-exists, vendor/qcom/common/vendor/dsprpcd/dsprpcd-vendor.mk) diff --git a/vendor/dsprpcd/setup-makefiles.sh b/vendor/dsprpcd/setup-makefiles.sh new file mode 100755 index 00000000..26f570d1 --- /dev/null +++ b/vendor/dsprpcd/setup-makefiles.sh @@ -0,0 +1,25 @@ +#!/bin/bash +# +# Copyright (C) 2018-2019 The LineageOS Project +# Copyright (C) 2020 Paranoid Android +# +# 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. +# + +set -e + +# Required! +export COMPONENT=dsprpcd +export VENDOR=qcom/common/vendor + +"../setup-makefiles.sh" "$@" diff --git a/vendor/dsprpcd/vendor.qti.adsprpc-guestos-noaudiopd-service.rc b/vendor/dsprpcd/vendor.qti.adsprpc-guestos-noaudiopd-service.rc new file mode 100644 index 00000000..8e75c041 --- /dev/null +++ b/vendor/dsprpcd/vendor.qti.adsprpc-guestos-noaudiopd-service.rc @@ -0,0 +1,37 @@ +# Copyright (c) 2019 Qualcomm Technologies, Inc. +# All Rights Reserved. +# Confidential and Proprietary - Qualcomm Technologies, Inc. +# +# +# Copyright (c) 2018-2019, The Linux Foundation. All rights reserved. +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions are +# met: +# * Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# * Redistributions in binary form must reproduce the above +# copyright notice, this list of conditions and the following +# disclaimer in the documentation and/or other materials provided +# with the distribution. +# * Neither the name of The Linux Foundation nor the names of its +# contributors may be used to endorse or promote products derived +# from this software without specific prior written permission. +# +# THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESS OR IMPLIED +# WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF +# MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT +# ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS +# BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR +# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF +# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR +# BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, +# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE +# OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN +# IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +# + +service vendor.adsprpcd /vendor/bin/adsprpcd + class main + user system + group media diff --git a/vendor/dsprpcd/vendor.qti.adsprpc-guestos-service.rc b/vendor/dsprpcd/vendor.qti.adsprpc-guestos-service.rc new file mode 100644 index 00000000..f5ec24fb --- /dev/null +++ b/vendor/dsprpcd/vendor.qti.adsprpc-guestos-service.rc @@ -0,0 +1,42 @@ +# Copyright (c) 2019 Qualcomm Technologies, Inc. +# All Rights Reserved. +# Confidential and Proprietary - Qualcomm Technologies, Inc. +# +# +# Copyright (c) 2018-2019, The Linux Foundation. All rights reserved. +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions are +# met: +# * Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# * Redistributions in binary form must reproduce the above +# copyright notice, this list of conditions and the following +# disclaimer in the documentation and/or other materials provided +# with the distribution. +# * Neither the name of The Linux Foundation nor the names of its +# contributors may be used to endorse or promote products derived +# from this software without specific prior written permission. +# +# THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESS OR IMPLIED +# WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF +# MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT +# ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS +# BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR +# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF +# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR +# BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, +# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE +# OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN +# IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +# + +service vendor.adsprpcd /vendor/bin/adsprpcd + class main + user system + group media + +service vendor.adsprpcd_audiopd /vendor/bin/adsprpcd audiopd + class main + user media + group media diff --git a/vendor/dsprpcd/vendor.qti.adsprpc-sscrpc-service.rc b/vendor/dsprpcd/vendor.qti.adsprpc-sscrpc-service.rc new file mode 100644 index 00000000..e0e76708 --- /dev/null +++ b/vendor/dsprpcd/vendor.qti.adsprpc-sscrpc-service.rc @@ -0,0 +1,50 @@ +# Copyright (c) 2019-2020 Qualcomm Technologies, Inc. +# All Rights Reserved. +# Confidential and Proprietary - Qualcomm Technologies, Inc. +# +# +# Copyright (c) 2013-2018, The Linux Foundation. All rights reserved. +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions are +# met: +# * Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# * Redistributions in binary form must reproduce the above +# copyright notice, this list of conditions and the following +# disclaimer in the documentation and/or other materials provided +# with the distribution. +# * Neither the name of The Linux Foundation nor the names of its +# contributors may be used to endorse or promote products derived +# from this software without specific prior written permission. +# +# THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESS OR IMPLIED +# WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF +# MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT +# ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS +# BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR +# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF +# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR +# BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, +# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE +# OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN +# IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +# + +service vendor.adsprpcd /vendor/bin/adsprpcd + class main + user system + group media + +service vendor.adsprpcd_audiopd /vendor/bin/adsprpcd audiopd + class main + user media + group media + +service vendor.adsprpcd_sensorspd /vendor/bin/adsprpcd sensorspd + class core + user system + group system + +on property:vendor.fastrpc.disable.adsprpcd_sensorspd.daemon=1 + stop vendor.adsprpcd_sensorspd \ No newline at end of file diff --git a/vendor/dsprpcd/vendor.sensors.sscrpcd.rc b/vendor/dsprpcd/vendor.sensors.sscrpcd.rc new file mode 100644 index 00000000..741875a9 --- /dev/null +++ b/vendor/dsprpcd/vendor.sensors.sscrpcd.rc @@ -0,0 +1,37 @@ +# Copyright (c) 2019 Qualcomm Technologies, Inc. +# All Rights Reserved. +# Confidential and Proprietary - Qualcomm Technologies, Inc. +# +# Copyright (c) 2009-2012, 2014-2019, The Linux Foundation. All rights reserved. +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions are met: +# # Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# # Redistributions in binary form must reproduce the above copyright +# notice, this list of conditions and the following disclaimer in the +# documentation and/or other materials provided with the distribution. +# # Neither the name of The Linux Foundation nor +# the names of its contributors may be used to endorse or promote +# products derived from this software without specific prior written +# permission. +# +# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" +# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +# IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +# NON-INFRINGEMENT ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR +# CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, +# EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, +# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; +# OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, +# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR +# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF +# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +# + +service vendor.sensors /vendor/bin/sscrpcd sensorspd + class early_hal + user system + group system wakelock + capabilities BLOCK_SUSPEND + shutdown critical