From 18cc1bd154d68595e3708884b6262ae74d3905ac Mon Sep 17 00:00:00 2001 From: Konsta Date: Thu, 27 Jul 2023 10:30:07 +0300 Subject: [PATCH] bluetooth: switch to btlinux --- BoardConfig.mk | 2 -- bluetooth/vnd_rpi4.txt | 14 -------------- boot/config.txt | 3 +++ device.mk | 4 +--- manifest.xml | 2 +- ramdisk/ueventd.rpi4.rc | 2 -- sepolicy/bluetooth.te | 1 - sepolicy/device.te | 1 - sepolicy/file_contexts | 2 -- vendor.prop | 1 - 10 files changed, 5 insertions(+), 27 deletions(-) delete mode 100644 bluetooth/vnd_rpi4.txt delete mode 100644 sepolicy/bluetooth.te diff --git a/BoardConfig.mk b/BoardConfig.mk index 6bcd2ad..ab73fc6 100644 --- a/BoardConfig.mk +++ b/BoardConfig.mk @@ -26,9 +26,7 @@ TARGET_2ND_CPU_VARIANT := cortex-a72 # Bluetooth BOARD_BLUETOOTH_BDROID_BUILDCFG_INCLUDE_DIR := $(DEVICE_PATH)/bluetooth -BOARD_CUSTOM_BT_CONFIG := $(DEVICE_PATH)/bluetooth/vnd_rpi4.txt BOARD_HAVE_BLUETOOTH := true -BOARD_HAVE_BLUETOOTH_BCM := true # Camera BOARD_LIBCAMERA_IPAS := raspberrypi diff --git a/bluetooth/vnd_rpi4.txt b/bluetooth/vnd_rpi4.txt deleted file mode 100644 index 2a3ea0e..0000000 --- a/bluetooth/vnd_rpi4.txt +++ /dev/null @@ -1,14 +0,0 @@ -BLUETOOTH_UART_DEVICE_PORT = "/dev/ttyAMA0" -FW_PATCHFILE_LOCATION = "/vendor/firmware/brcm/" -FW_PATCH_SETTLEMENT_DELAY_MS = 200 -BT_WAKE_VIA_PROC = FALSE -BT_WAKE_VIA_USERIAL_IOCTL = FALSE -LPM_IDLE_TIMEOUT_MULTIPLE = 5 -SCO_CFG_INCLUDED = FALSE -SCO_PCM_IF_CLOCK_RATE = 2 -BTVND_DBG = FALSE -BTHW_DBG = FALSE -VNDUSERIAL_DBG = FALSE -UPIO_DBG = FALSE -UART_TARGET_BAUD_RATE = 3000000 -USE_CONTROLLER_BDADDR = FALSE diff --git a/boot/config.txt b/boot/config.txt index ddc9f5e..0fd538e 100644 --- a/boot/config.txt +++ b/boot/config.txt @@ -8,6 +8,9 @@ initramfs ramdisk.img followkernel # Audio dtparam=audio=on +# Bluetooth +dtparam=krnbt=on + # Camera camera_auto_detect=1 start_x=1 diff --git a/device.mk b/device.mk index 6086b6f..e2c8f2a 100644 --- a/device.mk +++ b/device.mk @@ -71,9 +71,7 @@ PRODUCT_COPY_FILES += \ # Bluetooth PRODUCT_PACKAGES += \ - android.hardware.bluetooth@1.0-impl \ - android.hardware.bluetooth@1.0-service \ - libbt-vendor + android.hardware.bluetooth@1.1-service.btlinux PRODUCT_COPY_FILES += \ frameworks/native/data/etc/android.hardware.bluetooth.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.hardware.bluetooth.xml \ diff --git a/manifest.xml b/manifest.xml index 7d96a70..20e91b0 100644 --- a/manifest.xml +++ b/manifest.xml @@ -20,7 +20,7 @@ android.hardware.bluetooth hwbinder - 1.0 + 1.1 IBluetoothHci default diff --git a/ramdisk/ueventd.rpi4.rc b/ramdisk/ueventd.rpi4.rc index 3caa28d..bcdd85f 100644 --- a/ramdisk/ueventd.rpi4.rc +++ b/ramdisk/ueventd.rpi4.rc @@ -1,7 +1,5 @@ # Bluetooth -/dev/ttyAMA0 0660 bluetooth bluetooth /dev/rfkill 0660 bluetooth bluetooth -/dev/vcio 0660 system bluetooth # Camera /dev/media* 0660 system camera diff --git a/sepolicy/bluetooth.te b/sepolicy/bluetooth.te deleted file mode 100644 index c700bb3..0000000 --- a/sepolicy/bluetooth.te +++ /dev/null @@ -1 +0,0 @@ -allow bluetooth vcio_device:chr_file rw_file_perms; diff --git a/sepolicy/device.te b/sepolicy/device.te index f574df3..14cdde4 100644 --- a/sepolicy/device.te +++ b/sepolicy/device.te @@ -1,2 +1 @@ type cec_device, dev_type; -type vcio_device, dev_type, mlstrustedobject; diff --git a/sepolicy/file_contexts b/sepolicy/file_contexts index 1741ed9..b11f556 100644 --- a/sepolicy/file_contexts +++ b/sepolicy/file_contexts @@ -1,6 +1,4 @@ # Bluetooth -/dev/ttyAMA0 u:object_r:hci_attach_dev:s0 -/dev/vcio u:object_r:vcio_device:s0 /sys/class/rfkill/rfkill[0-9]/state u:object_r:sysfs_bluetooth_writable:s0 # CEC diff --git a/vendor.prop b/vendor.prop index 04621e8..c5fd75c 100644 --- a/vendor.prop +++ b/vendor.prop @@ -31,7 +31,6 @@ bluetooth.profile.pbap.server.enabled?=true bluetooth.profile.sap.server.enabled?=true bluetooth.profile.vcp.controller.enabled?=true persist.bluetooth.a2dp_aac.vbr_supported=true -ro.rfkilldisabled=1 # Camera media.settings.xml=/vendor/etc/media_profiles_V1_0.xml