hal: Refactor HDMI backend configuration
-In current design HDMI backend configuration does not validate
incoming configuration against what is supported by the
connected sink ( using edid). This results in an incorrect
configuration of the HDMI backend, sometimes leading to no audio.
-Move HDMI backend configuration to
platform_check_and_set_codec_backend_cfg, this design ensures
that HDMI backend configuration happens with valid and only
supported parameters (sample rate, channels and bit width)
by the connected sink.
-Remove usleep from keep_alive and move to conditional timed wait,
this ensures to break from the keep_alive loop quickly, instead
of waiting for the complete usleep duration.
CRs-Fixed: 1039831
Change-Id: Id46ae76575f1b8169370cee817b505b97af8fe01
diff --git a/hal/msm8916/platform.h b/hal/msm8916/platform.h
index cd5aeb7..dcd351a 100644
--- a/hal/msm8916/platform.h
+++ b/hal/msm8916/platform.h
@@ -372,4 +372,13 @@
char device_name[100];
char interface_name[100];
};
+
+struct audio_backend_cfg {
+ unsigned int sample_rate;
+ unsigned int channels;
+ unsigned int bit_width;
+ bool passthrough_enabled;
+ audio_format_t format;
+};
+
#endif // QCOM_AUDIO_PLATFORM_H