summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndroid Build Coastguard Worker <android-build-coastguard-worker@google.com>2021-08-18 15:40:59 +0000
committerAndroid Build Coastguard Worker <android-build-coastguard-worker@google.com>2021-08-18 15:53:08 +0000
commite385814767f95d11338e67e9596a8974ab1f1733 (patch)
treea1d1bf79048b4e0b006c11531db5f9dcc45ab994
parent1ce0b24ad1d77ecb6c22d47761704dc8646c5e62 (diff)
parente72ff02ba1c862968619ed0dead2fbd8b41dec09 (diff)
downloadav-android-mainline-12.0.0_r36.tar.gz
Make change and version bump to s_aml_310733000 for mainline module file: apex/manifest_codec.jsonandroid-mainline-12.0.0_r4android-mainline-12.0.0_r36android12--mainline-release
Change-Id: Ie861659cc0bf706764072654cd3acbe47ee6ff9b
-rw-r--r--apex/manifest.json2
-rw-r--r--apex/manifest_codec.json2
-rw-r--r--media/libaudiohal/impl/DeviceHalHidl.cpp12
-rw-r--r--media/libaudiohal/impl/EffectHalHidl.cpp12
-rw-r--r--media/libaudiohal/impl/EffectsFactoryHalHidl.cpp12
-rw-r--r--media/libaudiohal/impl/StreamHalHidl.cpp12
6 files changed, 50 insertions, 2 deletions
diff --git a/apex/manifest.json b/apex/manifest.json
index f8c2c9bd8f..63d181be6a 100644
--- a/apex/manifest.json
+++ b/apex/manifest.json
@@ -1,6 +1,6 @@
{
"name": "com.android.media",
- "version": 310732000,
+ "version": 310733000,
"requireNativeLibs": [
"libandroid.so",
"libbinder_ndk.so",
diff --git a/apex/manifest_codec.json b/apex/manifest_codec.json
index 658a8a8a6c..946d6b8f65 100644
--- a/apex/manifest_codec.json
+++ b/apex/manifest_codec.json
@@ -1,6 +1,6 @@
{
"name": "com.android.media.swcodec",
- "version": 310732000,
+ "version": 310733000,
"requireNativeLibs": [
":sphal"
]
diff --git a/media/libaudiohal/impl/DeviceHalHidl.cpp b/media/libaudiohal/impl/DeviceHalHidl.cpp
index ca4f663c25..02d66ae866 100644
--- a/media/libaudiohal/impl/DeviceHalHidl.cpp
+++ b/media/libaudiohal/impl/DeviceHalHidl.cpp
@@ -463,6 +463,18 @@ status_t DeviceHalHidl::dump(int fd) {
hidlHandle->data[0] = fd;
Return<void> ret = mDevice->debug(hidlHandle, {} /* options */);
native_handle_delete(hidlHandle);
+
+ // TODO(b/111997867, b/177271958) Workaround - remove when fixed.
+ // A Binder transmitted fd may not close immediately due to a race condition b/111997867
+ // when the remote binder thread removes the last refcount to the fd blocks in the
+ // kernel for binder activity. We send a Binder ping() command to unblock the thread
+ // and complete the fd close / release.
+ //
+ // See DeviceHalHidl::dump(), EffectHalHidl::dump(), StreamHalHidl::dump(),
+ // EffectsFactoryHalHidl::dumpEffects().
+
+ (void)mDevice->ping(); // synchronous Binder call
+
return processReturn("dump", ret);
}
diff --git a/media/libaudiohal/impl/EffectHalHidl.cpp b/media/libaudiohal/impl/EffectHalHidl.cpp
index c589a48657..51ad1462a5 100644
--- a/media/libaudiohal/impl/EffectHalHidl.cpp
+++ b/media/libaudiohal/impl/EffectHalHidl.cpp
@@ -239,6 +239,18 @@ status_t EffectHalHidl::dump(int fd) {
hidlHandle->data[0] = fd;
Return<void> ret = mEffect->debug(hidlHandle, {} /* options */);
native_handle_delete(hidlHandle);
+
+ // TODO(b/111997867, b/177271958) Workaround - remove when fixed.
+ // A Binder transmitted fd may not close immediately due to a race condition b/111997867
+ // when the remote binder thread removes the last refcount to the fd blocks in the
+ // kernel for binder activity. We send a Binder ping() command to unblock the thread
+ // and complete the fd close / release.
+ //
+ // See DeviceHalHidl::dump(), EffectHalHidl::dump(), StreamHalHidl::dump(),
+ // EffectsFactoryHalHidl::dumpEffects().
+
+ (void)mEffect->ping(); // synchronous Binder call
+
return ret.isOk() ? OK : FAILED_TRANSACTION;
}
diff --git a/media/libaudiohal/impl/EffectsFactoryHalHidl.cpp b/media/libaudiohal/impl/EffectsFactoryHalHidl.cpp
index 9c4363c966..f042b92053 100644
--- a/media/libaudiohal/impl/EffectsFactoryHalHidl.cpp
+++ b/media/libaudiohal/impl/EffectsFactoryHalHidl.cpp
@@ -149,6 +149,18 @@ status_t EffectsFactoryHalHidl::dumpEffects(int fd) {
hidlHandle->data[0] = fd;
Return<void> ret = mEffectsFactory->debug(hidlHandle, {} /* options */);
native_handle_delete(hidlHandle);
+
+ // TODO(b/111997867, b/177271958) Workaround - remove when fixed.
+ // A Binder transmitted fd may not close immediately due to a race condition b/111997867
+ // when the remote binder thread removes the last refcount to the fd blocks in the
+ // kernel for binder activity. We send a Binder ping() command to unblock the thread
+ // and complete the fd close / release.
+ //
+ // See DeviceHalHidl::dump(), EffectHalHidl::dump(), StreamHalHidl::dump(),
+ // EffectsFactoryHalHidl::dumpEffects().
+
+ (void)mEffectsFactory->ping(); // synchronous Binder call
+
return processReturn(__FUNCTION__, ret);
}
diff --git a/media/libaudiohal/impl/StreamHalHidl.cpp b/media/libaudiohal/impl/StreamHalHidl.cpp
index 539a1496a7..129b1c1fb1 100644
--- a/media/libaudiohal/impl/StreamHalHidl.cpp
+++ b/media/libaudiohal/impl/StreamHalHidl.cpp
@@ -158,6 +158,18 @@ status_t StreamHalHidl::dump(int fd) {
hidlHandle->data[0] = fd;
Return<void> ret = mStream->debug(hidlHandle, {} /* options */);
native_handle_delete(hidlHandle);
+
+ // TODO(b/111997867, b/177271958) Workaround - remove when fixed.
+ // A Binder transmitted fd may not close immediately due to a race condition b/111997867
+ // when the remote binder thread removes the last refcount to the fd blocks in the
+ // kernel for binder activity. We send a Binder ping() command to unblock the thread
+ // and complete the fd close / release.
+ //
+ // See DeviceHalHidl::dump(), EffectHalHidl::dump(), StreamHalHidl::dump(),
+ // EffectsFactoryHalHidl::dumpEffects().
+
+ (void)mStream->ping(); // synchronous Binder call
+
mStreamPowerLog.dump(fd);
return processReturn("dump", ret);
}