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: Dmitry Shmidt <dimitrysh@google.com>
Merged-In: I7c9449bb705a6fbebdc0642166e58348d47b7ee8
Change-Id: I1c2e1cbfdb16c408c7368e2e51838c299c22ec7b
Loading
Please register or sign in to comment