defconfig: Enable support for triple buffering

Change-Id: I6a852d3c7ab8797b208047a4ef195ebec09c3916
msm: kgsl: Wake up GPU only for touch events

Register the KGSL input event handler only for
touch input events to make sure input event handler
is called only for touch input events.

Change-Id: I68938fbbf870bd3bce83cb057b504674753d6de8
Signed-off-by: Ananta Kishore K <akollipa@codeaurora.org>
video: slimport: Fix the case of TV power off

When slimport is connected and TV is off.
slimport will keep seeking for hdmi connection and not notify it.
For the case of this, when connection lost,
Call power down and init, to initialize and wait for connection

Change-Id: I9bbf8b82d77ee69fb758adf8f1805fc88f17700a
Signed-off-by: Se Hun Kim <sean2.kim@lge.com>
video: slimport: Fix unblanced IRQ enable

If irq_enabled is set again, it causes the unblanced IRQ enable problem and
slimport would be not working properly. So if irq_enabled is set again,
In order to fix the problem, disable the irq and initialize the flags.

Change-Id: I27ad8ae7d553e515e15dd87744c221dbbb3a0717
Signed-off-by: Devin Kim <dojip.kim@lge.com>
video: slimport: Set/clear sp_tx_pd_mode in the power control function

sp_tx_pd_mode is the flag if tx power is down or not. So it should be
controlled in the power control function.

Change-Id: I394acbd6c6125dce8725aa81193b7be2abdf47b0
Signed-off-by: Devin Kim <dojip.kim@lge.com>
msm: mdss: hdmi: Ensure the audio has completed its processing

Before hdmi tx core is off, the audio should be completed its processing.

Change-Id: Ida370027fdcbf88fcbe6bc4ae9c2a48a5476e096
Signed-off-by: Devin Kim <dojip.kim@lge.com>
video: slimport: Do not access the sp registers after power down

The burst i2c errors sometimes causes a watchdog reset. The i2c errors
are caused by accessing the sp registers after SP is power down. So
do not access the sp register after power down to avoid the watchdog reset.

Change-Id: If64b0bf6f437292f356fa165d4203d522c26cfe6
Signed-off-by: Devin Kim <dojip.kim@lge.com>
ASoC: msm: qdsp6v2: Clear ION handle after freeing

Once ion memory is freed ion handle should be set to
NULL to avoid double free or any unintended access.
This change clears the ION handle after freeing up
the memory.

Change-Id: I37d76fe2641c111fa4376eff8f7e45f6795414ca
Signed-off-by: Gopikrishnaiah Anandan <agopik@codeaurora.org>
ASoc: msm: qdsp6: Add ultra low latency playback support

Using ULL further reduces continuous latency when
compared to the current low latency path.
This is achieved by having no post-processing in
the DSP along with smaller buffer sizes

Change-Id: I81cb10db575b0fd3405fe6d051ccce4f8496bb32
Signed-off-by: Aleksander Holynski <aholynsk@codeaurora.org>
Signed-off-by: Krishnankutty Kolathappilly <kkolat@codeaurora.org>
ASoC: msm: Fix playback failure on device switch during ULL playback

When a device switch happens for ultra low latency playback, we are
opening a regular playback COPP. ULL stream is routed to a non ULL
COPP. ULL stream can be only routed to a ULL COPP. This results in
playback failures. The fix is to use the perf mode flag as a
part of front end instead of back end dai.

Change-Id: I07f3f02b1414d2826a2f2d3f79b1bc0337cd3c32
Signed-off-by: Krishnankutty Kolathappilly <kkolat@codeaurora.org>
ASoC: msm: qdsp6v2: Set ADM sample rate to 48Khz for ULL

ULL copp can only operate at sample rate of 48Khz. BT SCO back end
sets sample rate is 8Khz. ADM open for  ULL fails when backend is
BT SCO. Set the sample rate to 48Khz when adm is opened for a ULL
device session.

Change-Id: I18f18466324eebf2a2c8884b6e531155707996f4
CRs-Fixed: 545401 545397
Signed-off-by: Krishnankutty Kolathappilly <kkolat@codeaurora.org>
ASoC: msm: qdsp6v2: Set ADM channel to max supported for ULL

ULL copp can only operate currently for 2 Channels.
ADM open for ULL fails for channel greater than 2 channels
Set the channel to max supported
when adm is opened for a ULL device session.

Change-Id: Ib47af5bca7461b935fae0f695b04767929bea925
Signed-off-by: Vimal Puthanveed <vimalp@codeaurora.org>
ASoC: msm: Add support for ASM loopback

Add ASM loopback driver. When audio path wants to use filters in DSP,
it will do a loopback in ASM.  The new ASM loopback driver enables
the loopback.

Change-Id: I3ddfbf0a1be5b3b1d37b47b44d321ea7da93da83
Signed-off-by: Damir Didjusto <damird@codeaurora.org>
Signed-off-by: Vimal Puthanveed <vimalp@codeaurora.org>
ASoC: qdsp6v2: Add support of ULL and LL

Add support for Low latency pcm and Ultra low latency pcm in
legacy pcm driver. A flag, part of device tree is used to
differentiate low latency and ultra low latency.
Only one ULL stream can be be connected to one ULL COPP.
LL stream can be connected to LL or regular COPP.

Change-Id: I2663ccdb641acc4117d1c0e424a57ed942e78f40
Signed-off-by: Krishnankutty Kolathappilly <kkolat@codeaurora.org>
ASoC: msm: Defer probe during sound card registration

ASoC framework returns probe defer when all the
components of the sound card are not registered.
MSM audio machine driver has to handle the probe
defer gracefully.

Change-Id: I39a65fe17c31205a9d8c3610fa0909fbf7891a83
Signed-off-by: Phani Kumar Uppalapati <phaniu@codeaurora.org>
ASoC: msm: q6: check upper bounds when copy ac3 params

Although AC3 maximum param size is fixed, better check upper bounds
when copy user data. It might cause overflow, possibly cause memory
corruption.

Change-Id: I2f7cec8edd9e013de1433ea06480b963ec307196
Signed-off-by: Fred Oh <fred@codeaurora.org>
ASoC: msm: Route low latency frontend to in-call music backend

Add routing controls to support routing of low latency stream
to in-call music delivery backend.

Change-Id: I5934f32fb4cbfb7f12a09e9bad76f370c3fd7fb7
CRs-fixed: 550396
Signed-off-by: Narsinga Rao Chella <nrchella@codeaurora.org>
ASoC: msm: Change acdb_mmap size variable to unsigned

The acdb_mmap fuction does a size calculation but
stores the result in an int which makes negitive
numbers possible. Changing the variable to unsigned
ensures that the size used is never out of bounds.

Change-Id: Ie3cf4c0a1037e7f5fef29b8301becc6c19200ed6
CRs-fixed: 548145
Signed-off-by: Ben Romberger <bromberg@codeaurora.org>
ASoC: msm: Add playback support for AC3/EC3 in compress driver

- Dolby DS1 supports both AC3 and EC3 playback in compress
  path. Add code in offload compress driver to support
  playback of AC3/EC3 formats.

Change-Id: I4fb5ee01c47dd7ac083c6180693b87e9fbb4fa0a
Signed-off-by: Mingming Yin <mingming@codeaurora.org>
ASoC: msm: Add PCM support in compress driver

PCM playback support is added to compress driver so that application
can use the single audio hardware device to play both compressed
and PCM audio.

Change-Id: Ie7719be8d7435088a7e4cfb5b817d4557e25e4c5
Signed-off-by: Dhananjay Kumar <dhakumar@codeaurora.org>