AudioMixer: Remove tracks from enabledTracks after reseting outTemp

If any track goes through AudioMixer::process__genericNoResampling, and
its getnextbuffer returns NULL, Then that track is removed by AudioMixer
from enabledTracks.

Thus if all tracks getnextbuffer return NULL, Then this function doesn't
reset outTemp and last buffer in AudioFlinger's mMixBuffer will be
repeated and noise is observed.

Remove tracks from enabledTracks after reseting outTemp to zero, so that
process__genericNoResampling will reset outTemp and noise won't appear.

Bug: 12450065
Change-Id: I1ccac7ee4a3bf7fd930254356c072099e11e7c19
Signed-off-by: Gaurav Kumar <gaurav.kumar@broadcom.com>
Signed-off-by: Pierre Couillaud <pierre@broadcom.com>
frameworks/av: Fix LOG_NDEBUG compilation errors

- Cleans up undefined references due to scope & naming

Change-Id: Ib342e57c69353fb873c6c0e7ba66e62983676f61
audioflinger: update track ready condition

Signal track ready if the track isStopping().

Change-Id: Ie279995d5f90fa8211a20dfbeacc1cf9b921d0bf
CRs-Fixed: 592189
Nuplayer: Fix no image or image will be delay issue

- Fix no image or image will be delay issue
  while using Wifi VOD RTSP program

Change-Id: I7b32fb2ef80f46557c6c76118783245f8488812f
nuplayer: Fixes in nuplayer Renderer

- Fix in AV sync calculation for video only stream's pause
  scenario

Change-Id: Ie4fae760ca485ee21121cf4018a62d5d86eacb57
audioflinger: OffloadThread state fix

When switching from one offload session to another that
reuses the same offload output, audio HAL is paused & flushed in
preparation for the new track.

OffloadThread must reset mHwPaused to allow proper state transitions
for the second track.

CRs-Fixed: 578165
Change-Id: I8173845e1782b5a8b372a82c7d337299a61e0efe
audioflinger: Fix for a deadlock

AudioFlinger enters a deadlock (with itself) on trying to free a
RecordTrack object that failed initialization. Clear this
bad object from the caller instead.

CRs-Fixed: 589020
Change-Id: I926f2beb922a70f6924e593e2bbf1a5b5df85b16
audioflinger: check for condition before waiting

AsyncCallbackThread must check for any condition that
was already been satisfied before waiting.

CRs-Fixed: 581978
Change-Id: I7a37c03cddcf7fdaa61c826d71a4d527979ce9e1

Conflicts:
	services/audioflinger/Threads.cpp
fix deadlock issues that arise when there are simultaneous
effect control interface calls to proxy and to
non sub-effect wrappers(eg., bundlewrapper) from audioflinger
Also, return NO_ERROR when CMD_OFFLOAD succeeds

Whenever there are parallel calls to proxy and non sub-effects wrappers,
some of the calls are not completed. This is due to deadlock arsing out
of Proxy waiting for the subeffect call to return and subeffect waiting
for proxy to release lock.
The call flow is changed to a cleaner and simple one - Proxy gets the
aeli(effect library info) of subeffects during the EffectGetSubEffects()
call. Therby, proxy will manage the sub effects by itself rather than
going through effects factory.

Signed-off-by: jpadmana <jayashree.r.padmanaban@intel.com>
Bug: 12424044
Change-Id: I16852222f1d0e94e433a19177729323a4bb1c090