ASoC: msm: Add channel map control for multi channel pcm driver

In the usecase of multi channel playback, channel map varies from
one compressed format to another. Add channel map control to set
the desired channel map for multi channel playback

Change-Id: Ib3c190e22e08d6d4cf9032a367569b5771c04025
Signed-off-by: Subhash Chandra Bose Naripeddy <snariped@codeaurora.org>
(cherry picked from commit e665a7b574aefa9f49b4633e75a4cf249c5eb9f8)
Signed-off-by: Hieu Phan <aznrice2k4@gmail.com>

Conflicts:
	sound/soc/msm/msm-pcm-routing.c
ASoC: msm: Support send flush to DSP Multichannel PCM playback

In the use case of multi channel PCM playback with the playback
control sequence of Pause, Flush, Resume; residual data buffered in
DSP is played when resuming the playback after seek or flush.
Add support to send CMD_FLUSH to DSP to flush the buffered residual
data after Pause.

CRs-Fixed: 380473
Change-Id: I1d099d28e51858c7c22df88253cd6f83a9c3ca56
Signed-off-by: Subhash Chandra Bose Naripeddy <snariped@codeaurora.org>
(cherry picked from commit 696e66d32beae1209bbde330125b67c59aaf0687)
Signed-off-by: Hieu Phan <aznrice2k4@gmail.com>
ALSA: PCM: channel mapping API implementation

This patch implements the basic data types for the standard channel
mapping API handling.

- The definitions of the channel positions and the new TLV types are
added in sound/asound.h and sound/tlv.h, so that they can be
referred from user-space.

- Introduced a new helper function snd_pcm_add_chmap_ctls() to create
control elements representing the channel maps for each PCM
(sub)stream.

- Some standard pre-defined channel maps are provided for
convenience.

Change-Id: If1685763b7010f36db3b9eb11eba363e84161593
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
Signed-off-by: Subhash Chandra Bose Naripeddy <snariped@codeaurora.org>
(cherry picked from commit ff1e6259367b671a50524bf2dc4260c83c71c7e0)
Signed-off-by: Hieu Phan <aznrice2k4@gmail.com>

Conflicts:
	include/sound/pcm.h
	sound/core/pcm.c
	sound/core/pcm_lib.c
ALSA: Remove VOLATILE flag from chmap ctls

The VOLATILE flag was added to control elements by
snd_pcm_add_chmap_ctls() just because I didn't want to have a
side-effect of "alsactl restore".  But now the set operation doesn't
allow to change the value unless the PCM stream is in PREAPRED state,
there is no reason to keep this flag.  Let's rip it off.

Change-Id: If39dc081b61859b6f1d819c5dfe902f22181a8ab
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
Signed-off-by: Subhash Chandra Bose Naripeddy <snariped@codeaurora.org>
(cherry picked from commit cb7302ba761695c78e874cc61e3e1fb354cdd5bc)
Signed-off-by: Hieu Phan <aznrice2k4@gmail.com>
boosted7-r3

Change-Id: Idf5806722187dc60a78ac83dacb4ffbcbade3111
Signed-off-by: Hieu Phan <aznrice2k4@gmail.com>