ASOC: msm: Cache sample rate and channels when backend active.

While handling device switch between headset and stereo speaker
during Playback, the front end will be torn down
(after playing tone) while keeping the backend active.
During this time, hardware param will no longer be active.
Platform driver was using this invalid hardware parameters to
configure the matrix in the dsp with sample rate and channel.
Sometimes invalid sample rate being sent to DSP was causing
a crash in DSP. To overcome the issue, platform driver needs to
cache sample rate and channel information when backend
is active while front end is being torn down and setup
again. This cached information will be used to configure
the adm when front end is setup again.

CRs-fixed: 347115
Change-Id: If821fa828d4faa8897c78f07653e846a99611df1
Signed-off-by: Jayasena Sangaraboina <jsanga@codeaurora.org>
(cherry picked from commit e644db35fb87e0911a7942fc73f7354ce838893b)

Signed-off-by: Zhoulu Luo <zluo@codeaurora.org>
ASoC: msm: Add support for configuring buffer size in multichannel driver

The buffer size is hardcoded in multichannel pcm driver. This results
in more pcm data in the driver for smaller sampling rates causing
Audio Video sync issues and old buffers played during seek operation.
Add support for configuring buffer size in multi channel pcm driver.
based on sample rate and channels.

Change-Id: I3db4a026b6627177168656769c3f2751dbb12391
Signed-off-by: Krishnankutty Kolathappilly <kkolat@codeaurora.org>
ASoC: msm: Support for configuring buffer size in multichannel PCM TX

There is a usecase to capture PCM from HDMI input through ADSP using
MI2S TX interface and play or route the same to the desired output
device. To support this more buffering is required. Add configuring
buffer size in multi channel PCM TX driver to support the usecase.

Change-Id: Icefa803b02cd5edac0f67fe2186b44030c38c8b9
Signed-off-by: Subhash Chandra Bose Naripeddy <snariped@codeaurora.org>
ASoC: msm: Add AIO support for multi channel pcm platform driver.

Add Async write mechanism for multichannel PCM platform driver.
This will facilitate to have meta data information flow from apps
To DSP and vice versa.

Signed-off-by: Santosh Mardi <gsantosh@codeaurora.org>
(cherry picked from commit 69f2b8ac7106fe5d5fa19ee12131c27efc8e5ec1)
(cherry picked from commit 45e605da5fd57e07609657c0fac43853d3d0658e)

Change-Id: I6a931b4458f14b64040eb7502aee26250938ba9d
Signed-off-by: Sudhir Sharma <sudsha@codeaurora.org>
ASoC: msm: Enhance multi channel pcm driver to support SYNC and ASYNC

Enhance the multi channel pcm platform driver to support SYNC and
ASYNC mode

Change-Id: Ieca18864ce68055f7806be487b487d305bee2af8
Signed-off-by: Santosh Mardi <gsantosh@codeaurora.org>