mirror of
https://github.com/Evolution-X/hardware_interfaces
synced 2026-02-01 11:36:00 +00:00
audio: Fix remote submix configuration and 'prepareToClose'
In the configuration, remove "mono" channel masks. The legacy implementation always used stereo, the framework handles channel conversion. Otherwise, the input may be opened with a different channel mask from the output. In 'prepareToClose', close the output side of the route. The framework may close the "old" output stream after it has opened a new one. A call to 'prepareToClose' means that the framework thread is already shutting down, thus it is safe to shut down the route. Bug: 302036943 Test: atest audioeffect_analysis Change-Id: I95b57807f2559ef681da822b3cab4ea6b4340143
This commit is contained in:
@@ -131,6 +131,8 @@ ndk::ScopedAStatus StreamRemoteSubmix::prepareToClose() {
|
||||
LOG(DEBUG) << __func__ << ": shutting down MonoPipe sink";
|
||||
|
||||
sink->shutdown(true);
|
||||
// The client already considers this stream as closed, release the output end.
|
||||
route->closeStream(mIsInput);
|
||||
} else {
|
||||
LOG(DEBUG) << __func__ << ": stream already closed.";
|
||||
ndk::ScopedAStatus::fromExceptionCode(EX_ILLEGAL_STATE);
|
||||
|
||||
Reference in New Issue
Block a user