msm8960-common: power: Tuning and cleanups

 * Tune the governor for better power usage and interactivity
 * Reset tuning parameters if governor changes
 * Cleanup

Change-Id: I4e6638e2402e76e44b8804465a5e5be63f5b85f9
msm8960-common: enable mtp usb connection type

Patch set 1: initial
Patch set 2: allow for distinct mtp and mtp+adb product ids and remove infeasible combination mtp+mass_storage

Change-Id: I4812489313ddfbd85d691b7cfce4b23db3a8031e
msm8960-common: support basic notification LED flashes

Patch set 1: Support for flash modes:
             1) off
             2) normal (~250ms pulse in 2sec)
             3) long (~1sec pulse in 2sec)
             4) always on

Change-Id: Ic304cbe43466c451f8bbe6f5395988c8516cb526
Merge "msm8960-common: power: Tuning and cleanups" into cm-10.1
camera: remove 768x432 as a valid preview resolution

Video camera code will choose 768x432 as the preview resolution for
non-720p display devices when HD video recording resolution is selected
otherwise.

Change-Id: I5366831bf8576c8911da7f23883443178034365b
Camera: Fix CTS testPreviewPictureSizesCombination.

CRs-fixed: 346704

(cherry picked from commit 921dcbf654e2a1ac3ed585b15c917576814d87c0)
(cherry picked from commit 677870b791069b3b8e9aa347d6666e6f4c9581f5)

Change-Id: I6ec20790a8812dc2cae9933b29989a2f63450b16
msm8960-common: move recovery files to common where possible

Change-Id: I54c7afe2b541e1b24eb95c2384001c6f5d6a0758
Merge "msm8960-common: move recovery files to common where possible" into cm-10.1
Add CDMA/GSM phone debug message, mAid, mUSIM and mSetPreferredNetwork to HTC8960RIL

These three variables are not set in HTC8960RIL, causing preferred network to always revert to WCDMA preferred. (e.g. evita LTE not enabled on boot)
Add them back (like in QualcommSharedRIL), and also add missing debug message too.

Essentially port of http://review.cyanogenmod.org/#/c/22987 and http://review.cyanogenmod.org/#/c/29556/ to HTC8960RIL.

Change-Id: Iad43a300bc2dfffae201153d5009a756cebb4e32
msm8960: update headers to match kernel

Change-Id: Iff6e9513fa98cacaf77cbbe60f0da9d6603ea576
msm8960: use roboto for recovery font

Change-Id: I881a0e4ce6864d92ae5506d07987e685fc88eebd
msm8960-common: camera: enable needsEarlyVideoSize

Send video-size parameter to HAL before recording begins to ensure that
video size lines up with preview size so memory allocations line up
correctly.

Change-Id: Idf1f52a8aadaf7232bfbadb6ee6464e0ee0c7d70
Camera: Set and get proper video size key as described in the application file.

CRs-Fixed: 343259

(cherry picked from commit 98bb823f9d2171a8d9d8331bbc3aa9972598a7a5)

Change-Id: I59b8e5d28c04baf9f0b6eef512988f5f5662c505
HAL: return pretained preview buffer to surface when preview window changed or camera disconnected.

When preview is paused due to taking snapshot, preview buffer is retained.
However, if UI changes preview window or disconnect, previous preview buffer is
not valid any more, so we need to put it back. Next time when preview is
started, it will act as a clean start of preview and get preview buffer
from display.

CR-fixed: 342926

Change-Id: I45b4580fedf523264285d0179260f13127e95bc5
Camera:Preview buffer length correction in YV12 mode also.

CRs-fixed: 343289
(cherry picked from commit 0d4758953a0c925c60f5f117bef6f719daaa9de3)

Change-Id: Ifb0a39294132db806a622eafef63931eebacf3ca
Camera: Compare correct buffer size with the 4k aligned buffer size.

Preview width and height received in peview callback were incorrect,
causing mmap failures. Instead of fetching width and height in
every preview callback, stored the preview buffer size value
while preview buffer allocation.

Change-Id: I8a5387777760d0cdec514f0adec31de105956785
CRs-Fixed: 341634
HAL: fix memory leak for preview buffers

During camera hardware release, preview buffers hold during taking picture
need to return back to surface if they are not done yet.

CRs-fixed: 344896

Change-Id: I1817fb42446049276d33bf7a3fbfac80a1a9c105

Conflicts:

	QCameraHWI_Preview.cpp
Camera: Fix for ZSL/Burst mode JPEG memory leak

This change fixes the memory leaks
during ZSL/Burst mode in the omx
layer.

Change-Id: Ia6c557c7db9572cc3e6c4dabddb65c5a0bf6d189
CRs-fixed: 349015
(cherry picked from commit 17c0940805dcc3ba5840eada8a3a026c0d501136)
HAL: fix memory leak for preview buffers and add error handling

During camera hardware release, preview buffers hold during taking picture
need to return back to surface if they are not done yet.

Change-Id: I3533d43eb0aa4a9f6c0c8eb222702772eae27d1a
(cherry picked from commit 083cbdda6e88218cd7b8c4583c02ef1bae3e0bc6)
(cherry picked from commit 236c33ac4bf8ae350c4838a5168cdc2e9603d01a)
camera: Clean, write-back, cache for preview and video buffers.

Write-back preview and video buffers to main memory before they
are delivered to display and video encoder respectively.

Change-Id: I748a23a2b1ade1163d6ec09623090ad4d043a441