AGM: add locks to prevent potential race condition

During mixer event callback and read operations, the event nodes
are added to a list in function amp_event_cb and removed from it
in function amp_read_event. Due to lack of synchronization, when
adding and removing a node happens simultaneously, the list will
end in a bad state with its head points to invalid address. This
results the event count to lose synchronization, and the polling
event notification flag is not cleared. Therefore, invalid mixer
events will flood resource manager's mixerEventWaitThreadLoop to
trigger handleMixerEvent function. To prevent this issue, adding
locks to guard insertion and deletion for mixer events' lists.

Change-Id: I0f47523c6166fd6afc5347dd930127da37374268
1 file changed
tree: 56c3d7b0aa04c80c08848a73a0a0290e04a6a1a2
  1. ipc/
  2. plugins/
  3. service/
  4. snd_parser/
  5. Android.mk
  6. NOTICE
  7. README.md
README.md

agm

Audio Graph Manager