static int hdmi_s_dv_timings(struct v4l2_subdev *sd, struct v4l2_dv_timings *timings) { struct hdmi_device *hdev = sd_to_hdmi_dev(sd); struct device *dev = hdev->dev; hdev->cur_conf = hdmi_timing2conf(timings); if (hdev->cur_conf == NULL) { dev_err(dev, "timings not supported\n"); return -EINVAL; } hdev->cur_timings = *timings; if (hdev->streaming == HDMI_STREAMING) { hdmi_streamoff(hdev); hdmi_s_power(sd, 0); hdev->streaming = HDMI_STOP; } return 0; }
static void hdmi_hpd_changed(struct hdmi_device *hdev, int state) { int ret; #ifdef CONFIG_SEC_MHL_SUPPORT u32 audio_info = 0; #endif if (state == switch_get_state(&hdev->hpd_switch)) return; if (state) { ret = edid_update(hdev); if (ret == -ENODEV) { dev_err(hdev->dev, "failed to update edid\n"); return; } hdev->dvi_mode = !edid_supports_hdmi(hdev); hdev->cur_timings = edid_preferred_preset(hdev); hdev->cur_conf = hdmi_timing2conf(&hdev->cur_timings); } switch_set_state(&hdev->hpd_switch, state); dev_info(hdev->dev, "%s\n", state ? "plugged" : "unplugged"); #ifdef CONFIG_SEC_MHL_SUPPORT if (state) { /*Audio CH event*/ audio_info = edid_audio_informs(hdev); pr_err("[HDMI] send audio_info :: %x\n", audio_info); switch_set_state(&hdev->audio_ch_switch, (int)audio_info); } else { switch_set_state(&hdev->audio_ch_switch, -1); } #endif }
static void hdmi_hpd_changed(struct hdmi_device *hdev, int state) { int ret; if (state == switch_get_state(&hdev->hpd_switch)) return; if (state) { ret = edid_update(hdev); if (ret == -ENODEV) { dev_err(hdev->dev, "failed to update edid\n"); return; } hdev->dvi_mode = !edid_supports_hdmi(hdev); hdev->cur_timings = edid_preferred_preset(hdev); hdev->cur_conf = hdmi_timing2conf(&hdev->cur_timings); } switch_set_state(&hdev->hpd_switch, state); dev_info(hdev->dev, "%s\n", state ? "plugged" : "unplugged"); }