msm: mdss: hdmi: fix no audio over HDMI on device bootup
In case of HDMI interface as primary, if device boots up with HDMI connected, external interface driver is unable to notify audio events as audio codec is getting registered later. Add change to send audio event once audio codec gets registered. Change-Id: I8d630adf892714ff2eb4d6039dc058b54c425b83 Signed-off-by: Narender Ankam <nankam@codeaurora.org>
This commit is contained in:
parent
8eb5765563
commit
942e1ce7e9
1 changed files with 23 additions and 0 deletions
|
@ -39,6 +39,8 @@ struct msm_ext_disp {
|
|||
struct list_head display_list;
|
||||
struct mutex lock;
|
||||
struct completion hpd_comp;
|
||||
bool update_audio;
|
||||
u32 flags;
|
||||
};
|
||||
|
||||
static int msm_ext_disp_get_intf_data(struct msm_ext_disp *ext_disp,
|
||||
|
@ -340,6 +342,8 @@ static int msm_ext_disp_hpd(struct platform_device *pdev,
|
|||
goto end;
|
||||
}
|
||||
|
||||
ext_disp->flags = flags;
|
||||
|
||||
if (state == EXT_DISPLAY_CABLE_CONNECT) {
|
||||
if (!msm_ext_disp_validate_connect(ext_disp, type, flags)) {
|
||||
pr_err("Display interface (%s) already connected\n",
|
||||
|
@ -570,6 +574,7 @@ static int msm_ext_disp_update_audio_ops(struct msm_ext_disp *ext_disp,
|
|||
{
|
||||
int ret = 0;
|
||||
struct msm_ext_disp_audio_codec_ops *ops = ext_disp->ops;
|
||||
ext_disp->update_audio = false;
|
||||
|
||||
if (!(flags & MSM_EXT_DISP_HPD_AUDIO)) {
|
||||
pr_debug("skipping audio ops setup for display (%s)\n",
|
||||
|
@ -579,6 +584,10 @@ static int msm_ext_disp_update_audio_ops(struct msm_ext_disp *ext_disp,
|
|||
|
||||
if (!ops) {
|
||||
pr_err("Invalid audio ops\n");
|
||||
if (state == EXT_DISPLAY_CABLE_CONNECT) {
|
||||
/* update audio ops once audio codec gets registered */
|
||||
ext_disp->update_audio = true;
|
||||
}
|
||||
ret = -EINVAL;
|
||||
goto end;
|
||||
}
|
||||
|
@ -682,6 +691,18 @@ int msm_ext_disp_register_audio_codec(struct platform_device *pdev,
|
|||
|
||||
pr_debug("audio codec registered\n");
|
||||
|
||||
mutex_lock(&ext_disp->lock);
|
||||
if (ext_disp->update_audio) {
|
||||
msm_ext_disp_update_audio_ops(ext_disp, ext_disp->current_disp,
|
||||
EXT_DISPLAY_CABLE_CONNECT, ext_disp->flags);
|
||||
|
||||
msm_ext_disp_process_audio(ext_disp, ext_disp->current_disp,
|
||||
EXT_DISPLAY_CABLE_CONNECT, ext_disp->flags);
|
||||
|
||||
ext_disp->update_audio = false;
|
||||
}
|
||||
mutex_unlock(&ext_disp->lock);
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
@ -803,6 +824,8 @@ static int msm_ext_disp_probe(struct platform_device *pdev)
|
|||
INIT_LIST_HEAD(&ext_disp->display_list);
|
||||
init_completion(&ext_disp->hpd_comp);
|
||||
ext_disp->current_disp = EXT_DISPLAY_TYPE_MAX;
|
||||
ext_disp->flags = 0;
|
||||
ext_disp->update_audio = false;
|
||||
|
||||
return ret;
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue