Commit Graph

455 Commits

Author SHA1 Message Date
bengris32
4c6dc4806a rosemary: Introduce Mediatek In-Call Service
* My attempt at fixing in call gain control on MediaTek devices.

* It attempts to replicate what the stock MediaTek framework does
  when controlling the volume of the earpiece speaker, since MTK's
  audio HAL is not able to set the gain of the speaker from the
  values sent by AOSP framework.

[LinkBoi00] Rebrand to Mediatek In-Call Service

Change-Id: I43f727f6fb73a0d38457a41a8361653d1d00e220
Signed-off-by: LinkBoi00 <linkdevel@protonmail.com>
2023-04-15 14:36:56 +02:00
Kevin F. Haggerty
e20160a997 rosemary: sepolicy: Allow system_app to read /proc/pagetypeinfo
avc: denied { read } for name="pagetypeinfo" dev="proc" ino=4026543033
scontext=u:r:system_app:s0 tcontext=u:object_r:proc_pagetypeinfo:s0
tclass=file permissive=0

Change-Id: I16465eb9acca9ff64a755d47f86f4ff424ebe4de
2023-04-15 14:36:56 +02:00
Kevin F. Haggerty
cce24cd712 rosemary: sepolicy: Allow system_app to access zram sysfs nodes
avc: denied { search } for name="zram0" dev="sysfs" ino=20744
scontext=u:r:system_app:s0 tcontext=u:object_r:sysfs_zram:s0 tclass=dir
permissive=0

avc: denied { open } for name="mem_used_total" dev="sysfs" ino=20804
scontext=u:r:system_app:s0 tcontext=u:object_r:sysfs_zram:s0 tclass=file
permissive=0

avc: denied { read } for name="mem_used_total" dev="sysfs" ino=20804
scontext=u:r:system_app:s0 tcontext=u:object_r:sysfs_zram:s0 tclass=file
permissive=0

Change-Id: Ide9b1a9488b26fa69e7a2c8e73a8e657c8b28beb
2023-04-15 14:36:56 +02:00
Matsvei Niaverau
a41a41530c rosemary: rootdir: Set fstab as a swapfile
Change-Id: I59e08b005fb396dd5473e1cd113f6b10eac40c3c
2023-04-15 14:36:56 +02:00
Kshitij Gupta
25e13e931a rosemary: rootdir: Correct mode for video0 and video1
- init services fail to setup encoders on boot and camera and
  screenrecord fails to open video1 when trying to encode a video.
- While we may wanna consider looking through services that make use of
  these devs and correct their groups for AOSP, this gets the job done
  for now.

Change-Id: I0278efe201a9cbaa20c650fdc32bed6f9ecfd017
2023-04-15 14:36:56 +02:00
Alexander Koskovich
f1976cb3e3 rosemary: Move BT profiles props to vendor
* Makes it GSI compatible

Change-Id: I8f7caf241d508af59c16482e6185c42f23f8a460
2023-04-15 14:36:56 +02:00
SamarV-121
ec1ca2871b rosemary: lights: Uprev light aidl to v2
Change-Id: Id16a35cd1b38d9e39533cfd9a5b0bb74b51cb73a
2023-04-15 14:36:56 +02:00
bengris32
a355902279 rosemary: Drop TARGET_POWERHAL_AIDL_VERSION flag
Signed-off-by: bengris32 <bengris32@protonmail.ch>
Change-Id: I6d53f4871cb572cf1656b47944d3f2f735ef94ec
2023-04-15 14:36:56 +02:00
bengris32
a63400f8d8 rosemary: props: Silence gralloc4 logspam
* Since Android 13, gralloc has been spamming the logs with:
E gralloc4: Empty SMPTE 2094-40 data

Signed-off-by: bengris32 <bengris32@protonmail.ch>
Change-Id: Ib4d44443499f1396453bd7070aa1935485b329db
2023-04-15 14:36:56 +02:00
TheMalachite
0344668610 rosemary: Add persist.log.tag properties overrides
Change-Id: Ibd6a89cbc0fa17b36fff1a0759afb64705687d13
2023-04-15 14:36:56 +02:00
bengris32
0e9c276b8a rosemary: Set BOARD_HAS_MTK_HARDWARE to true
Signed-off-by: bengris32 <bengris32@protonmail.ch>
Change-Id: I568d110431ad2c009fd1f9515f154701baf09a6e
2023-04-15 14:36:56 +02:00
bengris32
91c23d1cb7 rosemary: Link audio modules against prebuilt libalsautils.so
* Fixes USB DAC.

Signed-off-by: bengris32 <bengris32@protonmail.ch>
Change-Id: I63b4ce60e89ffe04c0e7dd558e21f9258f7112c9
2023-04-15 14:36:56 +02:00
Vaisakh Murali
d961ca9019 rosemary: Drop MTK audiopreprocessing
OSS counterpart works well, instead of using prebuilt blobs, use oss
where possible. This has no adverse effect on the audio quality.
Switch to OSS libaudiopreprocessing.

Signed-off-by: Vaisakh Murali <mvaisakh@statixos.com>
Change-Id: Ia9163b6363c79dbdab86d7088946a1fc8b200596
2023-04-15 14:36:56 +02:00
Zinadin Zidan
8b544333c5 rosemary: Drop Mi audio sounds
* Its broken in oss audio hals.

Signed-off-by: Zinadin Zidan <zidan44@pixelexperience.org>
Change-Id: I9b0f5351d306dd9fcb9e82c6bbf829832edfc1b0
2023-04-15 14:36:56 +02:00
bengris32
399d3d8fa8 rosemary: Enable multilib for prebuilt libutils-v32
* This ensures both the 32bit and 64bit prebuilt are installed
  by default.

Signed-off-by: bengris32 <bengris32@protonmail.ch>
2023-04-15 14:36:56 +02:00
bengris32
15d2478a58 rosemary: Uprev Clearkey DRM HAL to 1.4
Signed-off-by: bengris32 <bengris32@protonmail.ch>
2023-04-15 14:36:56 +02:00
bengris32
e076f5fcfe rosemary: Update kpoc_charger shim for T
[1] 79dc06a39f
[2] 6d043c5c5c

Signed-off-by: bengris32 <bengris32@protonmail.ch>
2023-04-15 14:36:56 +02:00
bengris32
ecc0530118 rosemary: Add developer GSI keys to fstab
Signed-off-by: bengris32 <bengris32@protonmail.ch>
Change-Id: I0473a681e2a207c21832edd86d40c6f792b05c90
2023-04-15 14:36:56 +02:00
Bowgo Tsai
679f38642e rosemary: Adding developer GSI keys
Bug: 144399552
Test: tree-hugger

Change-Id: I0cf78bfc80c24bb217bb88831faa5a29ba04d194
2023-04-15 14:36:56 +02:00
bengris32
b081c2ffa3 rosemary: Remove GSI keys from the fstab
Signed-off-by: bengris32 <bengris32@protonmail.ch>
Change-Id: I31b67403fd1ce9d554520b55e500c2f0c9ee29d1
2023-04-15 14:36:56 +02:00
Bowgo Tsai
47f4b34ecd rosemary: Removing GSI keys
Those keys will be embedded into VtsSecurityAvb on host side
instead, to verify the GSI image used on the device.

Bug: 149806769
Test: build and checks those keys are removed from
      /recovery/root/first_stage_ramdisk/avb/
Change-Id: I8a002ba6f1421fb460056ccae6572050bdb0ce3c
2023-04-15 14:36:56 +02:00
nift4
e2ded60ef6 rosemary: shims: Port to T 2023-04-15 14:36:56 +02:00
Edwin Wong
bb3f92e055 rosemary: Build clearkey HIDL service 2023-04-15 14:36:56 +02:00
SamarV-121
e1945ebb8d rosemary: wifi: Adapt to T 2023-04-15 14:36:56 +02:00
bengris32
e39645ab2c rosemary: Use HIDL compat libraries from hardware/lineage/compat
Signed-off-by: bengris32 <bengris32@protonmail.ch>
2023-04-15 14:36:56 +02:00
Lucchetto
2a52c65520 rosemary: Use libhidlbase from vndk v32 for goodix interface
* _ZN7android8hardware7details17gBnConstructorMapE and _ZN7android8hardware7details17gBsConstructorMapE have been removed on Android 13

Signed-off-by: Lucchetto <lucchetto.tie@live.com>
2022-12-07 00:10:21 +01:00
hpnightowl
bff355f8ea rosemary: Drop audio.a2dp.default
* Building from here:
   https://github.com/LineageOS/android_build/blob/lineage-18.1/target/product/full_base.mk#L35

Change-Id: Ib71c1abd381468ec3621d60e5ca959f738f51168
2022-12-07 00:10:21 +01:00
Josh Wu
2162c82bb5 rosemary: Switch BtAudio to AIDL
Test: m
Bug: 203490261
Change-Id: I4b8ac40d5ad410b89eb6a0573d740d86471ecfc7
Merged-In: I4b8ac40d5ad410b89eb6a0573d740d86471ecfc7

Change-Id: I3c3e1bfad896d1c401bcb158c6921c0bae8c58f1
2022-12-07 00:10:21 +01:00
Alice Kuo
95a661f74f rosemary: Disable LE audio related profiles
Bug: 231671426
Test: build
Change-Id: I78e2ddfc636a0fa31b977b5f9ba9a7d7bc0f2a26
Merged-In: I78e2ddfc636a0fa31b977b5f9ba9a7d7bc0f2a26
(cherry picked from commit acb0b19b8348a4b9518d2f46b1599f423f620347)
2022-12-07 00:10:21 +01:00
Sal Savage
e804ae8bc5 rosemary: Update LE Audio profile properties to match spec and implementation
Bug: 217448211
Test: atest BluetoothInstrumentationTests
Change-Id: I9312b9b70b51603aca6da6f4081533ab73c1614d
2022-12-07 00:10:21 +01:00
Sal Savage
01715a3737 rosemary: Enable bluetooth profiles with system_ext.prop
Bug: 217448211
Test: make -j

Change-Id: Idd7e52b7822915ed61299f1c0b29bf87ca0339fe
2022-12-07 00:10:21 +01:00
Sal Savage
a780ea6632 rosemary: Set default the Bluetooth class of device
The class of device is a string with a list of uint8t values:
90,2,12

The meaning is as follows:
{Service Field, Major class, Minor class}

Service Field: 0x5A -> 90
    Bit 17: Networking
    Bit 19: Capturing
    Bit 20: Object Transfer
    Bit 22: Telephony
MAJOR_CLASS: 0x02 -> 2 (Phone)
MINOR_CLASS: 0x0C -> 12 (Smart Phone)

Bug: 217452259
Test: make -j; -- check that bluetooth.device.class_of_device is correct

Change-Id: I24fd57bacbf6786a26f7079e7a6e9857dbe170d1
2022-12-07 00:10:21 +01:00
Jasmine Cha
ef2d27ce74 rosemary: audio: Use binder threadpool
Support to communicate with other service with AIDL interface.

Bug: 215463744
Test: build pass

Signed-off-by: Jasmine Cha <chajasmine@google.com>
Change-Id: I13da2121623779b0ba21d29cf39c11abc7b96dd9
2022-12-07 00:10:21 +01:00
bengris32
44e503d33d rosemary: Kang brightness overlays from begonia
Signed-off-by: bengris32 <bengris32@protonmail.ch>
2022-12-07 00:10:21 +01:00
bengris32
c2e4f45c46 rosemary: Bump clang toolchain version to r450784d
* We now have the required patches in kernel to compile with
  clang r450784d and LLVM binutils.

Signed-off-by: bengris32 <bengris32@protonmail.ch>
2022-12-07 00:10:21 +01:00
LuK1337
78b349ae59 rosemary: Disallow aux cam usage for Telegram / Telegram X
These seem to misbehave when they reach certain camera IDs.

Change-Id: Ib07269215d76a09bf5b305bfb6ae9b84f5c5a7d3
2022-12-07 00:10:21 +01:00
SamarV-121
5b3de57cbc rosemary: Use libutils-v32 for libmtkcam_stdutils.so
* Abort message: 'incStrongRequireStrong() called on 0xb400007c5afa7250 which isn't already owned'

Signed-off-by: SamarV-121 <samarvispute121@pm.me>
Change-Id: Ie04bf80f00d96ab9f9ecd292322925a39bf59c6a
2022-12-07 00:10:21 +01:00
Jiyong Park
076f7631d2 rosemary: Remove ndk_platform backend. Use the ndk backend.
The ndk_platform backend will soon be deprecated because the ndk backend
can serve the same purpose. This is to eliminate the confusion about
having two variants (ndk and ndk_platform) for the same ndk backend.

Bug: 161456198
Test: m
Merged-In: I14a1c57bd06f1f2aa52491f779c7030d4de03547
Change-Id: I7b9055909b901843631314b9577a9e578a739d00
2022-12-07 00:10:21 +01:00
SamarV-121
e51d75aec5 rosemary: Link PQ and dfps HAL against VNDK 32 libutils
* Abort message: 'incStrongRequireStrong() called on 0xb400007c5afa7250 which isn't already owned'

[bengris32] Patch both 32bit and 64bit variants

Change-Id: Ifae97360042bad420ef454a56b490af2202ac79a
2022-12-07 00:10:21 +01:00
bengris32
d2fdc245cd rosemary: Convert overlays into Runtime Resource Overlays
Signed-off-by: bengris32 <bengris32@protonmail.ch>
Change-Id: I9105bbd5b4cb183b9eed02d15d4ca3134fbcb6d2
2022-12-07 00:10:21 +01:00
Dan Pasanen
2936b30620 rosemary: Exclude lineage-sdk overlays from RRO
* lineage-sdk overlays don't work with RRO

Change-Id: Iff826faf1864388066a488acc9682636b98d1098
2022-12-07 00:10:21 +01:00
bengris32
37e2411ed5 rosemary: sepolicy: Label persist camera data directory
Signed-off-by: bengris32 <bengris32@protonmail.ch>
2022-12-07 00:10:21 +01:00
bengris32
15c9c37a1d rosemary: sepolicy: Label FPC fingerprint sysfs nodes
Signed-off-by: bengris32 <bengris32@protonmail.ch>
2022-12-07 00:10:21 +01:00
bengris32
d8361dd065 rosemary: sepolicy: Label more fingerprint props
Signed-off-by: bengris32 <bengris32@protonmail.ch>
2022-12-07 00:10:21 +01:00
bengris32
be7e4343af rosemary: Remove displayfeature entry from the FCM
Signed-off-by: bengris32 <bengris32@protonmail.ch>
Change-Id: I7a77b1ab430c1d41057a8a19f66cbd05572204b8
2022-12-07 00:10:21 +01:00
bengris32
19db7f0d55 rosemary: sepolicy: Allow mi_thermald to access battery supply
Signed-off-by: bengris32 <bengris32@protonmail.ch>
2022-12-07 00:10:21 +01:00
bengris32
ef47eaf9b7 rosemary: sepolicy: Label some more camera props
Signed-off-by: bengris32 <bengris32@protonmail.ch>
2022-12-07 00:10:21 +01:00
bengris32
68c439b1f4 rosemary: sepolicy: Allow fingerprint HAL to read battery stats
avc: denied { search } for name="battery" dev="sysfs" ino=8944 scontext=u:r:hal_fingerprint_default:s0 tcontext=u:object_r:sysfs_batteryinfo:s0 tclass=dir permissive=0
E fpc_tac : Unable to open '/sys/bus/platform/devices/battery/modalias'
avc: denied { search } for name="mt-pmic" dev="sysfs" ino=16882 scontext=u:r:hal_fingerprint_default:s0 tcontext=u:object_r:sysfs_pmu:s0 tclass=dir permissive=0
E fpc_tac : Unable to open '/sys/bus/platform/devices/mt-pmic/modalias'

Signed-off-by: bengris32 <bengris32@protonmail.ch>
2022-12-07 00:10:21 +01:00
bengris32
2c1d2a27cc rosemary: Allow Fingerprint HAL to write to relavent sysfs node
Signed-off-by: bengris32 <bengris32@protonmail.ch>
2022-12-07 00:10:21 +01:00
Matsvei Niaverau
7daa6b4197 rosemary: sepolicy: Label some audio properties
Change-Id: I7c7833685434ed463304ac8b37a566c531360468
2022-12-07 00:10:21 +01:00