SoC: msm: qdsp6v2: return DEFER code when probe is not done

Probe may not be done when first alloc api is called. Need to return
DEFER error so that client can try later.

Change-Id: I4aa8da928aa2b9f6d22ad9aaae9a8cb27b93d424
Signed-off-by: Fred Oh <fred@codeaurora.org>
Soc: msm: qdsp6v2: Fix invalid params handling

Alloc and free apis should sanity check all input params.
If allocation fails set client and ion handle to NULL.

Change-Id: Ide3bd782eb90ee8b033e39de232929a1ca7174b7
Signed-off-by: Gopikrishnaiah Anandan <agopik@codeaurora.org>
msm: audio: qdsp6v2: 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: Iffd9c1440d2f28b703a77993fdbb3ccd18f30694
CRs-fixed: 548145
Signed-off-by: Ben Romberger <bromberg@codeaurora.org>
msm: audio: qdsp6v2: Zero the cfg stack var

Write zeroes into the stack variable cfg to ensure
no previously written stack data is sent to
user-space.

Change-Id: Ie571949e3613c9e5a916b23e1dc19605496d9dbf
CRs-Fixed: 551574
Signed-off-by: Kenneth Westfield <kwestfie@codeaurora.org>
msm: audio: qdsp6v2: memeset msm_audio_stats to zero

memeset msm_audio_stats to zero before copying to user space.

Change-Id: I5f47bf85e36d46f726dddae68962a3d1cd06213b
CRs-fixed: 549307
Signed-off-by: Kiran Kandi <kkandi@codeaurora.org>
ASOC: qdsp6: Add pause/resume support for AAC encoder

-  If session is stopped, AUDIO_START should
   trigger session to be started again. This way
   pause/resume becomes stop/start for AAC encoder.

Change-Id: Id44a5342bb90b049d9c617ede60bf41a5289c581
Signed-off-by: Sharad Sangle <assangle@codeaurora.org>
msm: qdsp6v2: memset stack buffer allocation.

This is needed to avoid garbage data in uninitialized variables.

Change-Id: I20e56ee32d3b9d1eecc4fa7761ff164a210fbbde
CRs-Fixed: 561611
CRs-Fixed: 561615
Signed-off-by: Mohammad Johny Shaik <mjshai@codeaurora.org>
msm: soundrecorder: Add support for pause/resume in HW AAC mode

- Use "stopped" notification to indicate pause/resume. This avoids
  null pointer exception while playing a recently recorded file

Change-Id: Ie5782381e816f76c34677e5863c9849609089eba
Signed-off-by: quic_mqiu <quic_mqiu@codeaurora.org>
msm: qdsp6v2: Deleting kernel driver from arch/arm/mach-msm

Drivers are registering under misc driver but exists under arch/arm/mach

Change-Id: I6210ed2ffbc38608914fb765b8e50ac6d97950ff
CRs-Fixed: 554492
Signed-off-by: Asish Bhattacharya <asishb@codeaurora.org>
Signed-off-by: Mohammad Johny Shaik <mjshai@codeaurora.org>
ASoc: msm: qdsp6v2: add vm page offset validation

Lack of range validation can lead wrong mapping or expose arbitrary
memory page to userspace

Change-Id: I8c6eb1b7255d444bffd9d3748ca4815b11bdf16a
Signed-off-by: Fred Oh <fred@codeaurora.org>
Soc: msm: qdsp6v2: Fix invalid params handling

when ion_import_legacy api fails then we should not
call ion_free as the handle returned is not proper to
dereference so instead just destroy the ion client and
bail out.Sanity checks for all the input params is also
added.

Change-Id: I6c51986bf2ce334ff7405e38a12c1c1db50e2417
Signed-off-by: Gopikrishnaiah Anandan <agopik@codeaurora.org>
Signed-off-by: Anish Kumar <kanish@codeaurora.org>
msm: qdsp6v2: Deleting kernel driver from arch/arm/mach-msm/qdsp6v2

Driver is registering under misc driver but exists under arch/arm/mach

Change-Id: I0930d3f56767569edefa1af3c7d45a724a219ce3
CRs-Fixed: 548017
Signed-off-by: Mohammad Johny Shaik <mjshai@codeaurora.org>
ASoC: msm: Change RTAC to use ION memory

Change the RTAC driver to use shared memory for
Q6 communication. This is needed for calibration
parameters that use more then 4k of memory.

Change-Id: Ic6bdbeac04cc73e42139510c66a9ba919280c87a
Signed-off-by: Ben Romberger <bromberg@codeaurora.org>
msm: audio: qdsp6v2: disable read interrupts for smd channels

SMD channels are configured to send interrupts when the remote end
reads from the channels. Disable this behavior to reduce number
of interrupts.

Change-Id: Idc6e57a68741dd6e52f0f1be57b8c85c586df59f
Signed-off-by: Panwar Vivek <vpanwa@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>

Conflicts:
	sound/soc/msm/qdsp6v2/Makefile
	sound/soc/msm/qdsp6v2/msm-compress-q6-v2.c
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>

Conflicts:
	sound/soc/msm/qdsp6v2/Makefile