hal: HDMI samplerate correction for DDP-DD passthru
-for DDP content HDMI sample rate is determined by multiplying
the content rate with four. But it should be avoided for DDP to DD
converter case.
-extending the buffer size to store wav header info. This is needed
for wave-extensible format.
Change-Id: Idbab1bb1551fa4c4531abfd62473b5e219377512
diff --git a/hal/msm8916/platform.c b/hal/msm8916/platform.c
index 2d05bed..f8c0aba 100644
--- a/hal/msm8916/platform.c
+++ b/hal/msm8916/platform.c
@@ -5607,12 +5607,11 @@
__func__, DEFAULT_HDMI_OUT_CHANNELS);
channels = DEFAULT_HDMI_OUT_CHANNELS;
}
-
- if ((usecase->stream.out->format == AUDIO_FORMAT_E_AC3) ||
+ 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))
+ && (usecase->stream.out->compr_config.codec->compr_passthr == PASSTHROUGH)) {
+ sample_rate = sample_rate * 4;
if (sample_rate > HDMI_PASSTHROUGH_MAX_SAMPLE_RATE)
sample_rate = HDMI_PASSTHROUGH_MAX_SAMPLE_RATE;
}