Reduce blocking time when streaming audio data
When the CPU is busy handling many tasks, there are times
that the streaming thread gets blocked while calling some
undelying platform API functions. To avoid this problem,
applied several methods for reducing the blocking time
and added log messages for displaying time information.
List of methods used for reducing the blocking time:
1. Cache appid / pid information that is acquired by
calling AUL API functions, since they sometimes
do not return immediately and take a while to complete.
2. Instead of passing a pointer to the shared audio data
into the message transmission module while holding the
lock to protect the shared audio data, make a copy of
audio data and release the lock immediately so that
the copy of audio data can be used without the risk of
race condition. This is because sometimes the message
transmission also takes a bit of time to complete, and
the other threads waiting for the lock cannot proceed
in such cases.
Change-Id: I6c6959fadddbc557dbb77849fa25ce4949155f4b