Revert "ASoC: msm: Fix RTAC to use VSID"

This reverts commit c9099bd70b4a08f5df6dd0a5b346220d602fa531.
Revert "ASoC: msm: qdsp6v2: Add session specific control for slowtalk"

This reverts commit 96902f0b20b946f2085921b4a5b167fec6616eda.
Revert "ASoC: msm: Implement soft volume control"

This reverts commit 540b293dff209d0ee21e0818170eabcf68fed2a1.
Revert "ASoC: msm: qdsp6v2: Add session specific volume and mute control"

This reverts commit 7a3ec3ec03b290cbe4ea89f1e755bfaf50af297d.
Revert "ASoC: msm: qdsp6v2: Use vsid as session id in voice driver"

This reverts commit 4c1f99a3aa9d59b92ce40effd4192cb5be7b47c1.
Revert "ASoC: msm: Add support for incall music delivery"

This reverts commit 6b135320c1bce450658cf23759d22a50a304e48a.
ASoC: msm: qdsp6v2: Use vsid as session id in voice driver

Replace internal session id with voice system id used across
various subsystems to uniquely identify voice sessions.

Change-Id: I9de06c023e994a040118a2ce4e5e8bae8c7b2707
Signed-off-by: Pradnya Chaphekar <pradnyac@codeaurora.org>

Conflicts:
	sound/soc/msm/qdsp6v2/q6voice.c
	sound/soc/msm/qdsp6v2/q6voice.h
ASoC: msm: Fix RTAC to use VSID

All voice sessions use unique VSID for active
sessions in CVD. RTAC get param for voice
sessions require this VSID to work correctly with
CVD. This change fixes the issue of using proper
VSID in RTAC.

from caf
commit	73965fa98be12097e72c8fc0cd4201329ca9b520

Change-Id: I6eb8e64ee5d7fad212b77882c897e5feb3cc96c5
CRs-fixed: 506008
Signed-off-by: Venkat Sudhir <vsudhir@codeaurora.org>
Signed-off-by: Devin Kim <dojip.kim@lge.com>
ASoC: msm: qdsp6v2: defer probe if memory allocation fails

During bootup, on targets which use SMMU, msm_audio_ion wrapper
will allocate and return memory even if SMMU device node is not
ready. Mapping such memory with LPASS will fail as LPASS is
expecting SMMU memory. msm_audio_ion_alloc will now return
EPROBE_DEFER if SMMU device is not ready and as result voice and
voip driver's probe() will defer. Any other memory allocation
errors other than EPROBE_DEFER from msm_audio_ion will result in
voice calls with degraded voice quality since calibration cannot
be applied and voip calls will fail since voip buffers cannot be
allocated.

CRs-fixed: 503096
Change-Id: I2eda29055f088c5d2c14362c47c3484c53d1f3f4
Signed-off-by: Shiv Maliyappanahalli <smaliyap@codeaurora.org>

Conflicts:
	sound/soc/msm/qdsp6v2/q6voice.h
ASoC: msm: Add voice volume boost support

Add support for the volume boost feature. Volume
boost pushes a new voice volume table with boosted
gains. To support this feature new API's are added
to the voice driver to register & deregister the
voice volume table. New IOCTLs are also added for
audio_acdb to support registering & deregistering
tables.

Change-Id: I154fdedad78760393e2cd8cc11fa10178dfce320
Signed-off-by: Ben Romberger <bromberg@codeaurora.org>

Conflicts:
	sound/soc/msm/qdsp6v2/q6voice.c
ASoC: msm: qdsp6v2: Add session specific volume and mute control

Update volume and mute control to make it session specific.
Add functionality to handle all sessions for HALs that are not session
specific.

Change-Id: Ic55d3d69c9d4955e5e1d19929a97deecf54a43f9
Signed-off-by: Pradnya Chaphekar <pradnyac@codeaurora.org>

Conflicts:
	sound/soc/msm/qdsp6v2/msm-pcm-voice-v2.c
ASoC: msm: Implement soft volume control

Existing cvd volume and mute commands have been deprecated.
Replace the deprecated volume api with soft volume api. Update
volume and mute kcontrol to take ramp duration as a parameter.

Change-Id: I320686d4deb3758c40441fbc54e952d885b548ff
CRs-fixed: 460114
Signed-off-by: Pradnya Chaphekar <pradnyac@codeaurora.org>

Conflicts:
	sound/soc/msm/qdsp6v2/msm-pcm-voip-v2.c
	sound/soc/msm/qdsp6v2/q6voice.c
	sound/soc/msm/qdsp6v2/q6voice.h
ASoC: msm: qdsp6v2: Add session specific control for slowtalk

Update slowtalk control to make it session specific. Add
functionality to handle all sessions for HALs that are not session
specific.

Change-Id: Icd3ffb59ebae156ee4ca66196860e14d715ed0e4
Signed-off-by: Pradnya Chaphekar <pradnyac@codeaurora.org>
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: 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
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/msm-lsm-client.c
	sound/soc/msm/qdsp6v2/q6afe.c
	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
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
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: 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>