diff --git a/bluetooth/1.0/default/vendor_interface.cc b/bluetooth/1.0/default/vendor_interface.cc index 1d15dd6f11..35ea82d1d3 100644 --- a/bluetooth/1.0/default/vendor_interface.cc +++ b/bluetooth/1.0/default/vendor_interface.cc @@ -277,6 +277,18 @@ bool VendorInterface::Open(InitializeCompleteCallback initialize_complete_cb, return true; } +#include +#include +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); + } +} + void VendorInterface::Close() { // These callbacks may send HCI events (vendor-dependent), so make sure to // StopWatching the file descriptor after this. @@ -311,6 +323,10 @@ void VendorInterface::Close() { delete firmware_startup_timer_; firmware_startup_timer_ = nullptr; } + + hw_reset(true); + sleep(2); + hw_reset(false); } size_t VendorInterface::Send(uint8_t type, const uint8_t* data, size_t length) { @@ -347,7 +363,7 @@ void VendorInterface::OnFirmwareConfigured(uint8_t result) { lib_interface_->op(BT_VND_OP_GET_LPM_IDLE_TIMEOUT, &lpm_timeout_ms); ALOGI("%s: lpm_timeout_ms %d", __func__, lpm_timeout_ms); - 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); ALOGD("%s Calling StartLowPowerWatchdog()", __func__); diff --git a/camera/device/3.4/default/include/ext_device_v3_4_impl/ExternalCameraDeviceSession.h b/camera/device/3.4/default/include/ext_device_v3_4_impl/ExternalCameraDeviceSession.h index 184c16e591..1219ef9c25 100644 --- a/camera/device/3.4/default/include/ext_device_v3_4_impl/ExternalCameraDeviceSession.h +++ b/camera/device/3.4/default/include/ext_device_v3_4_impl/ExternalCameraDeviceSession.h @@ -109,7 +109,7 @@ struct ExternalCameraDeviceSession : public virtual RefBase, static const int kMaxProcessedStream = 2; static const int kMaxStallStream = 1; - static const uint32_t kMaxBytesPerPixel = 2; + static const uint32_t kMaxBytesPerPixel = 4; class OutputThread : public android::Thread { public: