msm: camera: Port camera v4l2 architecture to 8x60

Add V4L2 version files for vfe31 files for use in
V4L2 8x60 solution. Also, add option to use
correct platform devices for 8x60 if V4L2 flag is turned
on.

Change-Id: Ia209c2648122c13e3b4e14d4f93dae7f45f5492e
Signed-off-by: Roja Rani Yarubandi <rojay@codeaurora.org>

Conflicts:

	arch/arm/mach-msm/clock-8x60.c
	arch/arm/mach-msm/devices.h
	arch/arm/mach-msm/include/mach/camera.h
	drivers/media/video/msm/csi/msm_csic.c
	drivers/media/video/msm/msm_mctl.c
vidc: Handle EOS with Codec config buffer.

Change will handle codec config buffer with EOS.
Video driver will make sure that the codec config buffer with
EOS will be requeued in case of reconfig and non-reconfig paths.

CRs-fixed: 399347
Change-Id: I94ed460b04b76663895c6690c2f866590ac51c7d
Signed-off-by: Gopikrishnaiah Anandan <agopik@codeaurora.org>
(cherry picked from commit 43b203869814fe5f0ddcb265a8f859aebdaa652f)
video: msm: Add support for VSYNC notify via sysfs

 * Sending uevents at 60Hz is very nasty for userspace with many
   listeners. This patch provides an alternate notification mechanism
   via the framebuffer sysfs which we can simply poll on.
 * Requires a userspace change to hwcomposer to support this.

Change-Id: Iba180da52ae05b3e702790e27c7ded65d57445c9
Update config
msm: kgsl: Improved bounds checking on user specified parameters

Verify that the user specified length for a PMEM region is smaller
than the size of the entire region as reported by the kernel APIs.

CRs-fixed: 380282
Change-Id: Ic0dedbad0127bdaed70eafc00238b44f982b093b
Signed-off-by: Jordan Crouse <jcrouse@codeaurora.org>
(cherry picked from commit 58ad656d0fc1447314d2682f87799d1e568ed8c5)
msm: smd: call smem_find() after releasing spinlocks

If a subsystem crashes with a remote spinlock locked, then the subsystem
restart code should release it before attempting to access SMEM.
Originally when this code was written, smem_find() did not lock a remote
spinlock in violation of the SMEM protocol.  Once smem_find() was
updated to lock the remote spinlock, this deadlock scnario was created.

Do not call smem_find() until the remote spinlocks have been released
for the failed subsystem.

CRs-Fixed: 397287
Change-Id: I41086c81df5943659465741601191be9d243ca2c
Signed-off-by: Eric Holmberg <eholmber@codeaurora.org>
(cherry picked from commit 50ad86febb34255ed47b7dd9840aaa6f1b257b3c)
video: msm: Dynamically toggle histogram interrupt

Make histogram enable/disable functions also enable/disable the histogram
"interrupt enabled" bit on the MDP enabled interrupts register.

CRs-Fixed: 398556
Signed-off-by: Carl Vanderlip <carlv@codeaurora.org>
Change-Id: I56f811e88cf3fd44ae0a2df8a6e5de32ba9a0c1c
(cherry picked from commit 1026832c51cbadeea9a717fa20fb42b6a7c5661f)

Conflicts:

	drivers/video/msm/mdp.c
	drivers/video/msm/mdp4.h
video: msm: Defer histogram reset to workqueue

Currently, when an underrun occurs, a reset request is sent to the
histogram hardware. This has been observed to cause a hang in the histogram
collection cycle. The fix for this hang is to instead rely on the existing
checks for histogram validity in the histgram read worker. When the
underrun occurs, the histogram is invalidated, which in turn causes the
histogram read worker to reset the histogram collection when it attempts to
read its contents.

Change-Id: I66d33ddedef76fdcb6c4a3d8095c0e8ca695e33d
Signed-off-by: Carl Vanderlip <carlv@codeaurora.org>
(cherry picked from commit 2dd5234c094157bf77781b8646ac9ad114f819b0)

Conflicts:

	drivers/video/msm/mdp.c
video: msm: Ensure idle state before enabling histogram

Disable interrupt, set state flags to false, cancel histogram collection,
and clear the workqueue before attempting to enable the histogram. This
guarantees that this is the only configuration of the histogram running.

Change-Id: I222932db40494724b3efdb2e5bea08a849095c1e
Signed-off-by: Carl Vanderlip <carlv@codeaurora.org>
(cherry picked from commit 5e5f3b4ff8a4a0d980e02fa38c2b70fec7095e79)

Conflicts:

	drivers/video/msm/mdp.c
Fix building
Overclocked to 1.5ghz with stock voltage
msm: audio: qdsp6v2: Add delay in speaker device profile to reduce pop

Add delay in the power up sequence of speaker stereo device profile
To reduce the pops.

CRs-Fixed: 327943
CRs-Fixed: 329707
Signed-off-by: Santosh Mardi <gsantosh@codeaurora.org>
(cherry picked from commit 83cda7be04d041c6c003e8cf5fa8d7add91548d4)

Change-Id: Ice03506ce1f8d9c87da812c93a94da0ee6d617b2
Signed-off-by: Gopal G Goberu <ggober@codeaurora.org>
msm: audio: qdsp6v2: Fix memory leak and error handling

The error handling of apr_reset_workqueue and apr_reset_worker when
NULL should be two seperate checks and hence should have corresponding
appropriate log msgs.

Also there is no need to allocate memory for apr_reset_worker if
apr_reset_workqueue is NULL.

Signed-off-by: Shiv Maliyappanahalli <smaliyap@codeaurora.org>
Change-Id: I220a23729d0fc6dadce144e476a8b2af727fc6b6
(cherry picked from commit 1abc51555a2b51614682cec1e0c8959d5ed47d8d)
msm: audio: qdsp6v2: Fix noise issue while SSR

- When SSR is done, we hear an extra noise sound.
- During SSR, Q6 is stopped and AUDIOIF will send the
left over samples in DMA buffers continuously to codec
resulting in noise.
- Disable the active SND devices when SSR is initiated.
This will avoid any noise happening while SSR in progress.

CRs-Fixed: 333915
Signed-off-by: Laxminath Kasam <lkasam@codeaurora.org>
(cherry picked from commit 692c6543452fce8c2104b81cb03fe136e9b1a047)

Change-Id: Id4f63a2ac0f9a8150af23b8c3aa0d5c5935fce2a
Signed-off-by: Gopal G Goberu <ggober@codeaurora.org>
ASoc: msm: Improve error checking in code

Improve code by adding more error checking,
fixing case statments and removing unnecessary
logic.

Change-Id: Ic4d07f5dd9a7079248d8320fab95ee6f4d150b88
CRs-fixed: 344634
Signed-off-by: Ben Romberger <bromberg@codeaurora.org>
Get back some of overall ram :-)
ASoC: msm: Provide linear DSP volume

To give the higher resolution, provide the linear DSP volume gain
instead of percentage through ALSA mixer control

Change-Id: I2274a49d48126da9eecccb725ed604bd2fc2e3a5
CRs-Fixed: 389575
Signed-off-by: Ravi Kumar Alamanda <ralama@codeaurora.org>
Removed unused allowned warnings
Fix for gcc 4.6 warnings
Additional light levels