alsa_sound: Fix for unhandled NULL pointer

-Passing NULL pointer to pcm_read()/pcm_write()/
 pcm_prepare() would crash, since it doesnt perform
 a NULL check before using the pointer, resulting
 in random crash
-Fix is to check whether handle is NULL or not.

Change-Id: I7061d40bddcaaae2145f5fc0a0229abeebead878
CRs-fixed: 549257
audio: fix for unhandled NULL pointer in HAL

- Check if handle is NULL before calling pcm_close
- Check if usecase is NULL before string comparison
  operations
- Disable unnecessary debug logs in HAL

Change-Id: I569cbf510c820e1a155abf3efb4bbb525e68aafb
Merge "audio: fix for unhandled NULL pointer in HAL"
Merge "alsa_sound: Fix for unhandled NULL pointer"
audio: Choose Speaker instead of USB Headset on force use

- getNewDevice() is selecting USB Dock Headset when user
  forces it to be speaker during VOIP/VOICE call
- Fix is to return speaker as output device in this case
CRs-Fixed: 571801

Change-Id: I81cbcef17ac6d07ac0a174e4ab35c8f5c6426257
Merge "audio: Choose Speaker instead of USB Headset on force use"
Merge branch 'kk_2.7_rb1.13' of git://codeaurora.org/platform/hardware/qcom/audio into cm-11.0

Change-Id: Ibc4a6c491570f7a54e596b4d3a42e9476ebd9d95
Merge branch 'CyanogenMod/cm-11.0'