hal: Support config selection for playback on speaker

Support bit width selection for playback on speakers based on
platform info.

Change-Id: I8dd2cc7049186e7468615a43db550d7d580a81d1
diff --git a/hal/audio_extn/utils.c b/hal/audio_extn/utils.c
index 6818161..8bd98a0 100644
--- a/hal/audio_extn/utils.c
+++ b/hal/audio_extn/utils.c
@@ -436,6 +436,9 @@
 
     if ((24 == bit_width) &&
         (devices & AUDIO_DEVICE_OUT_SPEAKER)) {
+        int32_t bw = platform_get_snd_device_bit_width(SND_DEVICE_OUT_SPEAKER);
+        if (-ENOSYS != bw)
+            bit_width = (uint32_t)bw;
         sample_rate = DEFAULT_OUTPUT_SAMPLING_RATE;
         ALOGI("%s Allowing 24-bit playback on speaker ONLY at default sampling rate", __func__);
     }