ASoC: msm: Add routing controls for SW Listen

Certain codecs will not have HW MAD that can be
used for Listen feature. In such cases Listen is
implemented using SW MAD in ADSP. This change will
enable user space to use SW MAD in ADSP.

Signed-off-by: Venkat Sudhir <vsudhir@codeaurora.org>
Signed-off-by: Dan Trifan <jimsth@gmail.com>
ASoC: msm: Add routing mixer controls for QCHAT

Add changes in routing controls to support exclusive voice
session for QCHAT.

Signed-off-by: Vidyakumar Athota <vathota@codeaurora.org>
Signed-off-by: Dan Trifan <jimsth@gmail.com>
ASoC: msm: Fix error recovery in register & deregister vol table

Modify the register & deregister volume table functions
in the voice driver so that no error is returned when
successful. Add error returns for cal reg & dereg
functions and improve error recovery.

Signed-off-by: Ben Romberger <bromberg@codeaurora.org>
Signed-off-by: Dan Trifan <jimsth@gmail.com>
ASoC: msm: qdsp6v2: Fix buffer overflow in voice driver

Userspace registers calibration data with acdb driver
through ioctls. Voice driver registers the calibration
data with CVD by querying acdb data from acdb driver and
copies the calibration data in apr message.

The size of the calibration data can be controlled by userspace
and can result in buffer overflow if the calibration size is
greater than the destination buffer size.

Reject acdb data if the size is greater than the size of
destination buffer.

Signed-off-by: Shiv Maliyappanahalli <smaliyap@codeaurora.org>
Signed-off-by: Dan Trifan <jimsth@gmail.com>
ASoC: msm: qdsp6v2: Fix voice rx/tx mute after SSR

If SSR happens during device switch while voice call is in progress
then end voice call is not handled properly. Because of this
when next call comes start voice command is ignored and voice call
does not start. Update voc states appropriately to fix this issue.

Signed-off-by: Vidyakumar Athota <vathota@codeaurora.org>
Signed-off-by: Dan Trifan <jimsth@gmail.com>
ASoC: msm: Add support for external EC reference point

Add mux to sound card topology with output of mux routed
to CS voice uplink front-end as way to indicate external
EC reference point. Currently, MI2S_TX is the only
AFE input port defined for this MUX. This change is required
if external EC is to be used with external speaker.

Signed-off-by: Venkat Sudhir <vsudhir@codeaurora.org>
Signed-off-by: Dan Trifan <jimsth@gmail.com>
ASoC: msm: Add DSP support for SRS on A2DP

- Enabling or disabling SRS effects on music playback on
  A2DP doesn't have any effect.
- Cause for this is, parameters for SRS effects were not send
  if the device is A2DP.
- Fix is to add a new kcontrol for A2DP and use the new kcontrol
  to send SRS parameters for A2DP case.

Signed-off-by: Sharad Sangle <assangle@codeaurora.org>
Signed-off-by: Dan Trifan <jimsth@gmail.com>
ASoC: msm: qdsp6v2: Fix voice mute issue when EC ref is set

Function voc_set_ext_ec_ref returns 0 on success, handle the
return value of this function appropriately to avoid mute issue.

Signed-off-by: Deepa Madiregama <dmadireg@codeaurora.org>
Signed-off-by: Dan Trifan <jimsth@gmail.com>
ASoC: msm: qdsp6v2: extra low latency mode change for audio capture

For low latency audio capture sessions adm should be
opened in low latency mode.This change checks for low latency
mode and passes the info to adm.

Signed-off-by: Mingming Yin <mingming@codeaurora.org>
Signed-off-by: Dan Trifan <jimsth@gmail.com>