ALSA: core: add compress parameter definations

The patch adds the various definations used to define the encoder
and decoder parameters

Signed-off-by: Vinod Koul <vinod.koul@linux.intel.com>
Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Reviewed-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
base: genlock: Check for instances where handle is NULL

Check for the possibility of NULL handles passed into the
in-kernel API functions and return error where appropriate.
There is a non-zero chance that the private_data will be
cleared while the FD is still active, so check in the ioctl()
function as well.

CRs-fixed: 332835
Change-Id: Ic0dedbada2713080fef79ca188a87c578bec6d2f
Signed-off-by: Jordan Crouse <jcrouse@codeaurora.org>
base: genlock: Remove genlock_release_lock and associated ioctl

Allowing a lock to be asynchronously released while a handle
was still active turned out to be too dangerous to use in a
multi-threaded environment and it served no pratical
purpose anyway.  Handles now hold an attached lock until they
are destroyed.

CRs-fixed: 333141
Change-Id: Ic0dedbad8050ff01927ddb165c65a939bf297c10
Signed-off-by: Jordan Crouse <jcrouse@codeaurora.org>

Conflicts:
	Documentation/genlock.txt
base: genlock: Use a signed long for the result from wait_timeout

interruptible_wait_timeout returns a signed long, so make sure that
we use a signed long to hold the result. Using an unsigned value would
horribly misinterpet an error such as -ERESTARTSYS.

CRs-Fixed: 341347
Change-Id: Ic0dedbadff2dbe404e68a2a78f6282b5976d05c1
Signed-off-by: Jordan Crouse <jcrouse@codeaurora.org>

Conflicts:
	drivers/base/genlock.c
base: genlock: allow synchronization with a single gralloc handle

In order to support synchronization in a process with a single
gralloc handle we require the ability to write lock a buffer
while it is already read locked by the same handle. This change
extends the concept of an exclusive write lock or recursive read
locks to a genlock handle (rather than the genlock lock).
Genlock cannot provide deadlock protection because the same
handle can be used simultaneously by a producer and consumer.
In practice an error will still be generated when the timeout
expires.

CRs-fixed: 356263
Change-Id: I322e7fadc8b43287f53b211242b176d3de731db2
Signed-off-by: Jeff Boody <jboody@codeaurora.org>
base: genlock: remove BIT macro usage

The BIT macro is not defined for !_KERNEL_ resulting in compile errors.

CRs-fixed: 356263
Change-Id: Ib2acd913033fccca63716d6585a51707c72debf0
Signed-off-by: Jeff Boody <jboody@codeaurora.org>
base: genlock: protect kref counting with spinlock

A race condition exists where the attach may not kref_get
before the kref_put finished. The genlock_file_lock was
originally added to protect against this case however it
was not protecting the kref.

CRs-fixed: 359649
Change-Id: Iab1fc847c2d3357ec1be79b7cc3e004643126dec
Signed-off-by: Jeff Boody <jboody@codeaurora.org>
base: genlock: add magic to protect attach from non-genlock file

It is possible for user space to attempt to attach a valid fd that
does not correspond to a genlock file. This change adds a magic to
the kernel private data that is used for validation.

CRs-fixed: 359649
Change-Id: Idb16056ba0f89b7d519d501f5b1ce6d5d930ed70
Signed-off-by: Jeff Boody <jboody@codeaurora.org>
msm_fb: display: add ioctl for mixer info

Add new ioctl to allow user to query mdp mixer detail configuration.

Signed-off-by: Kuogee Hsieh <khsieh@codeaurora.org>

Conflicts:
	drivers/video/msm/mdp4_overlay.c
	include/linux/msm_mdp.h
msm: rotator: add downscale support in rotator

Rotator is capable of performing 1/2, 1/4 and 1/8 down scaling. Add
downscale_ratio parameter to provide support for this feature.

CRs-Fixed: 315874
Change-Id: I57dc3456ccc9bec2a125750b3e9909ffcbaf45f6
Signed-off-by: Adrian Salido-Moreno <adrianm@codeaurora.org>
msm: rotator: Fix rotator YCrCb planar formats unexpected output

Rotator expects planar input in YCbCr order, wrong color can be seen
on ouput image when given YCrCb because the chromninance planes picked
are not correct. Swap Cb and Cr plane addresses to output correct image.

Change-Id: Ia05ab704d18da4aac49e63fb805c40a95ea51a33
CRs-Fixed: 327956
Signed-off-by: Adrian Salido-Moreno <adrianm@codeaurora.org>
msm: rotator: Add bus scaling support

Add bus scaling support to rotator driver

Change-Id: I53faf6070a9dc6d6359b6d58cb7cb618217ee8c0
Signed-off-by: Nagamalleswararao Ganji <nganji@codeaurora.org>
msm: rotator: Add pseudo-planar output for interleaved format.

Rotator gives pseudo-planar H2V1 output for interleaved
H2V1 input format.

Change-Id: I2a7af3243dfb1175ea14d6649b4cec87029fec38
Signed-off-by: Mayank Chopra <makchopra@codeaurora.org>
msm_rotator: add rotator ref count to cleanup code

Perform cleanup of rotator sessions only if reference count reaches 0,
this avoids closing rotator sessions from sibling threads.

Change-Id: I83add90cc04faa90c372dde09a096c7a07be528a
Signed-off-by: Adrian Salido-Moreno <adrianm@codeaurora.org>
msm_fb: display: Fix color swap issues in MDP4 and Rotator drivers

Many of MDP input formats don't have correct unpack pattern, so image
displayed on screen is not in the actual format set. Also,Some rotator
output formats differ from input, these mappings used to be handled in
userspace, but to avoid issues this is now done in driver. For YCrCb planar
inputs chrominance order is dependent on rotator hardware version. Add
hardware check to swap Cb and Cr for 7x30 and 8x60 rotators.

CRs-fixed: 339114
CRs-fixed: 337040
Change-Id: I55691aa7c9d38e83e4fc63a162ffb23959ba30c1
Signed-off-by: Mayank Chopra <makchopra@codeaurora.org>

Conflicts:
	drivers/char/msm_rotator.c
	drivers/video/msm/mdp4_overlay.c
msm: rotator: add YUV444 interleave format support

Add support for H1V1 interleave (YUV444) to rotator

Change-Id: I772ff1823e3c9acf046d339c3a1eeb1ab324b279
Signed-off-by: Kyong Hwa Bae <kbae@codeaurora.org>
Signed-off-by: Adrian Salido-Moreno <adrianm@codeaurora.org>
msm: rotator: add YUV444 interleave format support

Add support for H1V1 interleave (YUV444) to rotator
in msm_rotator_get_plane_sizes().

Change-Id: I57ff5236b7e9329b72f9983da9874de938a821a2
Signed-off-by: Kyong Hwa Bae <kbae@codeaurora.org>
msm: rotator: Call S/W reset on AXI bus error interrupts

Call Rotator S/W Reset when AXI bus error interrupts are
seen during a rotate request

CRs-fixed: 341947
Change-Id: Iab64a79829ca93019cfd54505014ed168cf74464
Signed-off-by: Ravishangar Kalyanam <rkalya@codeaurora.org>
msm: display: Add rotator bus scaling vectors for 8660/8960

Add rotator bus scaling vectors for 8660 & 8960 targets

Change-Id: I9590fff72a57687b110355e3862d5ac5cf61e0cc
Signed-off-by: Nagamalleswararao Ganji <nganji@codeaurora.org>

Conflicts:
	arch/arm/mach-msm/board-8960-display.c
	arch/arm/mach-msm/board-msm8x60.c
	arch/arm/mach-msm/devices-8960.c
msm_fb: display: add YUV444 interleave format support to mdp

Add support for H1V1 interleave (YUV444) to mdp

Change-Id: I86b76831ad87dede90ddd8d8f5ae64e51fa28c27
Signed-off-by: Kyong Hwa Bae <kbae@codeaurora.org>
Signed-off-by: Adrian Salido-Moreno <adrianm@codeaurora.org>

Conflicts:
	drivers/video/msm/mdp4_overlay.c