ALSA: core: add makefile and kconfig file for compress

Signed-off-by: Vinod Koul <vinod.koul@linux.intel.com>
Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
ASoC: msm: Updated the period size of Multichannel driver.

Upadate the multichannel driver period size to accomodate the
8 channels with 1536 bytes for each channel in HDMI IN use case.
Update the channels of wma according to the structure populated
by the HAL

Signed-off-by: Aviral Gupta <aviralg@codeaurora.org>
(cherry picked from commit 572d504a7a57d521bd5a823a3bb8a443ac34842a)
(cherry picked from commit a955dd94918bc4241d28053d8f6587b1c055238a)

Change-Id: Id043cbf07ff1b8a80ac0961ddeff0c1d3ff1283b
Signed-off-by: Sudhir Sharma <sudsha@codeaurora.org>
ASoC: msm: Remove the check to break when the app not ready with data.

When the Application pointer is same as hardware pointer, the dequeing
from DSP chain will be broken to start the session again there should
be trigger called explicitly from the user space, to avoid resending
the trigger command from the user space.

Signed-off-by: Santosh Mardi <gsantosh@codeaurora.org>
(cherry picked from commit 5bb19ee2b22ca42e708da052517853496fc5b98d)
(cherry picked from commit d5d591f945b25b82a7177a6b466387fbc9b1bf93)

Change-Id: I42bb47de76e3f9368188161b5a1a71734fec3b6e
Signed-off-by: Sudhir Sharma <sudsha@codeaurora.org>
ASoC: msm: implement drain command in compress platform driver

Currently, at the end of compress audio playback, session is
terminated without ensuring compressed audio stream is completely
rendered. Use ioctl drain to drain out all the data before EOS is
signalled and session is closed. This is to make sure all the
data is played out by DSP.

CRs-Fixed: 390897
Change-Id: I3e39b210a8924180de9eb4453c6f6f6435ded0ee
Signed-off-by: Krishnankutty Kolathappilly <kkolat@codeaurora.org>

Conflicts:
	sound/core/pcm_native.c
	sound/soc/msm/msm-compr-q6.c
ASoc: msm: Add amr-wb/wb+ tunnel playback support

Update compress audio platform driver
to support amr-wb/wb+ tunnel mode playback.

Change-Id: I98d087db490441c57c8e2d4fe03a7e91b28e67fc
Signed-off-by: Ajit Khare <ajitk@codeaurora.org>

Conflicts:
	sound/soc/msm/msm-compr-q6.c
	sound/soc/msm/qdsp6/q6asm.c
ASoC: msm: Register restart api for under run issue.

Update compressed platform driver to register an restart callback.
Implementation of the restart callback is to issue an pending buffer
Written by application to restart the session when  the de queue
Process is stopped due to underrun issue.

Restart callback is triggered from the ALSA core framework when
Framework detects that the render stopped pulling the data
And application is writtig the data.

This callback will be running in atomic context.

Change-Id: Iada382f39bd052beeb0b1d165959d510fa51ff7c
Signed-off-by: Santosh Mardi <gsantosh@codeaurora.org>

Conflicts:
	sound/soc/msm/msm-compr-q6.c
ASoC: msm: proper error code for drain ioctl

If a drain ioctl on a compressed driver has been interrupted
by a reset ioctl, we need to return a proper error code for the
drain ioctl

Change-Id: I15f42a22b1cc13b3a0e2ae873adfcd1db2ac1e53
Signed-off-by: Haynes Mathew George <hgeorge@codeaurora.org>
CRs-Fixed: 445370

Conflicts:
	sound/soc/msm/msm-compr-q6.c
	sound/soc/msm/msm-pcm-q6.h
ASoC: msm: Allow drain only if a write was called

For compressed drivers, allow the drain ioctl only if
there are pending writes. Return a proper error (-EWOULDBLOCK) otherwise.

Change-Id: I4799351a8930c44d88d6968802df98896fc1531a
Signed-off-by: Haynes Mathew George <hgeorge@codeaurora.org>
CRs-Fixed: 445370
ASoC: msm: avoid negative time stamp check

Time stamp is unsigned. There is no need to check for
negative value.

Change-Id: I15e380f81e46908f6a9fe8d29c174de1b7c33173
CRs-fixed: 423372
Signed-off-by: Patrick Lai <plai@codeaurora.org>

Conflicts:
	arch/arm/mach-msm/qdsp6v2/audio_lpa.c
	include/sound/q6asm-v2.h
	sound/soc/msm/qdsp6v2/msm-compr-q6-v2.c
	sound/soc/msm/qdsp6v2/msm-pcm-lpa-v2.c
	sound/soc/msm/qdsp6v2/q6asm.c
ASoc: msm: update the pending buffer flags in underrun

Update the pending buffer flag on a driver underrun.
This causes a drain call to be rejected if the underrun
happens immediately after an EOS buffer has been given to the DSP
following a flush

CRs-Fixed: 463332
Change-Id: I2ba224a49e5af14ca909300afc0788cb4b21eb16
Signed-off-by: Subhash Chandra Bose Naripeddy <snariped@codeaurora.org>
ASoC: msm: Fix wrong wait_event_timeout timeout checks

wait_event_timeout returns zero when there is a timeout.
Change fixes the condition check to handle timeouts.

Change-Id: I01184cce0c98a82bb205023b07dd4dd2d91b42ad
CRs-Fixed: 487821
Signed-off-by: Asish Bhattacharya <asishb@codeaurora.org>

Conflicts:
	sound/soc/msm/msm-compr-q6.c
	sound/soc/msm/qdsp6/q6afe.c
ASoC: msm: Fix for improper volume ramp up in tunnel playback

A disturbance is heard when resuming the playback after
switching from headset to speaker and back to headset with the
music paused for more than 3 sec. This is due to, data getting
rendered with the speaker volume where it had to played with headset
volume. Fix is to set the '0' as the initial volume.

Change-Id: Ie4726a7898620fb912279270e24fa15a45a437f9
CRs-fixed: 453704
Signed-off-by: Amal Paul <amal@codeaurora.org>

Conflicts:
	sound/soc/msm/msm-compr-q6.c
	sound/soc/msm/qdsp6v2/msm-compr-q6-v2.c