asoc: msm: Add flexible period count to pcm record driver

 In pcm recording, if buffers are not requested from dsp at real
 time then dsp drops the buffers and sends partial buffers. This
 is causing record failures. Pcm record platform driver has two
 periods. If system is loaded, read request will not be at real
 time. Add flexible period count to pcm record platform driver
 so client can configure the period count.

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

Conflicts:
	sound/soc/msm/msm-pcm-q6.c
ASoC: msm: Add support for 4 channel recording

Enable 4 channel recording in kernel

Signed-off-by: Mingming Yin <mingming@codeaurora.org>
Change-Id: I91c76e21a4080c0542a63555f0258010ed061fc0

Conflicts:
	sound/soc/msm/msm-pcm-q6.c
ASoC: msm: Fix the issue that freed data structure is accessed

When there is a failure while opening q6asm capturing stream,
it releases the q6asm data structure which is accessed by
stream closing function and lead to a crash. Resolving the
issue by freeing the data structure in closing function
instead of during opening failure.

Change-Id: Ie45335a98be21d3b6035115241f657185a918be0
CRs-Fixed: 373438
Signed-off-by: Jay Wang <jaywang@codeaurora.org>
ASoC: msm: Fix crash during FM recording.

Call reg_phy_stream only after q6asm_open_read succeeds.

CRs-fixed: 376685
Change-Id: I64951b6c51f8cc9212a691ad087ab0008e9fcb7a
Signed-off-by: Mingming Yin <mingming@codeaurora.org>
ASoC: msm: Fix NULL pointer dereference issue.

Dereferencing of elements stored in array 'buf' whithout checking
will cause a crash.

Change-Id: I550c10a7f2e21886a2aabe038705af848f4d8998
Signed-off-by: Asish Bhattacharya <asishb@codeaurora.org>
ASoC: msm: Add 12000Hz and 24000Hz support to ALSA driver

ALSA framework does not support audio playback with sampling rate
12000Hz and 24000Hz. Add 12000Hz and 24000Hz support to ALSA
driver.

CRs-Fixed: 353893
Change-Id: I60448d63122b18ab2ec970356dd209d116249553
Signed-off-by: Krishnankutty Kolathappilly <kkolat@codeaurora.org>
Merge pull request #20 from razrqcom-dev-team/cm-10.1

Cm 10.1