StageFright: Removes hacks for Nvidia MPEG2 decoder

Removes the NVIDIA MPEG2 decoder specific hacks in legacy code as
Nvidia HW MPEG2 decoder is enabled and tested now.

Change-Id: Ifc67e1119d9741551336753f85f9cfdfd3fc8600
audioflinger: enable effects after registration if needed

This fixes a bug where effects were not properly reenabled after
being moved from one playback thread to another. The effect
is enabled but the audio policy manager sees it as disabled.

Bug: 11181933.
Change-Id: I19cac7acbaf61c546e667fd85ed7d4eda1c716d8
Fix flush() followed by start()

Bug: 11259166
Change-Id: I72526cdfd4e3ff4b06e6a317e577f57cc285205d
Make sure we get to discover that the cache is sufficiently full again

by posting buffering events while in the CACHE_UNDERRUN state.

Change-Id: Ic60c8d57f0ae502aa2b6eec7160dc4224b989604
related-to-bug: 11262689
am 6fa20187: Make sure we get to discover that the cache is sufficiently full again

* commit '6fa20187e4cf9ace5692979a84741484f19e3f57':
  Make sure we get to discover that the cache is sufficiently full again
Merge "Fix flush() followed by start()" into klp-dev
am dedc7b0f: Merge "Fix flush() followed by start()" into klp-dev

* commit 'dedc7b0fa23c21b525dc8abb572bb8161ad66a9b':
  Fix flush() followed by start()
audioflinger: fix track terminated before playing

When a track is terminated before any audio was written,
we should not send a drain request to the HAL. The drain
will be ignored and we will wait the async callback for ever.

Also fix a potential deadlock by not deleting a track with the
thread mutex held: mPreviousTrack changed from a sp to a raw pointer.

Bug: 11247103.
Change-Id: I0a4b47b099204c7c326d45d700234ab8f72d8eae
am 6a51d7ed: audioflinger: fix track terminated before playing

* commit '6a51d7ed7062536ccc892c8850a34ed55cbc8d5c':
  audioflinger: fix track terminated before playing
Allow releaseBuffer after flush

After AudioTrack start checks for pending flush,
allow releaseBuffer on any previously obtained buffer.
For example, this can happen if the resampler has obtained
a buffer but not released the whole buffer yet.
Note that the resampler will be reading obsolete data.

Bug: 11285590
Change-Id: I0614fbb62e43604aac3089cce4b7797c87a306b5
Fix kAutoRampDurationUs overflow issue

When kAutoRampDurationUs multiplies with mSampleRate, it overflows to int64.
Type cast it to int64 to make sure RampDurationUs properly.

BUg: 11162491
Change-Id: I4f93bc9acc8456e25623a9255ca7a5b206425009
Merge "Allow releaseBuffer after flush" into klp-dev
am 95c03858: Merge "Allow releaseBuffer after flush" into klp-dev

* commit '95c03858e2ab4fb693a2bfe47b3caa806e43c044':
  Allow releaseBuffer after flush
am 998c4e88: am 0219856e: Merge "libvideoeditor: fix M4OSA_Clock header guard"

* commit '998c4e88f962336472c5e1c3afbf0ed8d6d3a971':
  libvideoeditor: fix M4OSA_Clock header guard
am 9857473f: am 0f4b0d23: Merge "libeffects: do not use GNU old-style field designators"

* commit '9857473f48abf1333ddd3454ab3c916b4e69daa4':
  libeffects: do not use GNU old-style field designators
am e7329bd5: am d5255d1d: Merge "If dlopen("libwvm.so") fails, log the reason why."

* commit 'e7329bd564e7c5f671b786dc7d0cc684d6d11fca':
  If dlopen("libwvm.so") fails, log the reason why.
Merge "Fix kAutoRampDurationUs overflow issue" into klp-dev
am f3a6234b: Merge "Fix kAutoRampDurationUs overflow issue" into klp-dev

* commit 'f3a6234ba21640cf2bc893dbcb98fb9b0fa47481':
  Fix kAutoRampDurationUs overflow issue
Check for NULL buffer in repeat-latest

Repeating the most-recent buffer appears to fail when the producer
disconnects.  This adds a NULL check to avoid crashing.

Bug 10607920

Change-Id: Ied036004425f046fcf9c26303823681f3fddb99e
Merge "Check for NULL buffer in repeat-latest" into klp-dev