Camera: QCOM legacy definitions,HTC cam switch,NO_UPDATE_PREVIEW

Updating Camera parameters, and service with several
compatibility patches:

1., QCOM legacy CameraParameters and functions:
Adding these will make ICS qcomm camera blobs work on JB 4.2.
Use BOARD_USES_QCOM_LEGACY_CAM_PARAMS := true in BoardConfig
to use this.

Also fixes the problem of legacy qcom
camera blobs with recent libcameraservice QCOM_HARDWARE changes,
where the orientation is messed up on first
preview: the fix is leaving out setPreviewWindow(window) for
legacy qcomm cam blobs.

2., Also adding NO_UPDATE_PREVIEW flag for legacy purposes.

3., Adding adding the set orientation patch:
Always set buffers orientation when setting the qcom camera preview window
Fixes the rotated preview on TouchPad
https://github.com/CyanogenMod/android_frameworks_base/commit/1a8e41a3c7434737db89b604352575f8b3109e7a

4., camera: Full support for HTC camera switch

5., Adding more parameters for HTC Explorer

Change-Id: I2bfc72b8ef027665356788f1db7f96b31d037dbe
Camera parameters for Samsung's qcom based legacy devices

Change-Id: I8f84e06771338d992521e69704d21cd113201b4b
Revert "audioflinger: apply volume on direct track when track is active"

Causes issues with MortPlayer (LPA).  Track starts/resumes playing, but volume is forced to zero, until a track-change occurs.

4-17 21:41:51.492 D/ALSADevice(  256): setHardwareParams: reqBuffSize 262144 channels 2 sampleRate 44100
04-17 21:41:51.492 D/ALSADevice(  256): setHardwareParams: buffer_size 1048576, period_size 262144, period_cnt 4
04-17 21:41:51.492 W/AudioFlinger(  256): There was no effectChain created for the sessionId(283)
04-17 21:41:51.512 E/AudioFlinger(  256): setting observer mOutputDesc track 0x40c598a0, obv 0x40c598b0
04-17 21:41:51.512 D/AudioSessionOutALSA(  256): setLpaVolume(0)
04-17 21:41:51.512 D/AudioSessionOutALSA(  256): Setting LPA volume to 0 (available range is 0 to 100)
04-17 21:41:51.512 D/ALSADevice(  256): setMixerControl:: name LPA RX Volume value 0 index 0
04-17 21:41:51.512 D/AudioSessionOutALSA(  256): setLpaVolume(0)
04-17 21:41:51.512 D/AudioSessionOutALSA(  256): Setting LPA volume to 0 (available range is 0 to 100)

Change-Id: I6e0ee8cd7c2f577ca5b4cb834c7a83703db4b167
OMXCodec: Re-implement requires-flush-before-shutdown quirk

Support is already there, but is not in the codec quirk reading list.
Re-implement it as required by Broadcom's OMX

Change-Id: I1beac06af8118dcf0c248b631bc8e6dbbab2c1d5
libmedia: Add ICS AudioStreamType constructor

Needed for Samsung legacy camera libs.

Change-Id: If03d8525b55181ea20dc934dbcbfef85402c42c7
Add camera parameters for htc evo 3D. (1/2)

Use BOARD_HTC_3D_SUPPORT to enable.

Change-Id: I28fa3f1586071bcc78b8e887bbbf699d338a0ceb
camera: Add a few missing legacy camera params.

Fixes camera for some HTC msm7x30 devices

Change-Id: If6975e3a5470fdeb603bf8ad9c164c9a000309ef
camera: Don't segfault if we get a NULL parameter

 * Values end up NULL on some drivers, don't crash.

Change-Id: Ic897dbd4629cf3af98c85f93be202c382dde806b
Latency optimization in bufferCount / MW (Audio android framework).

BufferCount for AudioSink/AudioTrack is changed to 2 from 4. This
is done to improve the latency for the audio buffer.

Change-Id: I25efc9ee6e9ed19daa727f78df2a1dfa1aeddb38
Author: Gurudatta Bhakte <gurudattax.bhakte@intel.com>
Signed-off-by: Gurudatta Bhakte <gurudattax.bhakte@intel.com>
Signed-off-by: Shuo Gao <shuo.gao@intel.com>
Signed-off-by: Bruce Beare <bruce.j.beare@intel.com>
Signed-off-by: Jack Ren <jack.ren@intel.com>
Author-tracking-BZ: 26849
fix crash issue while playing certain streaming media

In the play response of certain streaming media, the url just contains part of the full url.
Change the url matching method to enable this case rather than crash as before.

Change-Id: Iacf46286ad5b9a1ef8e6fc4919d9fb0ee57ed31f
Author: Yi Wang <yi.a.wang@intel.com>
Signed-off-by: Yi Wang <yi.a.wang@intel.com>
Signed-off-by: Dan Liang <dan.liang@intel.com>
Signed-off-by: Shuo Gao <shuo.gao@intel.com>
Signed-off-by: Bruce Beare <bruce.j.beare@intel.com>
Signed-off-by: Jack Ren <jack.ren@intel.com>
Author-tracking-BZ: 49305 7540 18533
libstagefright: fix the duration "00:00" for some httplive link

fix google bug,if the playlist does not end by '\n', player can not show
the correction duration

Change-Id: I3188cb7078d3276ebe40252be7dae4922ab884d4
Author: Yi Wang <yi.a.wang@intel.com>
Signed-off-by: Yi Wang <yi.a.wang@intel.com>
Signed-off-by: Dan Liang <dan.liang@intel.com>
Signed-off-by: Shuo Gao <shuo.gao@intel.com>
Signed-off-by: Bruce Beare <bruce.j.beare@intel.com>
Signed-off-by: Jack Ren <jack.ren@intel.com>
Author-tracking-BZ: 48555
libstagefright: Optimize h263/mpeg4 assambler to reduce frame dropping in the assambler layer.

If current rtp packet lost, when submitting the last access unit to construct a
video frame it will set the last access unit to be damaged and will drop it. It
is the google orignal design. But if the last access unit is a whole frame it will
cause an additional frame dropping. So use "M" marker to detect the frame boundary,
if the last accecc unit "M" is set, we don't drop it, this can improve streaming
video quality when rtp packet dropping too much.

Change-Id: I79fe3764edce5a0acb8fae146905d20e77946823
Author: Feng Xiao <fengx.xiao@intel.com>
Signed-off-by: Feng Xiao <fengx.xiao@intel.com>
Signed-off-by: Dan Liang <dan.liang@intel.com>
Signed-off-by: Shuo Gao <shuo.gao@intel.com>
Signed-off-by: Bruce Beare <bruce.j.beare@intel.com>
Signed-off-by: Jack Ren <jack.ren@intel.com>
Author-tracking-BZ: 49120 23827 26068
Fixing aliasing violations, C++ 11, and gcc 4.7 changes from linaro.

av: Fix duplicate definition of size_t n

Needed to make it build with gcc 4.7+

Change-Id: I78db38b094d9ffc7ee9d410d8d3f642e619eb008
Signed-off-by: Bernhard Rosenkraenzer <Bernhard.Rosenkranzer@linaro.org>

stagefright: Fix triple redefinition of i

Needed to fix build with gcc 4.7+

Change-Id: I0767a5a4634f808f779b577cffd74e81dd5439fb
Signed-off-by: Bernhard Rosenkraenzer <Bernhard.Rosenkranzer@linaro.org>

frameworks/media: Fix aliasing violations

Change-Id: I0c3ad4d935abe6cf6df222f7d70381d868f15fe8
Signed-off-by: Bernhard Rosenkraenzer <Bernhard.Rosenkranzer@linaro.org>

av: Fix aliasing violations in AudioFlinger

Change-Id: Iec37ad0c2e30f34d72f8bf63c6c1aeceba0e3d50
Signed-off-by: Bernhard Rosenkraenzer <Bernhard.Rosenkranzer@linaro.org>

libmediaplayerservice: Fix aliasing violation

Change-Id: I70c674e7f563cf76abd078b662bb18598081f29d
Signed-off-by: Bernhard Rosenkraenzer <Bernhard.Rosenkranzer@linaro.org>

downmix: Fix aliasing violation

Change-Id: I1907da54e9ec40c9afe56c488a974d5286b787e4
Signed-off-by: Bernhard Rosenkraenzer <Bernhard.Rosenkranzer@linaro.org>

EffectVisualizer: Fix aliasing violations

Change-Id: I35532464df41a64ed920c34ad4bc1054cf6324b2
Signed-off-by: Bernhard Rosenkraenzer <Bernhard.Rosenkranzer@linaro.org>

frameworks/av: Fix build in ISO C++ 11 mode

Fix build in ISO C++ 11 mode: constructs that are being interpreted as
new string literals and const vs. constexpr

Change-Id: Ibdf4867da37b819b1a499180edcf7ad480b6b9de
Signed-off-by: Bernhard Rosenkraenzer <Bernhard.Rosenkranzer@linaro.org>

av: More ISO C++ 11 fixes

Change-Id: I84bfab66d561cb0ded6e312b8cfe02e5fe2a182f
Signed-off-by: Bernhard Rosenkraenzer <Bernhard.Rosenkranzer@linaro.org>

av: Fix build in ISO C++11 mode

Change-Id: I461d8ce5b24afedee245a6441b600df286c76b63
Signed-off-by: Bernhard Rosenkraenzer <Bernhard.Rosenkranzer@linaro.org>

Conflicts:

	media/libmediaplayerservice/MediaPlayerService.cpp

Signed-off-by: Stevespear426 <stephen.k.spear@gmail.com>
av: Fix compile errors

Don't use memcpy() on areas that may overlap
Fix aliasing violation

Change-Id: Icd54cf12c2485a3d2789d1fb75c3a8a964c4163f
Signed-off-by: Bernhard Rosenkraenzer <Bernhard.Rosenkranzer@linaro.org>
disable camera sounds (3/3)

Change-Id: Iff4eb5ca7dd13038bf852a76d0c605814864497a
Signed-off-by: Jonathan Steadman <xxwhitehawk@gmail.com>