audio: Add A2DP notification support

 * Forward porting this code.
 * Sends notifications to legacy LPAPlayer for routing A2DP thru LPA.

Change-Id: I53eebda30b2e5cd60eeac5eb2a4cdb53e38381c9
framework/av: Add Usb AoA v2.0 support

Add USB state.
Add support for LPA/Regular Track over AoA v2.0

Change-Id: Ica9c348a002bbdd66debb1a3355126deef000948
libstagefright: Convert mono to stereo for LPA clips

- Sound effects are not supported for mono clips
- Repetative calling of effects_configure and effect_process for
  mono clips is resulting in crash in the sound effects library.
- So, Mono clips are now converted to stereo by copying the left
  sample to right.
- This is same as what Resampler does in Non-LPA Playback.

Change-Id: I789cd33ea1bc5b8f2a0d69b3b5ae55adb3b79cd1
CRs-Fixed: 446016
libstagefright: Stability issue with LPA play back.

- ANR is observed during LPA playback when there is song switch for
  every few seconds
- The song switch does not happen when the song is played till the end
-Avoid creating threads and calling reset if lpa start fails.
Initiate audio sink mutex before using it and return immediately
from setupAudioSink() in error cases.
Also remove unwanted code related to a2dp thread in lpaplayer as
no such thread is created. Make decoderthreadAlive variable false
before returning from decoder thread.
Update mInternalSeeking in pausetimeout to make sure source is
updated to the timeplayed before pause and resumes at correct position.
During onPauseTimeout if resume is issued even before closing
the LPA driver, causing decoder thread to wake up and trying to
write data. When decoder thread trying to write data LPA driver
is closed as part of the pause timeout.Synchronize these two functions
using a mutex to prevent concurrent execution.
Mono clips are now converted to stereo by copying the left
sample to right.This is same as what Resampler does in Non-LPA Playback.
This is to avoid crash in the sound effects library during repetative
calling of effects_configure and effect_process for mono clips.

Change-Id: If1652db80624a888924da22d690b2a34e176cb0e
CRs-Fixed: 463272