summaryrefslogtreecommitdiff
path: root/drivers/video/fbdev/msm
diff options
context:
space:
mode:
authorSandeep Panda <spanda@codeaurora.org>2016-06-16 15:40:26 +0530
committerKyle Yan <kyan@codeaurora.org>2016-06-17 15:18:39 -0700
commitf4d714686f6cc7a27757c9140896bab79ebf3cc0 (patch)
tree867fcc3086d8b9dd274519775c6c4560b89d2184 /drivers/video/fbdev/msm
parent5eaa7f688fac14a9aefb9ae4db75f94309a37537 (diff)
msm: mdss: set N_MUTIPLIER bit as per different audio sample rate
In the current implementation N_MULTIPLIER bit for audio packets on HDMI TX controller is not getting set properly. Fix this issue by setting the multiplier value according to the sample rate set for audio playback. Change-Id: I25ab63eeadd5fd08649e9e828dcab83ec1b60161 Signed-off-by: Sandeep Panda <spanda@codeaurora.org>
Diffstat (limited to 'drivers/video/fbdev/msm')
-rw-r--r--drivers/video/fbdev/msm/mdss_hdmi_audio.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/drivers/video/fbdev/msm/mdss_hdmi_audio.c b/drivers/video/fbdev/msm/mdss_hdmi_audio.c
index 780629eb25b9..23064279e286 100644
--- a/drivers/video/fbdev/msm/mdss_hdmi_audio.c
+++ b/drivers/video/fbdev/msm/mdss_hdmi_audio.c
@@ -146,7 +146,7 @@ static void hdmi_audio_acr_enable(struct hdmi_audio *audio)
struct dss_io_data *io;
struct hdmi_audio_acr acr;
struct msm_ext_disp_audio_setup_params *params;
- u32 pclk, layout, multiplier, sample_rate;
+ u32 pclk, layout, multiplier = 1, sample_rate;
u32 acr_pkt_ctl, aud_pkt_ctl2, acr_reg_cts, acr_reg_n;
if (!audio) {
@@ -169,9 +169,6 @@ static void hdmi_audio_acr_enable(struct hdmi_audio *audio)
/* AUDIO_PRIORITY | SOURCE */
acr_pkt_ctl = BIT(31) | BIT(8);
- /* N_MULTIPLE(multiplier) */
- acr_pkt_ctl |= (multiplier & 0x7) << 16;
-
switch (sample_rate) {
case AUDIO_SAMPLE_RATE_44_1KHZ:
acr_pkt_ctl |= 0x2 << 4;
@@ -240,6 +237,10 @@ static void hdmi_audio_acr_enable(struct hdmi_audio *audio)
aud_pkt_ctl2 = BIT(0) | (layout << 1);
+ /* N_MULTIPLE(multiplier) */
+ acr_pkt_ctl &= ~(7 << 16);
+ acr_pkt_ctl |= (multiplier & 0x7) << 16;
+
/* SEND | CONT */
acr_pkt_ctl |= BIT(0) | BIT(1);