Android r beta 1 release 0.4
dsp: fix set_adm_pp_params command timeout

Because Waves effect use send_adm_apr() in rtac.c to set adm pp params
when starting or seeking music, but there is sync issue with
set_adm_pp_params() in q6adm.c.

Patch is provided from case#04514971. It adds new api adm_apr_send_pkt()
which is used to send adm set pp params command in q6adm.c and rtac.c,
and it also add mutex this_adm.adm_apr_lock to protect it to make sure
sending next adm pp params command after previous response is received.

Original problem:
q6adm send pp param(thread1) -> rtac send adm pp param(thread2) ->
adm_callback send response to rtac but this one should send to q6adm ->
adm_callback send response to q6adm but this one should send to rtac

After applying the patch:
q6adm send pp param(thread1) -> rtac send adm pp param(thread2 blocked) ->
adm_callback to q6adm -> rtac send adm pp param -> adm_callback to rtac

Bug: 147327901
Test: verified seeking with visualizer enabled
Change-Id: I6c1a46b5b9bde8a45680b517239ee70cc929def8
Signed-off-by: Robert Lee <lerobert@google.com>
3 files changed