commit | 255ff7f5eb3a7a66264b0b669fda8cfa1c1bf4ae | [log] [tgz] |
---|---|---|
author | jiabin <jiabin@google.com> | Thu Jan 11 00:24:47 2024 +0000 |
committer | Android Build Cherrypicker Worker <android-build-cherrypicker-worker@google.com> | Thu Jan 11 00:24:47 2024 +0000 |
tree | 9ff6eced1f076849da0f2031c31ca77805f98a00 | |
parent | 4dc37605e8e1ec83b0f963832dff7601c0ded203 [diff] [blame] |
libaudiohal@aidl: update dynamic mix port when disconnecting device. When an external device is disconnected, the framework should query the HAL to update the cached mix port so that the cached mix ports are up to date in libaudiohal. That prevents stream opening failure after disconecting external devices. Bug: 251215866 Test: connect multiple different devices (cherry picked from https://googleplex-android-review.googlesource.com/q/commit:4def684ea164870c775bd4bc6e688bf669d242d2) Merged-In: Ibc6c29f9a31c0cb5257e8348aba6822086564947 Change-Id: Ibc6c29f9a31c0cb5257e8348aba6822086564947
diff --git a/media/libaudiohal/impl/Hal2AidlMapper.h b/media/libaudiohal/impl/Hal2AidlMapper.h index 21cfd5a..0117410 100644 --- a/media/libaudiohal/impl/Hal2AidlMapper.h +++ b/media/libaudiohal/impl/Hal2AidlMapper.h
@@ -185,6 +185,7 @@ status_t updateAudioPort( int32_t portId, ::aidl::android::media::audio::common::AudioPort* port); status_t updateRoutes(); + void updateDynamicMixPorts(); Ports mPorts; // Remote submix "template" ports (no address specified, no profiles). @@ -202,6 +203,7 @@ ConnectedPorts mConnectedPorts; std::pair<int32_t, ::aidl::android::media::audio::common::AudioPort> mDisconnectedPortReplacement; + std::set<int32_t> mDynamicMixPortIds; }; } // namespace android