ASoC: msm: Reset the stream open flag after CMD_CLOSE is sent to DSP

In case of gapless playback, driver does not wait for EOS. CMD_CLOSE
for stream one or two can be called from compress driver free before
EOS ACK for stream one is received. This can result in CMD_CLOSE to
be sent for already closed stream. Reset the stream open flag after
CMD_CLOSE is sent to DSP to prevent multiple CMD_CLOSE on same
stream.

Change-Id: Ic186ae37a760a2996ebd7b9b5dc5d5846621ab66
Signed-off-by: Krishnankutty Kolathappilly <kkolat@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>
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>
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
Copy audio_effects.h to userspace

Change-Id: Idce1c1e51b80ae58cfd663376a41cb37a0649f5b
Merge changes Idce1c1e5,I1e0491a1,I8f32c689,I3ce444da,Ifdce543a,I1d331b4b,I3fcebe07,Ie7719be8,Ic186ae37 into cm-11.0

* changes:
  Copy audio_effects.h to userspace
  asoc: msm: Resync with upstream
  msm: compr: Use irq{save/restore} version of spinlock
  ASoC: compr: Disable soft-pause for compress playback
  ASoC: msm: ensure check before accessing session private data.
  ASoC: msm: Send endpoint parameters for DDP decoder
  ASoC: msm: Add check for NULL pointer and buffer overflow
  ASoC: msm: Add PCM support in compress driver
  ASoC: msm: Reset the stream open flag after CMD_CLOSE is sent to DSP
Merge branch 'cm-11.0' of github.com:CyanogenMod/android_kernel_htc_msm8974 into HEAD