Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit ab8d8780 authored by Sandeep Panda's avatar Sandeep Panda
Browse files

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: default avatarSandeep Panda <spanda@codeaurora.org>
parent cc957303
Loading
Loading
Loading
Loading
+5 −4
Original line number Diff line number Diff line
@@ -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_hdmi_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);