MediaProfiles: Add support for camcorder video resolutions.

Added video resolutions to support camcorder recording.
(cherry picked from commit I2291de43ae2be7338c673f2f0417ec5c1581391e)

Change-Id: I309fa41cfa36ee0551a8a7c53072089858a2c66a
(cherry picked from commit 805cb98f40acfb242206b7db71c50bc56ea77d2a)
(cherry picked from commit 68c1f41295f4be54ed13af20ebd1041890d2f3ca)
(cherry picked from commit 5a74f7e0e0fbec707333a1f7481d85961aff3908)
Camera: Enable Histogram feature.

Link the histogram enable/disable commands from
application to the HAL layer.
(cherry picked from commit 8ccc5e2091fcaf181210ebf16a86640e3c609b0d)

Change-Id: I510c4e1798285ed1315bfb0d234fa76090659ba2
(cherry picked from commit 6e13c154132ff81c6039375b12e71d7cd5ee42ff)
(cherry picked from commit e805ef1ab03a52c3f68e7f814921564adf534383)
(cherry picked from commit ac3ff28b327dffc08e45c4ce131fda4e65ca8a45)
Camera: Add support for ZSL burst mode.

Added ability to set number of snapshots in burst mode.
(cherry picked from commit94e831cb179f05e50ac4fc9b2b15c26f44f2ee9a)

Change-Id: Ia227d9c3445febd9b76e42471652c7b9b11b8d02
(cherry picked from commit e9856cb45feaf62b67e624386920dc7c1985fc34)
(cherry picked from commit 09767651bec149b9c53e667049b0946eee2c4f04)
(cherry picked from commit a7c14d8dc5b5513c8c9fde136429fb9801f2b90f)
Camera: Fix deadlock due to mLock in pcb and takepicture.

In non-zsl case of takepicture, we do streamoff for preview
stream which is waiting on preview callback thread to exit.
By that time the lock has already been acquired by takePicture.
So preivew callback will not exit until it acquires lock and
takePicture cannot continue until PCB call back is returned.
Fix: Avoid the mLock at services when both Preview cb &
Compressed cb are enabled.
(cherrypicked from commit bd423581f4b7eb8481f5525fc51174ce4c7261bc

Change-Id: If8b2d7465b279386f06eeeb4fee51cf73ca5ee41
(cherry picked from commit 7168882cbe6c8cb79a1788c3d1e7d4579f966491)
(cherry picked from commit 2274c3035b27ce850ebf46af123e31b977029afc)
(cherry picked from commit b31c52b9cabc34f37ad56a0d2747f284efcf83af)
Camera: Disable TakePicture related messages in stopPreview, stopRecording

This change fixes the race condition and avoid the deadlock in abnormal snapshot stop I.e, Observed DeadLock when Data or Notify Callbacks is sent to App after StopPreview is triggered and so disabling the corresponding take picture messages.

(Changes cherrypicked from commit 962b0856465e7abbd5900fffa68112363b8e5360

Change-Id: I19a71b520393e17a396dffb0c3c128274145defc
(cherry picked from commit 21fc74ac6917dbc9c9bd356516daf0481d2ffbb6)
(cherry picked from commit cce451c27f09e9495bbfc16fbd93477994dfd603)
(cherry picked from commit 74053c899d8e7804e0a66f22285a9b22defd85d2)
Camera: Dont process dataCalllback if recording is stopped

Issue: Here stopRecording is not finished as the previous
recording frame process has not completed. dataCallbackTimeStamp()
in CameraSource.cpp has stuck in the thread itself waiting for a lock.
In between, reset() function in CameraSource.cpp has called
and acquired lock. Reset() function calls stopRecording.
So the dataCallbackTimeStamp() is continuously waiting.
Unless dataCallbackTimeStamp returns, processRecordFrame
in HAL will not finish.
(changes cherrypicked from 8c47e1700fc8b6ef84d5fc76797255e6fc8e8a7f)

Change-Id: I2bb6f6d1a045bbff5ea701b4ba29ff12c0d832f5
(cherry picked from commit 18d00326f362f8a9551f91ff6eec9747cff7b1a5)
(cherry picked from commit cff04e1ab6802815e2a5d8d350a3b1a0a43f3968)
(cherry picked from commit 13cb195870f20ca703dac82bae07500417c35f56)
frameworks/av: Add support for FM feature

Add FM handle key and volume key to AudioParamater
class which is used to initimate Audio HAL to
that FM device is connected and apply correct
volume to FM stream

Change-Id: If5fa14faf7946ab27eb42b89546dc2274b24f754
(cherry picked from commit 165f20759433d0137a292b457aa783f801f13277)
(cherry picked from commit c98b484de0877e159f00b3b01d622b6539f0b2bc)
(cherry picked from commit f752d489bb85a94b81d38c72333409b4384d860a)
libstagefright:add enhancements for extended format support

Extended-extractor to support extended container format.
 - Introduce an Extended Extractor to facilitate plugging-in
   of parsers extensions.

Extended-codec to configure codec specific configurations.
 - configures omx component with extensions to augment
   container/codec format-suppor

Extended-utility to add utility methods and shell extensions.
 - Utility methods for supporting following features
  - High Frame Rate (HFR) recording
  - Support for B frame encoding

Change-Id: I77a40af701916f1803fa9c6af3c43a312a8d2c98
(cherry picked from commit ab6a474cd9acc7bc54c54a7c235f6eab032349ca)
(cherry picked from commit fe07c231dbecd255aedbf7aac597260831eb98cf)
(cherry picked from commit df7b013ceeeb4697f448a2d150ae75b86c325013)
libstagefright:enable extended codec/format support

Configure omx component with extended extensions and
register exended-extractor to augment container/codec
support.

Change-Id: I0bfa4bd6c4dfed93a96e1af431018de54d6fb57b
(cherry picked from commit 318c38f40b53e1987473b29a359e586615bf3c02)
(cherry picked from commit 4a0e6d65c200604a9618e2fc90326031153e6f08)
(cherry picked from commit f9b65059fabc1c24ae5107b54f96a017e8fc7376)
libstagefright: For interlace, set decoder in arbitrary mode

In arbitrary mode, frame parsers sends individual fields
to core. Once both the field is decoded, output done (FBD)
is sent back to client.
Default frame by frame mode will send both the fields in
a single buffer to core, which might decode only one field
or will throw up error.

CRs-Fixed: 531034
Change-Id: I31844093b6a93d3a62577fc8d799353d30573c17
(cherry picked from commit cb45f5a702992242538fab6d9e2c36b7b8e55c7f)
(cherry picked from commit 214938ef4f9997233a33a24e9e9e9751a1fa1882)
(cherry picked from commit 646e3bdce1c8241fb46802e7eba3c4f8a528517d)
audio: add support for MSM audio formats

- Add support for EVRC, QCELP, AMRWB+, and WMA formats
- Refernece change If110058284c8b3e18c2f242f560fc7748f62081c form jb-mr2

Change-Id: Ie20f2d61f79d2ba41d552718187b7098141e7b8c
(cherry picked from commit bca561e38853351c0bae15c5d201dbca7f5a027e)
(cherry picked from commit a11972f505000be397ee3a377ec42bf9e5fef420)
(cherry picked from commit 7465e6129b291c66dc7741325a90e3725e40e941)