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>
ASoC: msm: Add check for NULL pointer and buffer overflow

Changes to add check for NULL pointer before they
get dereferenced and check for buffer overflows
to ensure out of bound indexes of arrays are not
accessed.

CRs-fixed: 628847 628850
Change-Id: I3fcebe07a7f9e7ff480857480fa0df2ada017c69
Signed-off-by: Aravind Kumar <akumark@codeaurora.org>
ASoC: msm: Send endpoint parameters for DDP decoder

DDP decoder requires end point parameters to be configured or
updated based on the input clip configuration or as updated by
the user through set parameter. Add support for the same

Change-Id: I1d331b4be27d67e1da5b3a03cfaff161e5fd1550
Signed-off-by: Subhash Chandra Bose Naripeddy <snariped@codeaurora.org>
ASoC: msm: ensure check before accessing session private data.

The compressed session needs to be active to set volume to dsp.
Ensure the check to see valid session exist before accessing
private data, else results in kernel panic.

The Memory allocation for driver data also needs to be freed
for failure in session open.

CRs-Fixed: 638817
Change-Id: Ifdce543aa55df420960e9eeff0564f18d9410060
Signed-off-by: Asish Bhattacharya <asishb@codeaurora.org>
ASoC: compr: Disable soft-pause for compress playback

Soft-pause (i.e pause ack after a timeout) adversely affects
audio/video sync during pause/resume use cases leading to some
frame drops. Disable this feature for compress playback.

Change-Id: I3ce444dadf1e4b94c1e8d6f017a1c639b082285f
Signed-off-by: Haynes Mathew George <hgeorge@codeaurora.org>
CRs-Fixed: 636328
msm: compr: Use irq{save/restore} version of spinlock

compress driver event handler uses spin_lock/unlock APIs.
It should be sufficient to use the irq{save/restore} versions.

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

Conflicts:
	sound/soc/msm/qdsp6v2/msm-compress-q6-v2.c
asoc: msm: Resync with upstream

 * Remove HTC's weird flush/drain handling, it's incompatible with
   our userspace.
 * Resync with upstream, keep HTC-specific features.

Change-Id: I1e0491a1b1b17801af21bc0b485aa2f6a831b68e

Conflicts:
	sound/soc/msm/qdsp6v2/msm-compress-q6-v2.c
Copy audio_effects.h to userspace

Change-Id: Idce1c1e51b80ae58cfd663376a41cb37a0649f5b
wcnss: Configure WLAN MAC addr through user control interface

wcnss userspace service will use user control interface to configure
certain parameters required by wcnss driver. This interface is required
to configure the WLAN MAC address. These parameter was earlier written
thru module parameters from wcnss service, however that required the
wcnss userspace daemon to have the root permission.

Change-Id: I6e928a44c7f1f9ba7ab193c882bad102d8c2bd5a
CRs-fixed: 636953
Signed-off-by: Hardik Kantilal Patel <hkpatel@codeaurora.org>
stereo call recording support

Patch that allows for call recording in
stereo (left channel: TX; right channel:
RX). Tested on Nexus 5 (MSM8974). Likely
works on other recent MSM chipsets as
well.

Change-Id: I934c252283d1346f9c1f6cf786ce2f661f20a049
msm: kgsl: Enable protected mode for A3XX

Enable protected register mode for A3XX with these commits from
msm-3.10:

msm: kgsl: Enable protected register mode for A3XX
msm: kgsl: Print the register that causes a protected mode error
msm: kgsl: Unprotect the VBIF performance counters

Signed-off-by: Jordan Crouse <jcrouse@codeaurora.org>

Conflicts:
	drivers/gpu/msm/adreno.h
	drivers/gpu/msm/adreno_a3xx.c

Change-Id: Idfdc67e63422a4b55e59303c11ac8e376ab523e4
msm: kgsl: Protect SMMU registers from being written by the GPU

Put the SMMU register range in protected mode to shield them from
IB1/IB2 writes from userspace.

Change-Id: I499e66abfb81b45e43542d43db141f0f08461378
CRs-Fixed: 599971
Signed-off-by: Jordan Crouse <jcrouse@codeaurora.org>
msm: kgsl: Mark the IOMMU setstate memory as read only

Mark the IOMMU setstate memory as read only in the pagetable.

Change-Id: Id427be448549ffcd737bbc39aec7ace5a0417b8e
Signed-off-by: Jordan Crouse <jcrouse@codeaurora.org>
msm: kgsl: Protect CP_STATE_DEBUG_INDEX

Put CP_STATE_DEBUG_INDEX and CP_STATE_DEBUG_DATA under protection
to keep it from being written from an IB1. Doing so however opens
up a subtle "feature" in the microcode: memory read opcodes turn off
protected mode in the microcode to do the read and then turns it
back on regardless of the initial state. This is a problem if the
memory read happens while protected mode is turned off and then we
try to access a protected register which then complains and goes boom.

To account for this irregularity explicitly turn back off protected
mode in all the places where we know this will be a problem.

Signed-off-by: Jordan Crouse <jcrouse@codeaurora.org>

Conflicts:
	drivers/gpu/msm/adreno.c

Change-Id: I497122e5e848998d8ee76c7b3687c15515237baf
config dump

Signed-off-by: Willi Ye <williye97@gmail.com>