libaudiohal: Enforce serialization of calls into IModule

Since the framework code does not guarantee serialization
of calls into DeviceHalInterface, add locking protection
for calls into method of IModule interface and its
sub-interfaces.

Bug: 381387969
Bug: 382606742
Test: atest CtsMediaAudioTestCases
Change-Id: I761c6c4243d0fac2d0a6b0d71d9803c32e81de17
2 files changed