hal: Fix audio playback issue on USB headset

- Start music playback on USB headset. The playback is stopped
  after 3sec.
- A touch tone is played through low latency output path,  while
  selecting the song in the music app. This output goes to standy
  after 3sec. So the disable_snd_device() is called to reduce the
  ref count on usb headset device by 1. At this point the music
  playback (deep-buffer path) is still active. But the current
  implementation has uncondtionally calls usb_stop_playback()
  which results music playback to stop.
- Fix by ensuring the usb_stop_playback is called only when the
  device ref count goes to 0.
- Fix related minor stabilty issues

Change-Id: I979423458738e68da45973751cd918d4c1a924ea
CRs-Fixed: 572048
diff --git a/hal/msm8974/platform.c b/hal/msm8974/platform.c
index 800ac76..47f14e6 100644
--- a/hal/msm8974/platform.c
+++ b/hal/msm8974/platform.c
@@ -858,7 +858,7 @@
         if (in_device & AUDIO_DEVICE_IN_BUILTIN_MIC) {
             if (audio_extn_ssr_get_enabled() && channel_count == 6)
                 snd_device = SND_DEVICE_IN_QUAD_MIC;
-            else if (channel_count > 1)
+            else if (channel_count == 2)
                 snd_device = SND_DEVICE_IN_HANDSET_STEREO_DMIC;
             else
                 snd_device = SND_DEVICE_IN_HANDSET_MIC;