Use a separate thread to disconnect registered streams.
When the stream is torn down due to request from AudioFlinger, the streams in shared mode will try to disconnect all registered streams in the data callback thread. This will trigger stop all streams. When the last registered stream is stopped, data callback thread will be joined. That will cause a dead lock since the join thread is called from the command thread when calling stop, while the stream is stopped by the data callback thread. To fix that issue, a separated thread is spawned to disconnect registered streams so that the data callback thread can be joined correctly. Bug: 207408882 Test: repo steps in the bug Test: atest AAudioTests Change-Id: I317101818a49aa6750da544e35321f82b384748f
Loading
Please register or sign in to comment