hal: Fix error in sending channel map to driver

Channel map values are not sent to driver due to error in
formulating mixer control name.

Replace strlcat with snprintf to correct length of data copied
into mixer control name.

Change-Id: I14d8771c5de47cdc8fafb6dfc12663f0fe1ed845
CRs-fixed: 854305
diff --git a/hal/msm8916/platform.c b/hal/msm8916/platform.c
index d12959d..c3aa274 100644
--- a/hal/msm8916/platform.c
+++ b/hal/msm8916/platform.c
@@ -3815,10 +3815,15 @@
         ALOGE("%s: Invalid channel mapping used", __func__);
         return -EINVAL;
     }
-    strlcpy(mixer_ctl_name, "Playback Channel Map", sizeof(mixer_ctl_name));
+
+    /*
+     * If snd_id is greater than 0, stream channel mapping
+     * If snd_id is below 0, typically -1, device channel mapping
+     */
     if (snd_id >= 0) {
-        snprintf(device_num, sizeof(device_num), "%d", snd_id);
-        strlcat(mixer_ctl_name, device_num, sizeof(device_num));
+        snprintf(mixer_ctl_name, sizeof(mixer_ctl_name), "Playback Channel Map%d", snd_id);
+    } else {
+        strlcpy(mixer_ctl_name, "Playback Device Channel Map", sizeof(mixer_ctl_name));
     }
 
     ALOGD("%s mixer_ctl_name:%s", __func__, mixer_ctl_name);