Add memcpy_to_u8_from_i16 to libaudioutils

Change-Id: I20066dbfaf8828d9d32266c589beaf3860677bc8
diff --git a/audio_utils/primitives.c b/audio_utils/primitives.c
index bec87e0..af9ab40 100644
--- a/audio_utils/primitives.c
+++ b/audio_utils/primitives.c
@@ -39,6 +39,13 @@
     }
 }
 
+void memcpy_to_u8_from_i16(uint8_t *dst, const int16_t *src, size_t count)
+{
+    while (count--) {
+        *dst++ = (*src++ >> 8) + 0x80;
+    }
+}
+
 void downmix_to_mono_i16_from_stereo_i16(int16_t *dst, const int16_t *src, size_t count)
 {
     while (count--) {