hal: Limit pass-through sample rate to 192k for TrueHD and EC3

Limit pass-through sample rate to 192k for TrueHD and EC3.
192k is the highest sample rate supported by these formats
and both formats multiply the input sample rate by four
which may exceed the maximum supported.

Change-Id: I7f3516c24fdae18b3fb4cf53aa6e7c4c34eaed18
diff --git a/hal/msm8916/platform.c b/hal/msm8916/platform.c
index cacdd85..39da7e4 100644
--- a/hal/msm8916/platform.c
+++ b/hal/msm8916/platform.c
@@ -5449,11 +5449,12 @@
 
         if ((usecase->stream.out->format == AUDIO_FORMAT_E_AC3) ||
             (usecase->stream.out->format == AUDIO_FORMAT_E_AC3_JOC) ||
-            (usecase->stream.out->format == AUDIO_FORMAT_DOLBY_TRUEHD))
-            sample_rate = sample_rate * 4 ;
+            (usecase->stream.out->format == AUDIO_FORMAT_DOLBY_TRUEHD)) {
 
-        if (!edid_is_supported_sr(edid_info, sample_rate))
-                sample_rate = edid_get_highest_supported_sr(edid_info);
+            sample_rate = sample_rate * 4;
+            if (sample_rate > HDMI_PASSTHROUGH_MAX_SAMPLE_RATE)
+                sample_rate = HDMI_PASSTHROUGH_MAX_SAMPLE_RATE;
+        }
 
         bit_width = CODEC_BACKEND_DEFAULT_BIT_WIDTH;
         /* We force route so that the BE format can be set to Compr */