Merge "Audio: Bear(8916) Audio HAL bringup changes"
diff --git a/hal/msm8974/hw_info.c b/hal/msm8974/hw_info.c
index 59bdb56..6920efe 100644
--- a/hal/msm8974/hw_info.c
+++ b/hal/msm8974/hw_info.c
@@ -121,19 +121,24 @@
     SND_DEVICE_OUT_SPEAKER,
     SND_DEVICE_OUT_SPEAKER_AND_HEADPHONES,
     SND_DEVICE_OUT_SPEAKER_AND_ANC_HEADSET,
+    SND_DEVICE_OUT_VOICE_SPEAKER,
 };
 
 static void  update_hardware_info_8084(struct hardware_info *hw_info, const char *snd_card_name)
 {
     if (!strcmp(snd_card_name, "apq8084-taiko-mtp-snd-card") ||
         !strncmp(snd_card_name, "apq8084-taiko-i2s-mtp-snd-card",
-                 sizeof("apq8084-taiko-i2s-mtp-snd-card"))) {
+                 sizeof("apq8084-taiko-i2s-mtp-snd-card")) ||
+        !strncmp(snd_card_name, "apq8084-tomtom-mtp-snd-card",
+                 sizeof("apq8084-tomtom-mtp-snd-card"))) {
         strlcpy(hw_info->type, "mtp", sizeof(hw_info->type));
         strlcpy(hw_info->name, "apq8084", sizeof(hw_info->name));
         hw_info->snd_devices = NULL;
         hw_info->num_snd_devices = 0;
         strlcpy(hw_info->dev_extn, "", sizeof(hw_info->dev_extn));
-    } else if (!strcmp(snd_card_name, "apq8084-taiko-cdp-snd-card")) {
+    } else if ((!strcmp(snd_card_name, "apq8084-taiko-cdp-snd-card")) ||
+        !strncmp(snd_card_name, "apq8084-tomtom-cdp-snd-card",
+                 sizeof("apq8084-tomtom-cdp-snd-card"))) {
         strlcpy(hw_info->type, " cdp", sizeof(hw_info->type));
         strlcpy(hw_info->name, "apq8084", sizeof(hw_info->name));
         hw_info->snd_devices = (snd_device_t *)taiko_apq8084_CDP_variant_devices;
@@ -255,6 +260,8 @@
     struct hardware_info *hw_info;
 
     hw_info = malloc(sizeof(struct hardware_info));
+    hw_info->snd_devices = NULL;
+    hw_info->num_snd_devices = 0;
 
     if(strstr(snd_card_name, "msm8974") ||
               strstr(snd_card_name, "apq8074")) {
diff --git a/hal/msm8974/platform.c b/hal/msm8974/platform.c
index 684436e..1613f48 100644
--- a/hal/msm8974/platform.c
+++ b/hal/msm8974/platform.c
@@ -1835,7 +1835,7 @@
     if (info != NULL && info->has_video && info->is_streaming) {
         fragment_size = COMPRESS_OFFLOAD_FRAGMENT_SIZE_FOR_AV_STREAMING;
         ALOGV("%s: offload fragment size reduced for AV streaming to %d",
-               __func__, out->compr_config.fragment_size);
+               __func__, fragment_size);
     }
 
     fragment_size = ALIGN( fragment_size, 1024);