libaudiohal@aidl: Synchronize commands sending

Although FMQs implement thread-safe blocking reads and
writes, using two queues (one for sending a command,
another for receiving a reply) is not an atomic operation
by itself. Add synchronization for this pair of operations
so that they work as intended.

Bug: 333116473
Test: play notification sounds in parallel with music
Change-Id: Ia29c6c4698499acc600f9b6fe02befddd5de5326
2 files changed