audio: Fix MonoPipe ownership in StreamRemoteSubmix
MonoPipeReader does not hold a strong reference to MonoPipe.
Thus the client code needs to ensure that their lifetimes
are synchronized. In StreamRemoteSubmix::inRead the code
holds a strong pointer to a MonoPipeReader but not to the
MonoPipe which makes it possible for MonoPipe to be released
from another thread and causing the read operation to crash.
Bug: 377325461
Test: atest VtsHalAudioCoreTargetTest
Change-Id: I400aa91204a3464dcb8fca723c8c87005fb6502f
1 file changed