audio/msm7630 : Stability issue with LPA play back.

- ANR is observed during LPA playback when there is song switch for
  every few seconds
- The song switch does not happen when the song is played till the end
- Native crashes are observed during rapid seek, next and previous
  song switch operations. There is some race condition between write and
  flush which results in adding a buffer multiple times to empty queue.
  This tries to free the buffer multiple times during reset and results
  in native crash. Fix this issue by adding proper mutex in write and
  flush calls which synchronizes these operations and avoids crashes.
  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: Ie171d86f39fc4484710002c4940496dc90fbb05a
CRs-Fixed: 463272
Merge "audio/msm7630 : Stability issue with LPA play back."
audio: Use CM standard QCOM naming.
msm7x30: Fix building of modules.
audio: Only build this module if specified.
msm7x30: Add system property to toggle headset microphone.
msm7x30: Switch property to persist.

Saves across reboot so we can't run into problems while headset
plugged on boot.
audio: Allow devices with mono speaker to function.

If the device has both speakers, stereo will be used.
audio: Allow devices with broadside dual mic to function.

If the device has both dual mics, endfire will be used.
msm7x30: Rework the headset without microphone force function.
mms7x30: Only use earpiece when specified.

There are a few cases where the audio gets routed to earpiece, while it should
be at the speaker mode. To fix this, always default to speaker mode and only use
earpiece when it is specified.