Skip to content

Commit

Permalink
msm_fb: Check for ACP and ACFG register before reset core.
Browse files Browse the repository at this point in the history
Check for Bit[0] of Audio Packet Control Register and Audio
Configuration Register before resetting HDMI core.
Even after sending OFFLINE event, QDSP take time to switch between
stereo and hdmi audio mode. HDMI reset core should not be called
untill that switch happens.

CRs-Fixed: 310700
Signed-off-by: Abhishek Kharbanda <akharban@codeaurora.org>
(cherry picked from commit a077d0063dfb8a39a869f56099dd0ffe85301180)

Change-Id: Ib664232c07d00dad7a2d89875fe2903b8ab1016c
Signed-off-by: Swetha Basineni <sbasin@codeaurora.org>
  • Loading branch information
Abhishek Kharbanda authored and Kali- committed Jan 4, 2012
1 parent 4a48084 commit 59e44c4
Showing 1 changed file with 20 additions and 0 deletions.
20 changes: 20 additions & 0 deletions drivers/video/msm/hdmi_msm.c
Original file line number Diff line number Diff line change
Expand Up @@ -3676,7 +3676,27 @@ void hdmi_msm_reset_core(void)
static void hdmi_msm_turn_on(void)
{
uint32 hpd_ctrl;
uint32 audio_pkt_ctrl, audio_cfg;
/*
* Number of wait iterations for QDSP to disable Audio Engine
* before resetting HDMI core
*/
int i = 10;
audio_pkt_ctrl = HDMI_INP_ND(0x0020);
audio_cfg = HDMI_INP_ND(0x01D0);

/*
* Checking BIT[0] of AUDIO PACKET CONTROL and
* AUDIO CONFIGURATION register
*/
while (((audio_pkt_ctrl & 0x00000001) || (audio_cfg & 0x00000001))
&& (i--)) {
audio_pkt_ctrl = HDMI_INP_ND(0x0020);
audio_cfg = HDMI_INP_ND(0x01D0);
DEV_DBG("%d times :: HDMI AUDIO PACKET is %08x and "
"AUDIO CFG is %08x", i, audio_pkt_ctrl, audio_cfg);
msleep(20);
}
hdmi_msm_reset_core();
hdmi_msm_init_phy(external_common_state->video_resolution);
/* HDMI_USEC_REFTIMER[0x0208] */
Expand Down

0 comments on commit 59e44c4

Please sign in to comment.