From 84a2b381b830ae303d51ca3fc8a9fd41b457895c Mon Sep 17 00:00:00 2001 From: Jakub Pawlowski Date: Tue, 5 Nov 2019 12:27:29 +0100 Subject: [PATCH] universal7580: bluetooth: Add ISO Test: run rootcanal, verify 1.1 HAL can be used Bug: 144413056 Change-Id: Ic5b33602e1e4ba8e6d16623b9f8c46f674fc476c --- hardware/bluetooth/bluetooth_hci.cc | 3 +++ hardware/bluetooth/vendor_interface.cc | 9 +++++---- hardware/bluetooth/vendor_interface.h | 4 ++-- 3 files changed, 10 insertions(+), 6 deletions(-) diff --git a/hardware/bluetooth/bluetooth_hci.cc b/hardware/bluetooth/bluetooth_hci.cc index e14e3d7..a2211f4 100644 --- a/hardware/bluetooth/bluetooth_hci.cc +++ b/hardware/bluetooth/bluetooth_hci.cc @@ -89,6 +89,9 @@ Return BluetoothHci::initialize( if (!hidl_status.isOk()) { ALOGE("VendorInterface -> Unable to call scoDataReceived()"); } + }, + [cb](const hidl_vec&) { + ALOGE("VendorInterface -> No callback for ISO packets in HAL V1_0"); }); if (!rc) { auto hidl_status = cb->initializationComplete(Status::INITIALIZATION_ERROR); diff --git a/hardware/bluetooth/vendor_interface.cc b/hardware/bluetooth/vendor_interface.cc index af89f81..6e97e77 100644 --- a/hardware/bluetooth/vendor_interface.cc +++ b/hardware/bluetooth/vendor_interface.cc @@ -162,14 +162,14 @@ class FirmwareStartupTimer { bool VendorInterface::Initialize( InitializeCompleteCallback initialize_complete_cb, PacketReadCallback event_cb, PacketReadCallback acl_cb, - PacketReadCallback sco_cb) { + PacketReadCallback sco_cb, PacketReadCallback iso_cb) { if (g_vendor_interface) { ALOGE("%s: No previous Shutdown()?", __func__); return false; } g_vendor_interface = new VendorInterface(); return g_vendor_interface->Open(initialize_complete_cb, event_cb, acl_cb, - sco_cb); + sco_cb, iso_cb); } void VendorInterface::Shutdown() { @@ -185,7 +185,8 @@ VendorInterface* VendorInterface::get() { return g_vendor_interface; } bool VendorInterface::Open(InitializeCompleteCallback initialize_complete_cb, PacketReadCallback event_cb, PacketReadCallback acl_cb, - PacketReadCallback sco_cb) { + PacketReadCallback sco_cb, + PacketReadCallback iso_cb) { initialize_complete_cb_ = initialize_complete_cb; // Initialize vendor interface @@ -248,7 +249,7 @@ bool VendorInterface::Open(InitializeCompleteCallback initialize_complete_cb, if (fd_count == 1) { hci::H4Protocol* h4_hci = - new hci::H4Protocol(fd_list[0], intercept_events, acl_cb, sco_cb); + new hci::H4Protocol(fd_list[0], intercept_events, acl_cb, sco_cb, iso_cb); fd_watcher_.WatchFdForNonBlockingReads( fd_list[0], [h4_hci](int fd) { h4_hci->OnDataReady(fd); }); hci_ = h4_hci; diff --git a/hardware/bluetooth/vendor_interface.h b/hardware/bluetooth/vendor_interface.h index a401ee6..e5b8d01 100644 --- a/hardware/bluetooth/vendor_interface.h +++ b/hardware/bluetooth/vendor_interface.h @@ -38,7 +38,7 @@ class VendorInterface { public: static bool Initialize(InitializeCompleteCallback initialize_complete_cb, PacketReadCallback event_cb, PacketReadCallback acl_cb, - PacketReadCallback sco_cb); + PacketReadCallback sco_cb, PacketReadCallback iso_cb); static void Shutdown(); static VendorInterface *get(); @@ -51,7 +51,7 @@ class VendorInterface { bool Open(InitializeCompleteCallback initialize_complete_cb, PacketReadCallback event_cb, PacketReadCallback acl_cb, - PacketReadCallback sco_cb); + PacketReadCallback sco_cb, PacketReadCallback iso_cb); void Close(); void OnTimeout(); -- 2.20.1