ASoC: msm8x10: add support to split SD0/1 as two seperate BE.

SD0 and SD1 are driven by single DMA channel. this makes it
impossible for any audio session to be sent to SD1 output
without mixing with SD0 data contents.

Allow user to route audio to a new AFE PORT introduced to
send data to SD1 without mixing with SD0 contents. The user
however needs to group the ports before opening any of the
AFE ports.

Change-Id: Icadc0f87fffc29575f069b6124dee3cf9d8a9fcd
Signed-off-by: Asish Bhattacharya <asishb@codeaurora.org>
ARM: dts: msm: Update device tree node for audio

Rename properties and compatible strings to return to the old
naming convention.

Change-Id: Ia58df9c4084e4d570d487aff1138522d3b862a58
Signed-off-by: Kumar Gala <galak@codeaurora.org>
ASoC: msm: 8x10: Adjust button range for button 7

With very fast press of button 7, it is found that
the measured voltage falls few mv below the lower
threshold. Adjust the threshold to detect the button
press.

Change-Id: I2d23607df9b3b7e993da214961f25fbadcffd60c
CRs-Fixed: 611825
Signed-off-by: Simmi Pateriya <simmip@codeaurora.org>
ASoC: msm8x10: Add backend DAI Link for incall music delivery

A new backend DAI link is required for DSDA incall music
delivery. This is because two different voice sessions will
use different ports and backends.

Change-Id: Icff8676872d40094f49b52df8ee3219a2f3283cd
CRs-Fixed: 571380, 616154
Signed-off-by: Avinash Vaish <avaish@codeaurora.org>
ASoC: msm8x10: Add MultiMedia9 Frontend to machine driver

Add the new MultiMedia9 Frontend to machine driver which
will be used by incall music delivery

Change-Id: I9793db30a6412e1d5cbbf95d7e74399179ee2919
CRs-Fixed: 571380, 616154
Signed-off-by: Avinash Vaish <avaish@codeaurora.org>
ASoC: msm8x10-wcd: Add gain controls for ADC gains

Add the mixer controls to control the analog gain on the TX path
of the codec. This gain is applies to the ADC on the path. These
mixer controls will be used by higher layer to set desired gain.

Change-Id: Ic255f83238e8e06d31786c149743ec67cdfd6f87
Signed-off-by: Bhalchandra Gajare <gajare@codeaurora.org>
ASoC: msm: Update the correct channel count for dolby configuration

Wfd supports both 5.1 and stereo pcm playback. Add the dolby
configuration for 5.1 playback on wfd.

Conflicts:

	sound/soc/msm/qdsp6v2/msm-dolby-dap-config.c

CRs-Fixed: 609429
Change-Id: I6727ca1a4825bf64e48f211ca9d270f661ceedf0
Signed-off-by: Krishnankutty Kolathappilly <kkolat@codeaurora.org>
ASoC: msm: Add PCM support in compress driver

PCM playback support is added to compress driver so that application
can use the single audio hardware device to play both compressed
and PCM audio.

Change-Id: Ie7719be8d7435088a7e4cfb5b817d4557e25e4c5
Signed-off-by: Dhananjay Kumar <dhakumar@codeaurora.org>
ASoC: msm8226: Add VoWLAN dia link

Add VoWLAN dai link to the machine driver
to enable Voice over WLAN.

Change-Id: I95bb662b525ac035ec88daf62f730ccf60f6bd9e
Signed-off-by: Vicky Sehrawat <vickys@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: wcd9xxx: Add support for 24-bit playback for WCD9306

Add support for playback of 24 bit sample and sample rates
upto 192 kHz in WCD9306 codec driver. This change sets codec
format control registers based on the PCM sample size played.

Change-Id: I97f6a8c598f37403a595fcc70ca89f4ebbe4d5c6
Signed-off-by: Venkat Sudhir <vsudhir@codeaurora.org>
ASoc: msm: Add 24-bit playback support for MSM8226

Add support for 24-bit playback in MSM8226 machine
driver. This change enables playback of PCM data whose
sample size is 24 bits.

Change-Id: I63966b291978b2816038a37c076626ad57b49ffe
Signed-off-by: Venkat Sudhir <vsudhir@codeaurora.org>

Conflicts:
	sound/soc/msm/msm8226.c
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.

CRs-Fixed: 601078
Change-Id: I7226c088410bf4a2effe0d060f839dc7928359bf
Signed-off-by: Deepa Madiregama <dmadireg@codeaurora.org>
ASoC: msm: qdsp6v2: Remove cmd_state from ASM header function

Cmd_state indicates whether the callback has been received
and whether the function should exit wait.
Remove setting of this variable in ASM header because
some functions such as get_session_time need ASM header
but do not need to modify this flag.

CRs-fixed: 613817
Change-Id: I6751cd89b3199c7350aaf1ebb70d7062ac65554f
Signed-off-by: Damir Didjusto <damird@codeaurora.org>
ASoC: wcd9306: Fix the HPH and Lineout volume range

Fix the volume range for HPH and Lineout to be
0-20 as per specification.

CRs-fixed: 613189
Change-Id: Id468daa90f8cbc261d09472e60cddc745a2c7544
Signed-off-by: Damir Didjusto <damird@codeaurora.org>
ASoC: wcd9xxx: Add INP2, INP3, INP4 for IIR paths

Add INP2, INP3, INP4 for IIR paths to provide client to use
any one of the four different paths for sidetone

CRs-Fixed: 612492
Change-Id: I6087487604edc249c1f2451cb0d9635399ec74ba
Signed-off-by: Sudheer Papothi <spapothi@codeaurora.org>
ASoC: msm: qdsp6v2: fix possible integer overflow

Check integer overflow before multiplying struct size. If that happens
should return immediately. In addition if param length is greater than
MAX size from spec, better return error.

Change-Id: Ib96cb419ade042d21a1213f6d8c2ff339f5d1c56
CRs-fixed: 605273
Signed-off-by: Fred Oh <fred@codeaurora.org>
ASoC: msm: Null dereference check added

In asm_read function we should check buffer pointer
before it is dererferenced.

CRs-Fixed: 612682
Change-Id: I1968c038e1d35381bf174000287d542441e41092
Signed-off-by: Anish Kumar <kanish@codeaurora.org>
ASoC: msm: Fix the Listen calibration copy issue

This change fixes issue with listen calibration data
copied to the shared memory of correct size. A bug was
introduced during support for multisession listen support
on this branch. This changes address that issue of copying
calibration data of correct length.

Change-Id: I772ea7fc076c42ddd3629f6eba6eeb38313cbf88
Signed-off-by: Venkat Sudhir <vsudhir@codeaurora.org>
ASoC: msm: Reset the stream open flag after CMD_CLOSE is sent to DSP

In case of gapless playback, driver does not wait for EOS. CMD_CLOSE
for stream one or two can be called from compress driver free before
EOS ACK for stream one is received. This can result in CMD_CLOSE to
be sent for already closed stream. Reset the stream open flag after
CMD_CLOSE is sent to DSP to prevent multiple CMD_CLOSE on same
stream.

CRs-Fixed: 611416
Change-Id: Ic186ae37a760a2996ebd7b9b5dc5d5846621ab66
Signed-off-by: Krishnankutty Kolathappilly <kkolat@codeaurora.org>