ASoC: msm: qdsp6v2: add support for device mute

Add support for muting the RX and TX devices without affecting
the voice stream. This feature is added to aid in voice call
quality testing.

CRs-Fixed: 634690
Change-Id: I6e4eeda853bb5aa31166d1b66f486142397a6b43
Signed-off-by: Shiv Maliyappanahalli <smaliyap@codeaurora.org>
ASoC: msm: qdsp6v2: Do not free memory that has not been unmapped from DSP

The memory that is not unmapped from DSP should not be used until
DSP clears it. Do not free iom memory if the DSP unmap has
failed.

CRs-fixed: 599780
Change-Id: I4ceae34e0f8d6381efc34ce642babbc30ca5e57e
Signed-off-by: Damir Didjusto <damird@codeaurora.org>
ASoC: msm: Fix for USB device switch

Add mutex locks to prevent sending multiple mem map
commands unless the previous one returns, because otherwise
the mem_handle is overwritten.

CRs-fixed: 646752
Change-Id: I2a472430d4505c9f74ed033260e1e99cb787e03a
Signed-off-by: Vicky Sehrawat <vickys@codeaurora.org>
ASoC: msm: Use 16K sample rate for RFECNS

To enable record with an RFECNS device use a 16K
sample rate

Change-Id: Ib9c6a4605f6a7f9e5f4c25280e0cc646459815fc
Signed-off-by: Ben Romberger <bromberg@codeaurora.org>
ASoC: msm: Add G711 media type support for Voip call

G711 is currently not supported in the Voip driver.
Add G711 media type to existing Voip driver.

Change-Id: If464afa68400ddc63a0b2700d8357511d4435787
Signed-off-by: Prashanth Reddy <pgreddy@codeaurora.org>
ASoC: msm: qdspv2: Add hw_free for mi2s backend

In the current driver we did not implement hw_free callback.
During stability test, hw_params is called twice without shutdown
and startup due to this there is mismatch in hw_params.
In this case hw_free is trigerred, so implement hw_free and if
hw_free is called take appropriate action in hw_params.

CRs-Fixed: 611216
Change-Id: I4afa59adc81aa361147937b2211fe021b6e47b40
Signed-off-by: Yeleswarapu, Nagaradhesh <nagaradh@codeaurora.org>
ASoC: compr: timestamp fix for non-gapless mode

Cache last known playback timestamp before resetting the
in use session in preparation for possible re-use of the
same session.

Change-Id: Id422f5654960818c159f9f07d5af3c497192bae2
Signed-off-by: Haynes Mathew George <hgeorge@codeaurora.org>
Signed-off-by: Dhananjay Kumar <dhakumar@codeaurora.org>
ASoC: msm: set the master gain to 0 on DSP while configuring

- Mute media volume and play any music clip then reboot
  the phone. Play music again noise comes. This noise
  is introduced in DSP/LPASS.

- DSP suggestion is to mute master volume gain while
  configuring ASM session to avoid such noise at
  begining of asm playback.

Change-Id: I2aa2846d6e3e9a85c459534e9108e6fe7aebb962
Signed-off-by: Ramjee Singh <ramjee@codeaurora.org>
ASoC: msm: propagate the error code from the compr driver

Propagate the error code to the upper layers to avoid the
unwanted sequence of the commands to DSP.

CRs-Fixed: 671241
Change-Id: I72b4700f01f6953c13e64878acf5bed882eb41a5
Signed-off-by: Aviral Gupta <aviralg@codeaurora.org>