Return HAL config in datapath for SwAudioOutputDescriptor
* AudioFlinger needs to return the HAL config opened by Spdif wrappers
so that AudioPolicyManager can patch with valid port configs.
* AudioPolicyManager openDirectOutput must allow for mismatch of config
between client request and APM output descriptor config because
AudioFlinger may format convert using Spdif wrapper.
* When finding or creating a mix port config in Hal2AidlWrapper, we
need to allow for a client request with DIRECT or IEC958_NONAUDIO
to match an output without these flags for remote submix, as the
remote submix HAL may not support those flags and they are not
necessary for correct remote submix operation.
* Do not use device port config to open stream as fall back for lack
of profile for opening non-PCM mix port config for remote submix,
because the remote submix HAL does not support non PCM.
Bug: 311830316
Test: atest android.media.audio.cts.LoopbackPassthroughTest
atest audiorouting_tests
atest VirtualAudioTest
(allowing for re-running of flaky tests)
pass on remote submix AIDL and HIDL HALs.
Change-Id: Idced550a93e65f01c7931c8df766c6d27be0b068
5 files changed