Skip to content

Commit

Permalink
sm8250-common -> sm7325-common
Browse files Browse the repository at this point in the history
  • Loading branch information
SGCMarkus committed Mar 26, 2022
1 parent 5404d41 commit 95b667c
Show file tree
Hide file tree
Showing 74 changed files with 4,207 additions and 3,939 deletions.
114 changes: 36 additions & 78 deletions Android.mk
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@

LOCAL_PATH := $(call my-dir)

ifneq ($(filter nio pstar,$(TARGET_DEVICE)),)
ifneq ($(filter berlin,$(TARGET_DEVICE)),)
subdir_makefiles=$(call first-makefiles-under,$(LOCAL_PATH))
$(foreach mk,$(subdir_makefiles),$(info including $(mk) ...)$(eval include $(mk)))

Expand Down Expand Up @@ -46,105 +46,72 @@ $(FSG_MOUNT_POINT): $(LOCAL_INSTALLED_MODULE)

ALL_DEFAULT_INSTALLED_MODULES += $(FIRMWARE_MOUNT_POINT) $(BT_FIRMWARE_MOUNT_POINT) $(DSP_MOUNT_POINT) $(FSG_MOUNT_POINT)

RFS_MDM_ADSP_SYMLINKS := $(TARGET_OUT_VENDOR)/rfs/mdm/adsp
$(RFS_MDM_ADSP_SYMLINKS): $(LOCAL_INSTALLED_MODULE)
@echo "Creating RFS MDM ADSP folder structure: $@"
@rm -rf $@
@mkdir -p $@/readonly/vendor
RFS_MSM_ADSP_SYMLINKS := $(TARGET_OUT_VENDOR)/rfs/msm/adsp/
$(RFS_MSM_ADSP_SYMLINKS): $(LOCAL_INSTALLED_MODULE)
@echo "Creating RFS MSM ADSP folder structure: $@"
@rm -rf $@/*
@mkdir -p $(dir $@)/readonly/vendor
$(hide) ln -sf /data/vendor/tombstones/rfs/lpass $@/ramdumps
$(hide) ln -sf /mnt/vendor/persist/rfs/mdm/adsp $@/readwrite
$(hide) ln -sf /mnt/vendor/persist/rfs/msm/adsp $@/readwrite
$(hide) ln -sf /mnt/vendor/persist/rfs/shared $@/shared
$(hide) ln -sf /mnt/vendor/persist/hlos_rfs/shared $@/hlos
$(hide) ln -sf /vendor/firmware_mnt $@/readonly/firmware
$(hide) ln -sf /vendor/firmware $@/readonly/vendor/firmware

ALL_DEFAULT_INSTALLED_MODULES += $(RFS_MDM_ADSP_SYMLINKS)

RFS_MDM_CDSP_SYMLINKS := $(TARGET_OUT_VENDOR)/rfs/mdm/cdsp
$(RFS_MDM_CDSP_SYMLINKS): $(LOCAL_INSTALLED_MODULE)
@echo "Creating RFS MDM CDSP folder structure: $@"
@rm -rf $@
@mkdir -p $@/readonly/vendor
RFS_MSM_CDSP_SYMLINKS := $(TARGET_OUT_VENDOR)/rfs/msm/cdsp/
$(RFS_MSM_CDSP_SYMLINKS): $(LOCAL_INSTALLED_MODULE)
@echo "Creating RFS MSM CDSP folder structure: $@"
@rm -rf $@/*
@mkdir -p $(dir $@)/readonly/vendor
$(hide) ln -sf /data/vendor/tombstones/rfs/cdsp $@/ramdumps
$(hide) ln -sf /mnt/vendor/persist/rfs/mdm/cdsp $@/readwrite
$(hide) ln -sf /mnt/vendor/persist/rfs/msm/cdsp $@/readwrite
$(hide) ln -sf /mnt/vendor/persist/rfs/shared $@/shared
$(hide) ln -sf /mnt/vendor/persist/hlos_rfs/shared $@/hlos
$(hide) ln -sf /vendor/firmware_mnt $@/readonly/firmware
$(hide) ln -sf /vendor/firmware $@/readonly/vendor/firmware

ALL_DEFAULT_INSTALLED_MODULES += $(RFS_MDM_CDSP_SYMLINKS)

RFS_MDM_MPSS_SYMLINKS := $(TARGET_OUT_VENDOR)/rfs/mdm/mpss
$(RFS_MDM_MPSS_SYMLINKS): $(LOCAL_INSTALLED_MODULE)
@echo "Creating RFS MDM MPSS folder structure: $@"
@rm -rf $@
@mkdir -p $@/readonly/vendor
RFS_MSM_MPSS_SYMLINKS := $(TARGET_OUT_VENDOR)/rfs/msm/mpss/
$(RFS_MSM_MPSS_SYMLINKS): $(LOCAL_INSTALLED_MODULE)
@echo "Creating RFS MSM MPSS folder structure: $@"
@rm -rf $@/*
@mkdir -p $(dir $@)/readonly/vendor
$(hide) ln -sf /data/vendor/tombstones/rfs/modem $@/ramdumps
$(hide) ln -sf /mnt/vendor/persist/rfs/mdm/mpss $@/readwrite
$(hide) ln -sf /mnt/vendor/persist/rfs/msm/mpss $@/readwrite
$(hide) ln -sf /mnt/vendor/persist/rfs/shared $@/shared
$(hide) ln -sf /mnt/vendor/persist/hlos_rfs/shared $@/hlos
$(hide) ln -sf /vendor/firmware_mnt $@/readonly/firmware
$(hide) ln -sf /vendor/firmware $@/readonly/vendor/firmware
$(hide) ln -sf /vendor/fsg $@/readonly/vendor/fsg

ALL_DEFAULT_INSTALLED_MODULES += $(RFS_MDM_MPSS_SYMLINKS)

RFS_MDM_SLPI_SYMLINKS := $(TARGET_OUT_VENDOR)/rfs/mdm/slpi
$(RFS_MDM_SLPI_SYMLINKS): $(LOCAL_INSTALLED_MODULE)
@echo "Creating RFS MDM SLPI folder structure: $@"
@rm -rf $@
@mkdir -p $@/readonly/vendor
RFS_MSM_SLPI_SYMLINKS := $(TARGET_OUT_VENDOR)/rfs/msm/slpi/
$(RFS_MSM_SLPI_SYMLINKS): $(LOCAL_INSTALLED_MODULE)
@echo "Creating RFS MSM SLPI folder structure: $@"
@rm -rf $@/*
@mkdir -p $(dir $@)/readonly/vendor
$(hide) ln -sf /data/vendor/tombstones/rfs/slpi $@/ramdumps
$(hide) ln -sf /mnt/vendor/persist/rfs/mdm/slpi $@/readwrite
$(hide) ln -sf /mnt/vendor/persist/rfs/shared $@/shared
$(hide) ln -sf /mnt/vendor/persist/hlos_rfs/shared $@/hlos
$(hide) ln -sf /vendor/firmware_mnt $@/readonly/firmware
$(hide) ln -sf /vendor/firmware $@/readonly/vendor/firmware

ALL_DEFAULT_INSTALLED_MODULES += $(RFS_MDM_SLPI_SYMLINKS)

RFS_MDM_TN_SYMLINKS := $(TARGET_OUT_VENDOR)/rfs/mdm/tn
$(RFS_MDM_TN_SYMLINKS): $(LOCAL_INSTALLED_MODULE)
@echo "Creating RFS MDM TN folder structure: $@"
@rm -rf $@
@mkdir -p $@/readonly/vendor
$(hide) ln -sf /data/vendor/tombstones/rfs/tn $@/ramdumps
$(hide) ln -sf /mnt/vendor/persist/rfs/mdm/tn $@/readwrite
$(hide) ln -sf /mnt/vendor/persist/rfs/shared $@/shared
$(hide) ln -sf /mnt/vendor/persist/hlos_rfs/shared $@/hlos
$(hide) ln -sf /vendor/firmware_mnt $@/readonly/firmware
$(hide) ln -sf /vendor/firmware $@/readonly/vendor/firmware

ALL_DEFAULT_INSTALLED_MODULES += $(RFS_MDM_TN_SYMLINKS)

RFS_MDM_WPSS_SYMLINKS := $(TARGET_OUT_VENDOR)/rfs/mdm/wpss
$(RFS_MDM_WPSS_SYMLINKS): $(LOCAL_INSTALLED_MODULE)
@echo "Creating RFS MDM WPSS folder structure: $@"
@rm -rf $@
@mkdir -p $@/readonly/vendor
$(hide) ln -sf /data/vendor/tombstones/rfs/wpss $@/ramdumps
$(hide) ln -sf /mnt/vendor/persist/rfs/mdm/wpss $@/readwrite
$(hide) ln -sf /mnt/vendor/persist/rfs/msm/slpi $@/readwrite
$(hide) ln -sf /mnt/vendor/persist/rfs/shared $@/shared
$(hide) ln -sf /mnt/vendor/persist/hlos_rfs/shared $@/hlos
$(hide) ln -sf /vendor/firmware_mnt $@/readonly/firmware
$(hide) ln -sf /vendor/firmware $@/readonly/vendor/firmware

ALL_DEFAULT_INSTALLED_MODULES += $(RFS_MDM_WPSS_SYMLINKS)

WIFI_FIRMWARE_SYMLINKS := $(TARGET_OUT_VENDOR)/firmware/wlan/qca_cld
$(WIFI_FIRMWARE_SYMLINKS): $(LOCAL_INSTALLED_MODULE)
@echo "Creating wifi firmware symlinks: $@"
@mkdir -p $@/wlan
@mkdir -p $@/qca6390
@mkdir -p $@/qca6490
@mkdir -p $@/qca6750
$(hide) ln -sf /vendor/etc/wifi/WCNSS_qcom_cfg.ini $@/WCNSS_qcom_cfg.ini
$(hide) ln -sf /vendor/etc/wifi/qca6390/WCNSS_mot_cfg.ini $@/qca6390/WCNSS_mot_cfg.ini
$(hide) ln -sf /vendor/etc/wifi/qca6390/WCNSS_qcom_cfg.ini $@/qca6390/WCNSS_qcom_cfg.ini
$(hide) ln -sf /mnt/vendor/persist/wlan/wlan_mac.bin $@/wlan/wlan_mac.bin
$(hide) ln -sf /vendor/etc/wifi/wlan/WCNSS_qcom_cfg.ini $@/wlan/WCNSS_qcom_cfg.ini
$(hide) ln -sf /vendor/etc/wifi/wlan/WCNSS_mot_cfg.ini $@/wlan/WCNSS_mot_cfg.ini
$(hide) ln -sf /mnt/vendor/persist/qca6390/wlan_mac.bin $@/qca6390/wlan_mac.bin
$(hide) ln -sf /vendor/etc/wifi/qca6490/WCNSS_mot_cfg.ini $@/qca6490/WCNSS_mot_cfg.ini
$(hide) ln -sf /vendor/etc/wifi/qca6490/WCNSS_qcom_cfg.ini $@/qca6490/WCNSS_qcom_cfg.ini
$(hide) ln -sf /mnt/vendor/persist/qca6490/wlan_mac.bin $@/qca6490/wlan_mac.bin
$(hide) ln -sf /vendor/etc/wifi/qca6390/WCNSS_qcom_cfg.ini $@/qca6390/WCNSS_qcom_cfg.ini
$(hide) ln -sf /vendor/etc/wifi/qca6390/WCNSS_mot_cfg.ini $@/qca6390/WCNSS_mot_cfg.ini
$(hide) ln -sf /mnt/vendor/persist/qca6750/wlan_mac.bin $@/qca6750/wlan_mac.bin
$(hide) ln -sf /vendor/etc/wifi/qca6750/WCNSS_qcom_cfg.ini $@/qca6750/WCNSS_qcom_cfg.ini
$(hide) ln -sf /vendor/etc/wifi/qca6750/wlan_mac.bin $@/qca6750/WCNSS_mot_cfg.ini

ALL_DEFAULT_INSTALLED_MODULES += $(WIFI_FIRMWARE_SYMLINKS)
ALL_DEFAULT_INSTALLED_MODULES += $(RFS_MSM_ADSP_SYMLINKS) $(RFS_MSM_CDSP_SYMLINKS) $(RFS_MSM_MPSS_SYMLINKS) $(RFS_MSM_SLPI_SYMLINKS) $(WIFI_FIRMWARE_SYMLINKS)

IMS_LIBS := libimscamera_jni.so libimsmedia_jni.so
IMS_SYMLINKS := $(addprefix $(TARGET_OUT_SYSTEM_EXT_APPS_PRIVILEGED)/ims/lib/arm64/,$(notdir $(IMS_LIBS)))
Expand Down Expand Up @@ -173,13 +140,4 @@ $(EXPAT_SYMLINKS): $(LOCAL_INSTALLED_MODULE)

ALL_DEFAULT_INSTALLED_MODULES += $(EXPAT_SYMLINKS)

AW882XX_CAL_SYMLINKS := $(TARGET_OUT_VENDOR)/firmware/aw_cali.bin
$(AW882XX_CAL_SYMLINKS): $(LOCAL_INSTALLED_MODULE)
@echo "Creating aw882xx firmware symlinks: $@"
@rm -rf $@
@mkdir -p $(dir $@)
$(hide) ln -sf /mnt/vendor/persist/factory/audio/aw_cali.bin $@

ALL_DEFAULT_INSTALLED_MODULES += $(AW882XX_CAL_SYMLINKS)

endif
63 changes: 16 additions & 47 deletions BoardConfigCommon.mk
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@

BOARD_VENDOR := motorola

COMMON_PATH := device/motorola/sm8250-common
COMMON_PATH := device/motorola/sm7325-common

# Architecture
TARGET_ARCH := arm64
Expand All @@ -43,60 +43,29 @@ BUILD_BROKEN_ELF_PREBUILT_PRODUCT_COPY_FILES := true
# Kernel
BOARD_BOOT_HEADER_VERSION := 3
BOARD_KERNEL_BASE := 0x00000000
BOARD_KERNEL_CMDLINE := androidboot.hardware=qcom
BOARD_KERNEL_CMDLINE += console=ttyMSM0,115200n8 earlycon=msm_geni_serial,0xa90000
BOARD_KERNEL_CMDLINE += androidboot.console=ttyMSM0 androidboot.memcg=1 lpm_levels.sleep_disabled=1
BOARD_KERNEL_CMDLINE := console=ttyMSM0,115200n8
BOARD_KERNEL_CMDLINE += androidboot.hardware=qcom androidboot.console=ttyMSM0
BOARD_KERNEL_CMDLINE += androidboot.memcg=1 lpm_levels.sleep_disabled=1
BOARD_KERNEL_CMDLINE += video=vfb:640x400,bpp=32,memsize=3072000 msm_rtb.filter=0x237
BOARD_KERNEL_CMDLINE += service_locator.enable=1 androidboot.usbcontroller=a600000.dwc3
BOARD_KERNEL_CMDLINE += swiotlb=2048 loop.max_part=7 cgroup.memory=nokmem,nosocket
BOARD_KERNEL_CMDLINE += reboot=panic_warm firmware_class.path=/vendor/firmware_mnt/image
BOARD_KERNEL_CMDLINE += swiotlb=0 loop.max_part=7 cgroup.memory=nokmem,nosocket
BOARD_KERNEL_CMDLINE += pcie_ports=compat loop.max_part=7 iptable_raw.raw_before_defrag=1
BOARD_KERNEL_CMDLINE += ip6table_raw.raw_before_defrag=1 androidboot.hab.csv=0
BOARD_KERNEL_CMDLINE += androidboot.hab.product=berlin androidboot.hab.cid=50
BOARD_KERNEL_CMDLINE += firmware_class.path=/vendor/firmware_mnt/image
BOARD_KERNEL_CMDLINE += androidboot.selinux=permissive
BOARD_KERNEL_IMAGE_NAME := Image
BOARD_KERNEL_PAGESIZE := 4096
BOARD_KERNEL_SEPARATED_DTBO := true
BOARD_MKBOOTIMG_ARGS += --header_version $(BOARD_BOOT_HEADER_VERSION)
TARGET_KERNEL_ADDITIONAL_FLAGS := DTC_EXT=$(shell pwd)/prebuilts/misc/linux-x86/dtc/dtc \
LLVM=1
TARGET_KERNEL_SOURCE := kernel/motorola/sm8250
TARGET_KERNEL_ADDITIONAL_FLAGS := DTC_EXT=$(shell pwd)/prebuilts/misc/linux-x86/dtc/dtc LLVM=1
TARGET_KERNEL_SOURCE := kernel/motorola/sm7325
TARGET_KERNEL_CLANG_COMPILE := true
TARGET_KERNEL_CONFIG := vendor/kona-perf_defconfig vendor/lineage_moto-kona.config

# Kernel modules - Audio
TARGET_MODULE_ALIASES += \
adsp_loader_dlkm.ko:audio_adsp_loader.ko \
apr_dlkm.ko:audio_apr.ko \
bolero_cdc_dlkm.ko:audio_bolero_cdc.ko \
hdmi_dlkm.ko:audio_hdmi.ko \
machine_dlkm.ko:audio_machine_kona.ko \
mbhc_dlkm.ko:audio_mbhc.ko \
native_dlkm.ko:audio_native.ko \
pinctrl_lpi_dlkm.ko:audio_pinctrl_lpi.ko \
pinctrl_wcd_dlkm.ko:audio_pinctrl_wcd.ko \
platform_dlkm.ko:audio_platform.ko \
q6_dlkm.ko:audio_q6.ko \
q6_notifier_dlkm.ko:audio_q6_notifier.ko \
q6_pdr_dlkm.ko:audio_q6_pdr.ko \
rx_macro_dlkm.ko:audio_rx_macro.ko \
snd_event_dlkm.ko:audio_snd_event.ko \
stub_dlkm.ko:audio_stub.ko \
swr_ctrl_dlkm.ko:audio_swr_ctrl.ko \
swr_dlkm.ko:audio_swr.ko \
tx_macro_dlkm.ko:audio_tx_macro.ko \
usf_dlkm.ko:audio_usf.ko \
va_macro_dlkm.ko:audio_va_macro.ko \
wcd938x_dlkm.ko:audio_wcd938x.ko \
wcd938x_slave_dlkm.ko:audio_wcd938x_slave.ko \
wcd9xxx_dlkm.ko:audio_wcd9xxx.ko \
wcd_core_dlkm.ko:audio_wcd_core.ko \
wsa881x_dlkm.ko:audio_wsa881x.ko \
wsa_macro_dlkm.ko:audio_wsa_macro.ko

# Kernel modules - WLAN
TARGET_MODULE_ALIASES += \
wlan.ko:qca_cld3_qca6390.ko
TARGET_KERNEL_CONFIG := gki_defconfig

# Platform
BOARD_USES_QCOM_HARDWARE := true
TARGET_BOARD_PLATFORM := kona
TARGET_BOARD_PLATFORM := lahaina

# A/B
AB_OTA_UPDATER := true
Expand Down Expand Up @@ -174,7 +143,7 @@ BOARD_USES_METADATA_PARTITION := true
# Partitions
BOARD_BOOTIMAGE_PARTITION_SIZE := 100663296
BOARD_DTBOIMG_PARTITION_SIZE := 25165824
BOARD_VENDOR_BOOTIMAGE_PARTITION_SIZE := 67108864
BOARD_VENDOR_BOOTIMAGE_PARTITION_SIZE := 100663296
ifneq ($(WITH_GMS),true)
BOARD_PRODUCTIMAGE_EXTFS_INODE_COUNT := -1
BOARD_SYSTEMIMAGE_EXTFS_INODE_COUNT := -1
Expand Down Expand Up @@ -246,4 +215,4 @@ WIFI_HIDL_UNIFIED_SUPPLICANT_SERVICE_RC_ENTRY := true
WPA_SUPPLICANT_VERSION := VER_0_8_X

# inherit from the proprietary version
-include vendor/motorola/sm8250-common/BoardConfigVendor.mk
-include vendor/motorola/sm7325-common/BoardConfigVendor.mk
17 changes: 17 additions & 0 deletions audio/audio_effects.xml
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,23 @@
<effect name="ns" library="audio_pre_processing" uuid="1d97bb0b-9e2f-4403-9ae3-58c2554306f8"/>
<effect library="maxxaudio3" name="maxxaudio3" uuid="ae12da60-99ac-11df-b456-0002a5d5c51b"/>
</effects>
<postprocess>
<stream type="music">
<apply effect="music_helper"/>
</stream>
<stream type="ring">
<apply effect="ring_helper"/>
</stream>
<stream type="alarm">
<apply effect="ring_helper"/>
</stream>
<stream type="voice_call">
<apply effect="voice_helper"/>
</stream>
<stream type="notification">
<apply effect="notification_helper"/>
</stream>
</postprocess>
<preprocess>
<stream type="voice_communication">
<apply effect="aec"/>
Expand Down
8 changes: 4 additions & 4 deletions audio/audio_ext_spkr.conf
Original file line number Diff line number Diff line change
@@ -1,24 +1,24 @@
global_config {
name default-file-untested
name Berlin
}

ring {
#dB to attenuate playback to meet safety level at each volume step
#16 steps total, 15...0. In case of truncated list, last attenuation
#given will be applied to all lower volume steps
attenuation 36,36,35,35,33,33,33,27,27,21,21,13,13,3,3,3
attenuation -1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1
}

voice {
#dB to attenuate playback to meet safety level at each volume step
#16 steps total, 15...0. In case of truncated list, last attenuation
#given will be applied to all lower volume steps
attenuation 36,36,35,35,33,33,33,27,27,21,21,13,13,3,3,3
attenuation -1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1
}

media {
#dB to attenuate playback to meet safety level at each volume step
#16 steps total, 15...0. In case of truncated list, last attenuation
#given will be applied to all lower volume steps
attenuation 36,36,35,35,33,33,33,27,27,21,21,13,13,3,3,3
attenuation -1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1
}
Loading

0 comments on commit 95b667c

Please sign in to comment.