audio/msm8660: Add channel mask for voice call recording

- Voice call record is failed to record.
- In channel mask uplink and downlink entry is missing
- Add uplink/downlink in channel mask and voice call
  in global configuration.

CRs-Fixed: 382736
(cherry picked from commit 505ac6f14f1b70fb0f52bbf53c0ca844ae66d271)

Change-Id: I77f1a313d2bf421d478b53976b36c8e8084af230
audio/msm8660: Fix for LPA stability and decode interval issues

-Media server crash when clip is in pause, then seek and
resume the clip. Event thread does not exit after LPA playback.
Playback of current clip is getting skipped when headset is
inserted during lpa playback.
-There is mismatch in pause state in LPAPlayer and driver.
Error Bad file number not handled. When headset is inserted output
session is closed if direct track flag is set in output descriptor.
This causes current lpa session to be closed.
-Call driver resume when clip is resumes after seek in
pause condition. Exit event thread when bad file number occurs.
Avoid closing of output for lpa, tunnel mode and voip session.

(cherry picked from commit 3efb183f0708c99b582a7289a16241c9bc771413)

Change-Id: I2b357b428fce5177e27b68a2a546827f27d8f72d
audio/msm8660: LPA Audio HAL fixes for suspend and eos issue

-LPA playback reset is not called at end of clip as eos
from HAL doesn't gets generated if last write buffer
size is zero.
Fix this by posting eos to observer if bytes to write is zero.

-After suspend resume, playback of paused lpa clip is not
resumed if tried to play the clip.
Added isDriverStarted variable to maintain states of driver.

-Driver flush is not triggered sometimes during paused state
 and at the end of clips while LPA Player is waiting on fsync.
 This results in fsync to be blocked indefinitely and ANR is
 observed.
 Fix this problem by calling driver flush explicitly and pause
 the session if stream is in paused state

-If last buffer is written immediately after flush the last
 buffer is skipped and eos is triggered. The song doesn't
 switch to next clip because of this problem
 Fix this problem by triggering eos if last buffer is written
 immediately after flush

Change-Id: Iedd0471a1793a521663a66c26c4addc31408c409
audio/msm8660: Fix for seek and pause timeout issues in LPA

-Audio is distorted after doing seek during LPA playback.
A buffer is held with audio HAL just before flush and it is sent
to driver immediately after flush. This results in previous buffer
to be played after seek. Set mSkipWrite flag just before flush so
that the write call skips any buffer held with HAL during flush.

 -After Pausetimeout, reset is called due to which EOS is posted
to observer. This results in start or reset operation on a closed
sink leading to crashes. Avoid posting EOS if reset is already
called.

Change-Id: I88f7b41950494584869fe453fe103ae8a59a3d9b
audio/msm8660: Fix the issue of voice call when HDMI connected

- Voice call is not working when HDMI cable is connected.
- When HDMI is connected getDeviceForStrategy is picking
  up HDMI rx as active device, because of this voice call
  is not working.
- Avoid updating the HDMI as active output device, when
  strategy is STRATGY_PHONE.

CRs-Fixed: 384324
(cherry picked from commit 815e0bfe786a4c7fca0bb4880b56519471dde386)

Change-Id: I1852f4b3ff89602c17ab2e623b52f4c084b0037f
audio/8660: Fix for LPA crash in monkey runs

-In monkey runs, LPA playback crash observed.
-In reset(),delay in calling driver close
 lead to failure of next clip playback.
-Close the driver in reset() without waiting for
 removal of LPA decode node.

Change-Id: I3784fedb94c655b5bc2b5c9e41374870d68a2f67