APM: Reject attempts to use DEEP_BUFFER in openDirectOutput
Expand the existing rejection logic in openDirectOutput to cover the case of sampling rates > SAMPLE_RATE_HZ_MAX (192 kHz). For example, an explicit request for DEEP_BUFFER music with high SR, or finding an output for music with 'audio.deep_buffer.media' enabled could end up selecting a matching profile from a mix port with DIRECT flag, and that would yield an invalid DIRECT | DEEP_BUFFER flag combination sent to the HAL. Added new tests AudioPolicyManagerOutputMixPort*Selection to verify two thing: 1. Which output stream gets created / selected for various combinations of attributes. 2. Whether APM passes the set of flags which corresponds to the actual flags declared by a mix port. Flag: EXEMPT bugfix Bug: 357522537 Test: atest audiopolicy_tests Change-Id: I819b03946a88e8013d4c1dea50f14af3688e7cbc
Loading