platform: qpnp-power-on: Log the PMIC power-on reason

Indicate the reason which triggered a power-on of the PMIC.
This is useful information during the boot sequence.

Change-Id: If548c969968f36ddf3d9cb93f0b0e07237f80ee1
Signed-off-by: Anirudh Ghayal <aghayal@codeaurora.org>

Conflicts:

	drivers/platform/msm/qpnp-power-on.c

Signed-off-by: Ajay Dudani <adudani@codeaurora.org>
Signed-off-by: Patrick Tjin <pattjin@google.com>
msm: qpnp-power-on: Initialize earlier

Some drivers need to use qpnp-power-on functionality ealier. So initialize
this earlier for that.

Change-Id: Ia555a2876acf3d1cb4046d9fe2262567bdb4610a
Signed-off-by: darren.kang <darren.kang@lge.com>
Signed-off-by: Devin Kim <dojip.kim@lge.com>
msm: qpnp-power-on: Remove the wakelocks

Change-Id: I1a11903c9bda682ffce18ba4c852a71554bb26fe
ARM: Use -mcpu=cortex-a15 when targeting MSM Krait CPUs

Enable compiler optimizations specific to the Cortex-A15
processor when targeting MSM Krait CPUs. This is necessary
take advantage of the UDIV/SDIV instructions supported by
these processors. To accomplish this, we need to remove the
-march=armv7-a ISA restriction from the compiler options
because 'cortex-a15' is a superset of 'armv7-a'.

Change-Id: I6215aecc11fb4f77c971de7b84f68649ef234357
Signed-off-by: Stepan Moskovchenko <stepanm@codeaurora.org>
sync: Limit logging to particular fence on timeout and error

Signed-off-by: Prabhat Awasthi <pawasthi@codeaurora.org>
Change-Id: I5bd7d62260666cdd2a32212f0e828d2d5d7d7bba
sync: signal pt before sync_timeline object gets destroyed

There is a race condition

Assume we have *one* sync_fence object, with *one* sync_pt
which belongs to *one* sync_timeline, given this condition,
sync_timeline->kref will have two counts, one for sync_timeline
(implicit) and another for sync_pt.

Assume following is the situation on CPU

Theead-1 : (Thread which calls sync_timeline_destroy())
  -> (some function calls)
   -> sync_timeline_destory()
    -> sync_timeline_signal() (CPU is inside this
function after putting reference to sync_timeline)

At this time Thread-2 comes and does following

Thread-2 : (fclose on fence fd)
> sync_fence_release() -> because of fclose() on fence object
 -> sync_fence_free()
  -> sync_pt_free()
   -> kref_put(&pt->parent->kref, sync_timeline_free);
    -> sync_timeline_free() (CPU is inside this because
this time kref will be zero after _put)

Thread-2 will free sync_timeline object before Thread-1
has finished its work inside sync_timeline_signal.

With this change we signals all sync_pt before putting
reference to sync_timeline object.

Change-Id: I66d7359cc5dca0352fda49f81953028e98b95993
Signed-off-by: Prakash Kamliya <pkamliya@codeaurora.org>
Signed-off-by: Hareesh Gundu <hareeshg@codeaurora.org>
Input: Propagate hardware event timestamp to evdev.

Convey hardware timestamp associated with the current event packet.
The use of these event codes by hardware drivers is optional.
Used to reduce jitter and improve velocity tracking in ABS_MT devices.

Change-Id: I89f3a958944f6a2979964ee372e61bad448061b6
Signed-off-by: Sasha Levitskiy <sanek@google.com>
Input: Add enabled device attribute

Allows closing the hardware device while the input device is open.

cherry-picking from android-exynos-manta-3.4-jb-mr1.1
commit id 8da9e5fe1e25de1cb9ab8d2d74f4d7fff8d7a220

Change-Id: I91b6e24f14b3334d17bfe8e5f86d2b33c85e1ea1
Signed-off-by: Arve Hjønnevåg <arve@android.com>
Input: Set users to 0 when an input device is disabled though sysfs

Some drivers check dev->users suspend and resume. If the device
was turned off with the sysfs hook, it should not turn back on
in resume.

cherry-picking from android-exynos-manta-3.4-jb-mr1.1
commit id ebdfb336782deafee6667730c1ca1b3c1fbd551e

Change-Id: Iff17fdac307ec9c27744ac886f9dc94aac665c80
Signed-off-by: Arve Hjønnevåg <arve@android.com>
Linux 3.4.76
ASoC: msm: qdsp6v2: fix the crash issues due to NULL pointer

If adsp subsystem restart happens, ac and apr handles are not valid
any more. While recovering subsystem restart and reassign proper
handles protection from accessing NULL pointer is required.

CRs-fixed: 513414
Change-Id: Idb60d3504a37c0de708846a4f8517f9d75eb9078
Signed-off-by: Fred Oh <fred@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: qdsp6: Add support for gapless audio playback

Update ASM driver to support for gapless audio playback in
tunnel mode.

Change-Id: Id1f25afef25b3636fb50dc08b5feb803150d1b59
Signed-off-by: Ravi Kumar Alamanda <ralama@codeaurora.org>
Signed-off-by: Subhash Chandra Bose Naripeddy <snariped@codeaurora.org>
ASoC: msm: Add support for gapless audio playback

Update compress driver to enable gapless mode in DSP to
achieve gapless audio playback in compress offload mode.

Change-Id: I212178025996f28ff5a3ddc361ceb7bd70b5d192
Signed-off-by: Subhash Chandra Bose Naripeddy <snariped@codeaurora.org>
Signed-off-by: Ravi Kumar Alamanda <ralama@codeaurora.org>
ASoC: qdsp6: Add support for custom topology

Update ASM driver to send commands to DSP to enable
custom topology for enabling audio post processing
effects in POPP.

Change-Id: Ic222b5045820ebabb79148c8e51f5fd90fcd1410
Signed-off-by: Subhash Chandra Bose Naripeddy <snariped@codeaurora.org>
Signed-off-by: Ravi Kumar Alamanda <ralama@codeaurora.org>
ASoC: qdsp6: Add support for audio post processing effects

Add interface to support configuring equlaizer, bass boost,
virtualizer and reverb effects in DSP for tunnel mode of
playback.

Change-Id: Ie1512e340315302691327b6379a0935170dc57a7
Signed-off-by: Subhash Chandra Bose Naripeddy <snariped@codeaurora.org>
Signed-off-by: Ravi Kumar Alamanda <ralama@codeaurora.org>
ASoC: msm: Add support to enable audio post processing in DSP

Add interface to support configuring equlaizer, bass boost,
virtualizer and reverb effects in DSP for tunnel mode of
playback.

Change-Id: I5ed578df1e1cb860734d2205c0895e82cfbdfbfc
Signed-off-by: Subhash Chandra Bose Naripeddy <snariped@codeaurora.org>
Signed-off-by: Ravi Kumar Alamanda <ralama@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: Enable initial/trailing silence removal

For gapless audio playback, the DSP HW decoder needs to
remove the initial and trailing samples from the decoder
output according to meta data present in the stream. This
change is to enable the silence removal by sending the
meta data down to DSP.

Change-Id: I8f9d5d64fee5874ef1eb2aba2ae38730cfe3e9bb
Signed-off-by: Ravi Kumar Alamanda <ralama@codeaurora.org>
ASoC: msm: Handle RESET_EVENTS in compress driver

Listen for RESET_EVENTS message in the q6asm callback and move
compress driver to an error state. All ops except free() are rejected
in this state.

Change-Id: Id12dba9e3a40b01f02e516857cb32af8f9e4cb60
Signed-off-by: Haynes Mathew George <hgeorge@codeaurora.org>