av: Don't use fraunhofer for ARMv6 devices

Using fraunhofer on ARMv6 devices does not work - it causes a sigsev. Don't use it if ARMv7A is not present

Change-Id: I67e200ac2c1ab17a5c051fc5bc735ed7b1e5f21f
audio: Squashed set of commits for QCOM audio features

frameworks/av: Add support for QCELP, EVRC, WMA and DIVX

Add support for QCELP, EVRC, WMA and DIVX

Change-Id: Ie39516c9e7b1976ece9cd95e06f4a9373a15a1db

frameworks/av: Add support for QCELP/EVRC non-tunnel encoding in SF.

Add support for QCELP and EVRC formats non-tunnel mode encoding
in StageFright using hardware accelerated encoders.

Change-Id: I4be8965158c1df425e3c8541df56539893efe164

frameworks/av: Initial gerrit change for tunnel mode recording.

Change-Id: Iab49678339d5e16fa327d7f0ae3d494ffd7fed8f

libstagefright: Fix for Noise in Voice call record.

-Using popCount function to get channel count gives incorrect value on
voice call recording.
-Only STEREO and MONO bits to be considered to count
channels on input

Change-Id: Ic1975bb69f6ce9cac2f7e92e63c47a28966b0fa6

Define FM, VOIP, and fluence audio parameters

Change-Id: I65cdecf043cde8c314ade47afbb74df3272e1a44
fix build

Change-Id: I086933f6fc7a330dea8aa7e74207462034ab23d5
Compile AudioParameter as shared library regardless of SRS flag

Change-Id: I381a7b5bf1c67a82e7fef704d621d359a843d912
framework/av: Fix EOS issue for certain midi clips

- 1.For some midi clips, at the playback ends it doesn't
    go to the next clip, stuck at end and UI freezes.
  2.Midi playback with a third party Android browser app
    stops abruptly even before playback is started. Reason
    is app api call sequence is different from Music app.
    The playback starts before duration of clip is set.
- 1.Midi parser is not sending EOS for these clips once
    it reaches the end of playback.
  2.Playback is stopped when playtime is greater than
    duration. This check is applicable only when the
    clip duration is already set.
- Fix to set midi playback status to stopped, when the
  play time is greater than the total duration of the clip.

Change-Id: Ibcd6cc2060b26e256c41b4c20df70af35da15e1d
frameworks/av: Fix to handle corrupted AAC clips

- AAC decoder was returning SUCCESS by default unless
  the state is changed to ERROR.
- For some cases, where the clip is corrupted, it will
  return SUCCESS even though it has not decoded anything.
- Fixed this by initializing the state to -1.

Change-Id: I0ddd2608216320bd4943f0fb8e03d300865a2362
libstagefright: HTTP Streaming fixes

- Stop fetching on reaching EOS
- Disconnect datasource in player's reset
- Send buffering complete when seek is issued
  when player is in buffering state

Change-Id: I685e78b7317936367f8ef6df3e97cb6ed5e04e7d
frameworks/av: Fix building pv aac library.

Change-Id: Ibb5c2b497965686af937a3f6917c66309e19e442
audioflinger: workaround for samsungs volume bug

play music via headset -> notification comes in -> music volume gets set to 0 ->
notification gets played -> music resumes with wrong (much lower) volume

Change-Id: I3961ed48d0687bacb60ee8d4ddc82575f06c908e
camera: Add parameters for HTC msm8960

This is mainly taken from the ICS commit
dc4a6eb75a44136c9e753d1569058a7cfc1e1704

all ifdef'ed with QCOM_HARDWARE
and necessary for the camera on the HTC One S (ville)

Change-Id: Ieaf3e9110c78d677a16e096ae6848d3a08aa5ddc
OMXCodec: Support older QCOM video decoders

Pre-JB qcom decoders calculated buffer dimensions based on stride
and slice instead of the video frame dimensions. If for some reason
a device uses older (ICS, possibly HC) OMX libraries, enable this
behavior with QCOM_ICS_DECODERS

Change-Id: Id7f48bf79e3bfd5bcf692eb8165edde2b426a351
frameworks/av: Implement DirectTrack and DirectTrackClient

- DirectTrack exposes API to client so it can create a direct
  output.
- DirectTrackClient allows notifications to be sent to the
  client from DirectTrack
- DirectTrack is being used for LPA and Tunnel Audio

Change-Id: I1ae121bbcdf8d84000214c10116757915c826fa4

libStagefright:: Provide interface to query current offset position

- Currently the streamport is querying same getSize for get current
  offset. Since this info is needed by parser to decide if sufficient
  data is there before requesting for the same. But in case of data
  length and size coming zero the same is passed to the parser which
  assumes that there is no data with the data source and it errors out.
- To resolve this issue new interface is created to pass the current
  offset length which indicated how much data is read till now.

Change-Id: Id508329cd9ba6c34f882821135cced1d37ba0346

frameworks/av: Update framecount and buffersize values

-framecount should be calculated based on mMaxBufferSize
 returned from HAL
-update the buffersize with the value returned from HAL
Change-Id: I90dd9c3ebbbc8a9f1f2f92c5347ae9cb01719e13

media: Include the MPQPlayer for MPQ8064

JB upgrade for the MPQ8064.
Initail contribution taken from the ICS mainline code.
Including the MPQAudioPlayer for the tunnel mode.

Change-Id: Iaf827ac2c63a4f749ecfe5494ebeb0cd2e14d4a2

Stagefright: Implement LPAPlayer and TunnelPlayer for DirectTrack

Change-Id: If025b129a3e102642552c16522d8668c657ab5b3

libmediaplayerservice - enable prepare for source other than DASH

  - enable media_repared for non dash source
  - allow prepare async for non dash source

Change-Id: I24218644114c4a8965a12056ecfc841841515576
CRs-Fixed: 382348

frameworks/av: Add Misc fixes for LPA

- Add support from closing recycled track while going from non-LPA
  clip to a LPA clip.
- Set EOS to true when there is asynchronous reset. This prevents
  decoder/extractor from fetching additional buffers.
- Disable Audio Effects changes for now.

Change-Id: Iea150885c1517b1eee7df7f1ad5231e5bcad23d4

libstagefright: Bookkeeping for Tunnel instance in AwesomePlayer

-Add additional Bookkeeping for Tunnel instance in AwesomePlayer due
 to gapless playback changes in stagefright.

Change-Id: I54376ccc43450cf90a44b149e8ee911f29dcbe65

libaudioflinger: Setparameter  call  for direct track.

-Add set parameter call for direct track. This is required for
 device switch of lpa  / tunnel clips.

Change-Id: Ib57feff2adbbcce75d540a41e3ab4e3bb9dcd02d

audioflinger: VOIP bringup and support for vocoders

Change-Id: I681e8e4ddade15a7d3aef4d25e6bbc7dced03767
(cherry picked from commit 5aac550bcab3ff19984d05b8c7904ee6d63d197b)

Conflicts:

	media/libmedia/AudioRecord.cpp
	services/audioflinger/AudioFlinger.cpp
	services/audioflinger/AudioFlinger.h
audioflinger: fix bad parentheses placement

Change-Id: I682b72cedca96b3bab68ccb4953bafceac24ac82
audio: Fix another ifdef fail.

 * Yeah, I should test more.

Change-Id: I82f532518e8367d09550347520f3604f907f90da
stagefright: Build QCOM players for all QCOM targets

 * They are disabled, but need to be built.

Change-Id: I38e75c078011402b36a2ca8e4a4e9fa76b2edd89
audio: Unbreak ALL the things

 * Seriously, WTF Steve.

Change-Id: I7c304104d9d7e84121ef1a8cf77d5977e1258616
camera: Set the min undequeued buffer count to 2 for camera

 * Too many buffers causes ION allocation failures on many devices.
 * We don't need these extra buffers for performance in the camera, so
   set it back to 2.

Change-Id: If610824f30ee8e6a2c1acb90dd7af78269e81086
libstagefright: Adding a work around for SurfaceMediaSource

- Do not stop on first call to onBuffersReleased, which presumably
  will be called when producer calls setBufferCount on BufferQueue.
- Do not flush the buffers when stop is issued via onBuffersReleased
  (producer calls disconnect on BufferQueue), instead flush when reset
  is called.

Change-Id: I91448bc87563f2245ad9c9c7150b82c358bfe9e2
CRs-Fixed: 387181
libstagefright: Fix to free buffers in error scenarios

    o MediaBuffer objects are not freed if component transition from IDLE->EXECUTING
      or EXECUTING->LOADED fails (or if the OMX_CmdComplete messages are dropped
      due to an earlier error)
    o Additionally with native buffers, the corresponding ANativeWindowBuffers are not
      cancelled back in the above scenarios.

Change-Id: Icdee687dab4883639f49ba0b38d6c80d7013873b
libstagefright: Accept vendor specific NV12 colorformat from component

Accept OMX_QCOM_COLOR_FormatYUV420PackedSemiPlanar32m color format which
is NV12 + 32 aligned stride and slice.  This different from vanilla NV12
which is 16 aligned.

Change-Id: Id6cd4295c7710b3f33ef082e3b644732fd85e3fb
Signed-off-by: Deva Ramasubramanian <dramasub@codeaurora.org>