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

Skip to content
Commit 11c14835 authored by Jaideep Sharma's avatar Jaideep Sharma
Browse files

audiopolicy: return appropriate profile from searchCompatibleProfileHwModules

The current logic for getting IoProfile prefers to select a profile with
AUDIO_OUTPUT_FLAG_COMPRESS_OFFLOAD when "directOnly" profiles are
fetched.

However, if configurations support a mixport with exactly
"AUDIO_OUTPUT_FLAG_DIRECT", and a "directOnly" profile is fetched with
"AUDIO_OUTPUT_FLAG_DIRECT", the current logic still ends up providing a
AUDIO_OUTPUT_FLAG_COMPRESS_OFFLOAD profile. This is because the
compress_offload profile is defined as
(AUDIO_OUTPUT_FLAG_COMPRESS_OFFLOAD | AUDIO_OUTPUT_FLAG_DIRECT).

Modify the logic to check the requested flags. If a profile with
AUDIO_OUTPUT_FLAG_DIRECT is requested and APM has a
AUDIO_OUTPUT_FLAG_DIRECT profile, return the appropriate profile.

Bug: 393531112

Test: run audiopolicy_tests, audiorouting_tests, trackplayerbase_tests ,
audiosystem_tests

Test: CtsMediaAudioTestCases, CtsNativeMediaAAudioTestCases

Change-Id: Ieabe99c5b0fba329195a072583115f6ce5f9c41f
parent 2f5eb682
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