Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Skip to content
Commit 285c1736 authored by Mikhail Naganov's avatar Mikhail Naganov
Browse files

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
Merged-In: I819b03946a88e8013d4c1dea50f14af3688e7cbc
parent 3eba0898
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment