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

Skip to content
Commit 488d5005 authored by Eric Laurent's avatar Eric Laurent Committed by Dmitry Shmidt
Browse files

AudioFlinger: fix getMicrophones implementation



getMicrophones() should return aggregated mic information
from all HW modules, not just primary.

Also:
- Fix assignment of mPrimaryHardwareDev that should be
first from HW module name and then according to primary output
if no module with name "primary" is loaded.

- Make sure we do not dereference mPrimaryHardwareDev if null.
Note that this should not happen with current rule that a primary module
must be present.

- Implement consistent locking scheme where both mPrimaryHardwareDev and
mAudioHwDevs are guarded by mHardwareLock

Bug: 154772890
Test: AudioManagerTest#testGetMicrophones

Signed-off-by: default avatarDmitry Shmidt <dimitrysh@google.com>
Merged-In: I7c9449bb705a6fbebdc0642166e58348d47b7ee8
Change-Id: I1c2e1cbfdb16c408c7368e2e51838c299c22ec7b
parent a135dd88
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment