audio: Fix StreamOut ownership in default wrapper
StreamOut::asyncCallback could became an owner of StreamOut causing the destructor to be called on the offload callback thread, while the legacy HAL is holding a mutex, which resulted in a deadlock. Removed erroneous usage of sp<StreamOut> in asyncCallback. The legacy HAL joins the offload callback thread when closing output stream, thus StreamOut destructor is guaranteed to finish only after the offload callback thread has exited, and using a raw pointer to StreamOut inside asyncCallback is correct. Bug: 70863217 Change-Id: I0d77018cf3df5ad07251732733288d425dd836eb Test: manual
Loading
Please register or sign in to comment