msm: Asoc: LPA: Fix pause and next clip play issue

- When paused and press next button to play next song,
sometimes CMD_EOS fails to get Ack from LPASS and
is wait timeout for 5sec causing delay for next
playback start.
- In the failure case, even before trigger start
of driver is done,LPA driver receives pcm_close.
In this case, though EOS is issued, it is not
getting honored from LPASS.
- If trigger start not happen in LPA driver,
avoid CMD_EOS to LPASS as it will not be handled.

CRs-Fixed: 368519, 366926
Change-Id: Ib5ff21925bb44849b27ed4709b72efcccf412b5d
Signed-off-by: Laxminath Kasam <lkasam@codeaurora.org>

Conflicts:
	sound/soc/msm/msm-pcm-lpa.c

Conflicts:

	sound/soc/msm/msm-pcm-lpa.c
ASoC: msm: Fix for a seekbar issue during audio playback.

Issue is that when seek happens several times during audio playback,
and at some point last buffer write done event from DSP is received,
an ioctl drain is issued, which will set pending_buffer flag to 0,
In the mean time before drain finishes a seek comes, which issues
a flush on all the buffers and try to resume the playback again.
Now because the pending_buffer flag is set to 0, CMD_RUN will return
without any further writes to DSP. As a result no audio buffers are
reaching the DSP and hence no audio is getting played.
Make a fix is to set pending_buffer flag to 1 whenever playback is resumed
after seek.

Change-Id: I89812332f14e0682be28445ad1f15564f129ae11
Signed-off-by: Mingming Yin <mingming@codeaurora.org>
msm-pcm-q6: Add support for flexible recording period size

- Current implementation supports only fixed buffer size
  of 320 bytes only for audio recording. This results in
  performance overhead for recording at higher sample rate.
- Added support for flexible period size so that user can
  use larger buffers for recording at higher sample rates.

Signed-off-by: SathishKumar Mani<smani@codeaurora.org>
Signed-off-by: Iliyan Malchev <malchev@google.com>

Conflicts:
	sound/soc/msm/msm-pcm-q6.c

Change-Id: Ib061ca0106ea240cf2dfeb1816a25b00520e0c22

Conflicts:

	sound/soc/msm/msm-pcm-q6.c