Snap for 9284182 from d5ab577902
to udc-release
Change-Id: I01367cf97f540fc4e1fcec7d6a66c67eb147a603
This commit is contained in:
commit
309ee2758c
3 changed files with 18 additions and 10 deletions
|
@ -133,7 +133,7 @@
|
||||||
<hal format="hidl">
|
<hal format="hidl">
|
||||||
<name>vendor.google.whitechapel.audio.audioext</name>
|
<name>vendor.google.whitechapel.audio.audioext</name>
|
||||||
<transport>hwbinder</transport>
|
<transport>hwbinder</transport>
|
||||||
<version>3.0</version>
|
<version>4.0</version>
|
||||||
<interface>
|
<interface>
|
||||||
<name>IAudioExt</name>
|
<name>IAudioExt</name>
|
||||||
<instance>default</instance>
|
<instance>default</instance>
|
||||||
|
|
|
@ -422,7 +422,7 @@ ndk::ScopedAStatus Vibrator::off() {
|
||||||
|
|
||||||
mHwApi->clearTrigBtn(mInputFd, &mFfEffects[mActiveId], mActiveId);
|
mHwApi->clearTrigBtn(mInputFd, &mFfEffects[mActiveId], mActiveId);
|
||||||
} else {
|
} else {
|
||||||
ALOGV("Vibrator is already off");
|
ALOGV("Off: Vibrator is already off");
|
||||||
}
|
}
|
||||||
|
|
||||||
mActiveId = -1;
|
mActiveId = -1;
|
||||||
|
@ -1370,10 +1370,12 @@ void Vibrator::waitForComplete(std::shared_ptr<IVibratorCallback> &&callback) {
|
||||||
(!mHwApi->eraseOwtEffect(mInputFd, mActiveId, &mFfEffects))) {
|
(!mHwApi->eraseOwtEffect(mInputFd, mActiveId, &mFfEffects))) {
|
||||||
ALOGE("Failed to clean up the composed effect %d", mActiveId);
|
ALOGE("Failed to clean up the composed effect %d", mActiveId);
|
||||||
}
|
}
|
||||||
|
if (mActiveId >= 0) {
|
||||||
mHwApi->clearTrigBtn(mInputFd, &mFfEffects[mActiveId], mActiveId);
|
mHwApi->clearTrigBtn(mInputFd, &mFfEffects[mActiveId], mActiveId);
|
||||||
|
mActiveId = -1;
|
||||||
mActiveId = -1;
|
} else {
|
||||||
|
ALOGV("waitForComplete: Vibrator is already off");
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (callback) {
|
if (callback) {
|
||||||
|
|
|
@ -89,7 +89,7 @@ ndk::ScopedAStatus VibratorManager::prepareSynced(const std::vector<int32_t> &id
|
||||||
ATRACE_NAME("VibratorManager::prepareSynced");
|
ATRACE_NAME("VibratorManager::prepareSynced");
|
||||||
|
|
||||||
if (!mGPIOStatus) {
|
if (!mGPIOStatus) {
|
||||||
ALOGE("GetVibrator: GPIO status error");
|
ALOGE("prepareSynced: GPIO status error");
|
||||||
return ndk::ScopedAStatus::fromExceptionCode(EX_ILLEGAL_STATE);
|
return ndk::ScopedAStatus::fromExceptionCode(EX_ILLEGAL_STATE);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -111,10 +111,14 @@ ndk::ScopedAStatus VibratorManager::prepareSynced(const std::vector<int32_t> &id
|
||||||
auto &[vib, ext] = mVibrators.at(id);
|
auto &[vib, ext] = mVibrators.at(id);
|
||||||
auto callback = sp<VibratorSyncCallback>::make();
|
auto callback = sp<VibratorSyncCallback>::make();
|
||||||
|
|
||||||
ext->prepareSynced(callback);
|
if (ext->prepareSynced(callback).isOk()) {
|
||||||
|
mSyncContext.emplace_back(id, callback->getFuture());
|
||||||
mSyncContext.emplace_back(id, callback->getFuture());
|
} else {
|
||||||
|
ALOGV("prepareSynced: Fail");
|
||||||
|
return ndk::ScopedAStatus::fromExceptionCode(EX_ILLEGAL_STATE);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
ALOGV("prepareSynced: Done");
|
||||||
if (mHwApi->initGPIO()) {
|
if (mHwApi->initGPIO()) {
|
||||||
return ndk::ScopedAStatus::ok();
|
return ndk::ScopedAStatus::ok();
|
||||||
} else {
|
} else {
|
||||||
|
@ -126,6 +130,7 @@ ndk::ScopedAStatus VibratorManager::prepareSynced(const std::vector<int32_t> &id
|
||||||
ndk::ScopedAStatus VibratorManager::triggerSynced(
|
ndk::ScopedAStatus VibratorManager::triggerSynced(
|
||||||
const std::shared_ptr<IVibratorCallback> &callback) {
|
const std::shared_ptr<IVibratorCallback> &callback) {
|
||||||
ATRACE_NAME("VibratorManager::triggerSynced");
|
ATRACE_NAME("VibratorManager::triggerSynced");
|
||||||
|
ALOGV("TriggerSynced");
|
||||||
if (isBusy()) {
|
if (isBusy()) {
|
||||||
ALOGE("TriggerSynced isBusy");
|
ALOGE("TriggerSynced isBusy");
|
||||||
return ndk::ScopedAStatus::fromExceptionCode(EX_ILLEGAL_STATE);
|
return ndk::ScopedAStatus::fromExceptionCode(EX_ILLEGAL_STATE);
|
||||||
|
@ -159,6 +164,7 @@ ndk::ScopedAStatus VibratorManager::triggerSynced(
|
||||||
ndk::ScopedAStatus VibratorManager::cancelSynced() {
|
ndk::ScopedAStatus VibratorManager::cancelSynced() {
|
||||||
ATRACE_NAME("VibratorManager::cancelSynced");
|
ATRACE_NAME("VibratorManager::cancelSynced");
|
||||||
|
|
||||||
|
ALOGV("Do cancelSynced");
|
||||||
mHwApi->setTrigger(false);
|
mHwApi->setTrigger(false);
|
||||||
{
|
{
|
||||||
std::shared_lock lock(mContextMutex);
|
std::shared_lock lock(mContextMutex);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue