-
Notifications
You must be signed in to change notification settings - Fork 93
arpi 11 : framework patch
Peter Yoon edited this page May 17, 2021
·
14 revisions
Apply following change under platform_testing/
build/tasks/tests/native_test_list.mk
@@ line 111
puffin_unittest \
recovery_unit_test \
- resolv_gold_test \
resolv_integration_test \
resolv_unit_test \
Workaround for bt_hci timeout. Information from following links :
https://github.com/raspberrypi/linux/issues/2832
Apply following patch under system/bt/
hci/src/hci_layer.cc
@@ line 375
startup_future = NULL;
}
+#include <fcntl.h>
+#include <sys/ioctl.h>
+static void hw_reset(bool reset) {
+ unsigned buf[8] = { 8 * 4, 0, 0x38041, 8, 8, 128, 0, 0};
+ buf[6] = reset ? 0 : 1;
+ int fd = open("/dev/vcio", 0);
+ if (fd >= 0) {
+ ioctl(fd, _IOWR(100, 0, char *), buf);
+ close(fd);
+ }
+}
static void startup_timer_expired(UNUSED_ATTR void* context) {
LOG_ERROR(LOG_TAG, "%s", __func__);
LOG_EVENT_INT(BT_HCI_TIMEOUT_TAG_NUM, HCI_STARTUP_TIMED_OUT);
hci_close();
if (abort_timer.IsScheduled()) {
LOG_ERROR(LOG_TAG, "%s: waiting for abort_timer", __func__);
return;
}
+ hw_reset(true);
+ sleep(2);
+ hw_reset(false);
abort();
}
Patch from https://github.com/android-rpi/device_arpi_rpi4/issues/25#issuecomment-673996293
Apply following changes under hardware/interfaces/
bluetooth/1.0/default/vendor_interface.cc
@@ line 343 @@ void VendorInterface::OnFirmwareConfigured(
lib_interface_->op(BT_VND_OP_GET_LPM_IDLE_TIMEOUT, &lpm_timeout_ms);
ALOGI("%s: lpm_timeout_ms %d", __func__, lpm_timeout_ms);https://github.com/android-rpi/device_arpi_rpi4/wiki/arpi-11-%3A-framework-patch/
- bt_vendor_lpm_mode_t mode = BT_VND_LPM_ENABLE;
+ bt_vendor_lpm_mode_t mode = BT_VND_LPM_DISABLE;
lib_interface_->op(BT_VND_OP_LPM_SET_MODE, &mode);
Apply following changes under hardware/interfaces/
audio/common/all-versions/default/service/Android.bp
@@ line 9
// having two binaries installable to the same location even if they are
// not installed in the same build.
- compile_multilib: "32",
srcs: ["service.cpp"],
camera/provider/2.5/default/Android.bp
@@ line 155
relative_install_path: "hw",
srcs: ["external-service.cpp"],
- compile_multilib: "32",
init_rc: ["[email protected]"],
shared_libs: [