hal: Add matrix limiter support

Matrix limiter is used to prevent saturation
when mixing multiple audio streams. It is
enabled when both the BD output flag is set
and the property audio.matrix.limiter.enable
is set to true.

Change-Id: Ibf06bd2444874ae555e98a26ed645f2455a3e1a3
diff --git a/hal/audio_hw.c b/hal/audio_hw.c
index 6029c4a..5cfc3f8 100644
--- a/hal/audio_hw.c
+++ b/hal/audio_hw.c
@@ -4998,6 +4998,10 @@
     out->a2dp_compress_mute = false;
     out->dynamic_pm_qos_enabled = 0;
 
+    if ((flags & AUDIO_OUTPUT_FLAG_BD10) &&
+        (property_get_bool("audio.matrix.limiter.enable", false)))
+        platform_set_device_params(out, DEVICE_PARAM_LIMITER_ID, 1);
+
     if (out->devices & AUDIO_DEVICE_OUT_AUX_DIGITAL &&
         (flags & AUDIO_OUTPUT_FLAG_DIRECT)) {
         pthread_mutex_lock(&adev->lock);