AudioPolicy: several spatializer output management fixes
Apply several fixes for spatializer output management when the spatializer can be attached to two hardware modules (for instance the primary and Bluetooth hardware modules). - in getSpatializerOutput() open the output with openOutputWithProfileAndDevice() to properly create the duplicating output if needed and handle dynamic audio profiles. - in openOutputWithProfileAndDevice(), do not open a duplicating output for outputs opened on the primary module. - in closeOutput(), clear mSpatializerOutput if this is the output being closed. - Allow canBeSpatialized() to ignore config matching with opened mSpatializerOutput when not required. - Force multichannel mixer mask in SwAudioOutputDescriptor::open() when opening a spatializer output and the mixer config is not specified. Bug: 210803914 Test: spatializer over Bluetooth A2DP Change-Id: I1c5ca3ce0a230d674f3a22fcb1fe1d904665efe9 (cherry picked from commit b4f42a9b) Merged-In: I1c5ca3ce0a230d674f3a22fcb1fe1d904665efe9
Loading