summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTatenda Chipeperekwa <tatendac@codeaurora.org>2015-10-13 11:06:29 -0700
committerDavid Keitel <dkeitel@codeaurora.org>2016-03-23 20:46:36 -0700
commit85cff3d6cfe8a158ab1df073ac3a922e455cff32 (patch)
tree8f24bdd534cd4fd51d303ff61003f1775919ac35
parentdbee1d115f9bf1fce31e4fd24ea33d813f74bab8 (diff)
msm: mdss: hdmi: adjust audio clock frequency for YUV modes
The audio clock frequency for a given YUV mode must be scaled at the same ratio as the pixel clock when programming the hardware for audio transmission. This will ensure that the video and audio data for YUV modes are transmitted at the same rate, and ensure smooth playback on the sink. Change-Id: I9405a0e0e39405c5c287e3e8a764d5c21bb42adb Signed-off-by: Tatenda Chipeperekwa <tatendac@codeaurora.org>
-rw-r--r--drivers/video/fbdev/msm/mdss_hdmi_tx.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/drivers/video/fbdev/msm/mdss_hdmi_tx.c b/drivers/video/fbdev/msm/mdss_hdmi_tx.c
index 87ac565f1868..f55627ae75a0 100644
--- a/drivers/video/fbdev/msm/mdss_hdmi_tx.c
+++ b/drivers/video/fbdev/msm/mdss_hdmi_tx.c
@@ -198,6 +198,7 @@ static void hdmi_tx_hpd_off(struct hdmi_tx_ctrl *hdmi_ctrl);
static int hdmi_tx_enable_power(struct hdmi_tx_ctrl *hdmi_ctrl,
enum hdmi_tx_power_module_type module, int enable);
static int hdmi_tx_audio_setup(struct hdmi_tx_ctrl *hdmi_ctrl);
+static int hdmi_tx_setup_tmds_clk_rate(struct hdmi_tx_ctrl *hdmi_ctrl);
static struct mdss_hw hdmi_tx_hw = {
.hw_ndx = MDSS_HW_HDMI,
@@ -2605,6 +2606,7 @@ static int hdmi_tx_audio_acr_setup(struct hdmi_tx_ctrl *hdmi_ctrl,
/* Read first before writing */
u32 acr_pck_ctrl_reg;
u32 sample_rate;
+ u32 pixel_freq;
struct dss_io_data *io = NULL;
if (!hdmi_ctrl) {
@@ -2636,15 +2638,16 @@ static int hdmi_tx_audio_acr_setup(struct hdmi_tx_ctrl *hdmi_ctrl,
__func__, hdmi_ctrl->vid_cfg.vic);
return -EPERM;
}
+ pixel_freq = hdmi_tx_setup_tmds_clk_rate(hdmi_ctrl);
for (i = 0; i < lut_size;
audio_acr = &hdmi_tx_audio_acr_lut[++i]) {
- if (audio_acr->pclk == timing->pixel_freq)
+ if (audio_acr->pclk == pixel_freq)
break;
}
if (i >= lut_size) {
DEV_WARN("%s: pixel clk %d not supported\n", __func__,
- timing->pixel_freq);
+ pixel_freq);
return -EPERM;
}