msm: qdsp6v2: Reduce the step size of soft volume and soft pause.

With current step size, as there is raise in amplitude levels
abruptly, quality issues are observed. Reduce the step size to
zero to improve the performance.

Change-Id: Id0372a75736b610946a1ff53b4947e19ed62d400
CRs-fixed: 360715
Signed-off-by: Deepa Madiregama <dmadireg@codeaurora.org>
msm: audio: qdsp6v2: Fix ADM RTAC

Use the COPP ID instead of AFE index in the
token field of APR packet so the callback is not
rejected.

Change-Id: I88c325acfa9a5042409b2954acdbef970aea8a8e
CRs-fixed: 351089
Signed-off-by: Ben Romberger <bromberg@codeaurora.org>
ASoc: msm: Refactor some codec functionality into separate files

- Add all codec driver common functionality in common file.
- Add separate files for codec drivers callback function
definitions to make it platform dependent.

Change-Id: I64665fcb420f9c7f3fa4bfdd2e7356347d7c48b2
Signed-off-by: Harmandeep Singh <hsingh@codeaurora.org>
ASoc: msm: Add support for AAC and WMA decoders.

Add support for AAC and WMA decoders.

Change-Id: Iba66fdf71e852387015a0d03d0f1f9b5a0f09682
Signed-off-by: Harmandeep Singh <hsingh@codeaurora.org>
msm: audio: qdsp6v2: Resolve panic for voip call scenario

- While in a voip call, when receive another voip call
observe kernel panic in voice cal API.
- In this second call, even though first voip call
deregister memory but acdb block cal sizes are not
reset leading to overflow in size and panic at memcpy
in voice calibration API.
- While deregister memory in ACDB, reset the ACDB cal
sizes of all blocks to zero.

Change-Id: I49aeb821f461c6c00e25eb10cec1acd31a943253
Signed-off-by: Laxminath Kasam <lkasam@codeaurora.org>
msm: audio: qdsp6v2: Fix voice RTAC.

There was data type mismatch which caused the corruption during
memory copy. It leads to the voice RTAC failure.

CRs-Fixed: 391392
Signed-off-by: Jayasena Sangaraboina <jsanga@codeaurora.org>
(cherry picked from commit 823fd65d9eef2f728b343fe0e891122f226b887e)

Signed-off-by: Sudhir Sharma <sudsha@codeaurora.org>
(cherry picked from commit 0ce787caa67c0c215edde3be28b578c183a6f337)

Change-Id: I19c000d2c5bc3e08a57be6e4e4036b37140badbf
Signed-off-by: Sudhir Sharma <sudsha@codeaurora.org>
msm: audio: qdsp6v2: Set end of frame flag to avoid aac multiseek issue

- During aac playback, multiple seek lead to target freeze.
- DSP starts decoding when internal buffer size maximum is
  reached, hence, if there are corrupted frames in that buffer,
  the entire set will not be decoded. This results in target freeze.
- Fix is to set the end of frame flag in the buffers that
  are sent to DSP for decoding.

(cherry picked from commit 08508ac42fed7b1e3a7a9b7e098dfb4ceff8b836)

Signed-off-by: Swaminathan Sathappan <Swami@codeaurora.org>

Change-Id: Ic34272222dcb1df42d7e2fe5d028d513b8cf452f
Signed-off-by: Neha Pandey <nehap@codeaurora.org>
arm: msm: qdsp6v2: update to finite loop

The reason why the original code requires infinite loop
cannot be accounted for. However, it seems reasonable to
wait for 10 minutes.

Change-Id: I057f7ac8a83585abbc4ccd63a721df82f71ea045
Signed-off-by: Patrick Lai <plai@codeaurora.org>
arm: mach-msm: qdsp6v2: update dual mono setting check

AUDIO_AAC_DUAL_MONO_PL_PR is 0 anyway and dual mono
setting is defined as unsigned value. Hence,
there is no need if new setting is less than
AUDIO_AAC_DUAL_MONO_PL_PR.

Change-Id: I2e18a875e211d05d100d827fcd5b67545de168ac
Signed-off-by: Patrick Lai <plai@codeaurora.org>
arm: mach-msm: qdsp6v2: remove unnecessary write count check

write count is never going to be negative value

Change-Id: Ie9468d4fbcccb2b7df87cbb67d0a911e584c8e62
Signed-off-by: Patrick Lai <plai@codeaurora.org>
msm: audio: qdsp6v2: Add NULL checking for input parameters

Add checking for NULL. Two parameters shouldn't be NULL.

Change-Id: Ied9e9e6238f6498305844bf3a08370c7cf751fc7
Signed-off-by: Fred Oh <fred@codeaurora.org>
msm: audio: qdsp6v2: Fix seek issue in tunnel player

- Seeking to 0 position during tunnel playback, music stream
  jumps to incorrect postion.
- Initial buffer after seek to new position is corrupted as
  flush ioctl is not synchronous. Ioctl FLUSH is posting
  CMD_FLUSH to DSP, but WRITE_DONE to user space are posted
  even before it receives FLUSH ack from DSP.
- Fix is to wait for FLUSH ack from DSP, then post the
  WRITE_DONE events to user space, which will ensure FLUSH
  is completely handled.

CRs-Fixed: 425420,458910
Change-Id: Ieca3353dba3a67af39a2967659034f073acf5277
Signed-off-by: Deepa Madiregama <dmadireg@codeaurora.org>
msm: audio: qdsp6v2: Fix for kernel crash during stability

- Userspace calling AYSN_READ during flush, READ_DONE ack for
  this is coming after FLUSH_DONE which is hitting BUG_ON as
  buffers are removed from in_queue/out_queue during flush.
- Fix is to avoid sending READ requests to DSP until flush
  is complete.

CRs-Fixed: 485288
Change-Id: Ia2a64471a3507b3f5565b695c40cc6dd9081930d
Signed-off-by: Deepa Madiregama <dmadireg@codeaurora.org>
msm: Adjust ION audio carveouts

 * Set to the correct size in order to use DirectTrack

Change-Id: I8bd66d75a2be9db3022cc40667ba702f79a808ef
cm: Update defconfigs, enable SELinux

Change-Id: I2a5e1e2fd8e5b486fbe285d6648c1614af2fc2f5

Conflicts:
	arch/arm/configs/cyanogenmod_hercules_defconfig