hdmi_cec_device_suspend(fd, hdmi_ctrl->panel_suspend);
}
-static inline void hdmi_tx_send_cable_notification(
+static inline void hdmi_tx_send_audio_notification(
+ struct hdmi_tx_ctrl *hdmi_ctrl, int val)
+{
+ if (hdmi_ctrl && hdmi_ctrl->ext_audio_data.intf_ops.hpd) {
+ u32 flags = 0;
+
+ if (!hdmi_tx_is_dvi_mode(hdmi_ctrl))
+ flags |= MSM_EXT_DISP_HPD_AUDIO;
+
+ if (flags)
+ hdmi_ctrl->ext_audio_data.intf_ops.hpd(
+ hdmi_ctrl->ext_pdev,
+ hdmi_ctrl->ext_audio_data.type, val, flags);
+ }
+}
+
+static inline void hdmi_tx_send_video_notification(
struct hdmi_tx_ctrl *hdmi_ctrl, int val, bool async)
{
if (hdmi_ctrl && hdmi_ctrl->ext_audio_data.intf_ops.hpd) {
u32 flags = 0;
- if (async || hdmi_tx_is_in_splash(hdmi_ctrl)) {
+ if (async || hdmi_tx_is_in_splash(hdmi_ctrl))
flags |= MSM_EXT_DISP_HPD_ASYNC_VIDEO;
-
- if (async) {
- if (!hdmi_tx_is_dvi_mode(hdmi_ctrl))
- flags |= MSM_EXT_DISP_HPD_ASYNC_AUDIO;
- } else
- if (!hdmi_tx_is_dvi_mode(hdmi_ctrl))
- flags |= MSM_EXT_DISP_HPD_AUDIO;
-
- } else {
+ else
flags |= MSM_EXT_DISP_HPD_VIDEO;
- if (!hdmi_tx_is_dvi_mode(hdmi_ctrl))
- flags |= MSM_EXT_DISP_HPD_AUDIO;
- }
-
hdmi_ctrl->ext_audio_data.intf_ops.hpd(hdmi_ctrl->ext_pdev,
hdmi_ctrl->ext_audio_data.type, val, flags);
}
!hdmi_tx_is_dvi_mode(hdmi_ctrl))
hdmi_ctrl->ext_audio_data.intf_ops.notify(hdmi_ctrl->ext_pdev,
val);
+
+ hdmi_tx_send_audio_notification(hdmi_ctrl, val);
}
static struct hdmi_tx_ctrl *hdmi_tx_get_drvdata_from_panel_data(
* No need to blocking wait for display/audio in this
* case since HAL is not up so no ACK can be expected.
*/
- hdmi_tx_send_cable_notification(hdmi_ctrl, 0, true);
+ hdmi_tx_send_audio_notification(hdmi_ctrl, 0);
+ hdmi_tx_send_video_notification(hdmi_ctrl, 0, true);
}
break;
mutex_unlock(&hdmi_ctrl->tx_lock);
- hdmi_tx_send_cable_notification(hdmi_ctrl, hdmi_ctrl->hpd_state, false);
+ if (hdmi_ctrl->hpd_state)
+ hdmi_tx_send_video_notification(hdmi_ctrl,
+ hdmi_ctrl->hpd_state, true);
+ else {
+ hdmi_tx_send_audio_notification(hdmi_ctrl,
+ hdmi_ctrl->hpd_state);
+ hdmi_tx_send_video_notification(hdmi_ctrl,
+ hdmi_ctrl->hpd_state, true);
+ }
} /* hdmi_tx_hpd_int_work */
static int hdmi_tx_check_capability(struct hdmi_tx_ctrl *hdmi_ctrl)
&hdmi_ctrl->hpd_int_done, HZ/10);
if (!timeout) {
pr_debug("cable removed during suspend\n");
- hdmi_tx_send_cable_notification(hdmi_ctrl, 0, false);
+ hdmi_tx_send_audio_notification(hdmi_ctrl, 0);
+ hdmi_tx_send_video_notification(hdmi_ctrl, 0, true);
}
}
{
if (hdmi_ctrl->panel_suspend) {
pr_debug("panel suspend has triggered\n");
- hdmi_tx_send_cable_notification(hdmi_ctrl, 0, false);
+ hdmi_tx_send_audio_notification(hdmi_ctrl, 0);
+ hdmi_tx_send_video_notification(hdmi_ctrl, 0, true);
}
return 0;