ASoC: msm: qdsp6v2: Fix bugs in listen client and server

Correct LSM idx in APR sevices table. Free memory allocated for
snd_model when not needed. Unlock mutex before locking same mutex
again in the same thread.

CRs-Fixed: 487983
Change-Id: I392321cddfd53746f63955993801f523e17330f5
Signed-off-by: Kiran Kandi <kkandi@codeaurora.org>

Conflicts:
	sound/soc/msm/qdsp6v2/q6lsm.c
ASoC: msm: qdsp6v2: handle AFE memory map/unmap failure

In cases where AFE memory map and unmap call fails, return proper
error code and return. This will let the upper layer know about the
map/unmap failure.

Change-Id: Id56691d688285f251848ef76158458e593e5dd2f
Signed-off-by: Banajit Goswami <bgoswa@codeaurora.org>

Conflicts:
	sound/soc/msm/qdsp6v2/q6afe.c

Conflicts:
	sound/soc/msm/qdsp6v2/q6afe.c
ASoC: msm: Add support for incall music delivery

Add mixer controls, pseudoport IDs
to support incall music delivery on port 8002.
Change the implementation to start playback only
on the specified session and port.

Change-Id: I318b7df24d2beb8eaa0f65e7089ebf46471c2049
Signed-off-by: Vicky Sehrawat <vickys@codeaurora.org>

Conflicts:
	include/sound/apr_audio-v2.h
ASoC: msm: qdsp6v2: fix broken AFE memory unmap

AFE memory map receives memory map handle from ADSP and needs to pass the
handle when requests memory unmap.  Current afe driver incorrectly sends
physical memory address instead so memory unmap always fails.
Pass memory map handle to fix broken AFE memory unmap command.

CRs-fixed: 510179
Change-Id: I3c8b957b7953379bc96ba6f1de317eddf7783e8d
Signed-off-by: Joonwoo Park <joonwoop@codeaurora.org>

Conflicts:
	sound/soc/msm/qdsp6v2/q6afe.c

Conflicts:
	sound/soc/msm/qdsp6v2/q6afe.c
mm-audio: aud_acdb_util: Fix ADM custom topology

When AANC was added an enum was changed that affected ADM
custom topology and TX audproc vol cal. If ADM custom
topology was used the memmap handle for TX audproc volume
would be overwritten. This fixes that logic.

Change-Id: I8c0a13d0a3c0359537508b7ca9a34faf8cd267b4
CRs-fixed: 515406
Signed-off-by: Ben Romberger <bromberg@codeaurora.org>

Conflicts:
	sound/soc/msm/qdsp6v2/q6adm.c
	sound/soc/msm/qdsp6v2/q6afe.c
ASoC: msm: Unmap all ACDB memory with Q6 when ACDB driver closed

Call into all Q6 drivers to unmap all memory being used by Q6.

Change-Id: I971564bc80373877559679a95aab5529637d29a1
CRs-fixed: 505503
Signed-off-by: Ben Romberger <bromberg@codeaurora.org>

Conflicts:
	include/sound/q6adm-v2.h
	sound/soc/msm/qdsp6v2/audio_acdb.c
	sound/soc/msm/qdsp6v2/q6afe.c
	sound/soc/msm/qdsp6v2/q6asm.c
	sound/soc/msm/qdsp6v2/q6audio-v2.c
	sound/soc/msm/qdsp6v2/q6lsm.c

Conflicts:
	sound/soc/msm/qdsp6v2/q6afe.c
	sound/soc/msm/qdsp6v2/q6lsm.c
ASoC: msm: qdsp6v2: Clear ION handle after freeing

Once ion memory is freed ion handle should be set to
NULL to avoid double free or any unintended access.
This change clears the ION handle after freeing up
the memory.

Change-Id: I37d76fe2641c111fa4376eff8f7e45f6795414ca
Signed-off-by: Gopikrishnaiah Anandan <agopik@codeaurora.org>
derp