From 10cdb76c4b30e715468267f1dc8fbc42b9642b6f Mon Sep 17 00:00:00 2001 From: Shengjiu Wang Date: Fri, 13 Nov 2020 15:34:49 +0800 Subject: [PATCH] LF-2739: mfd: mxc-hdmi-core: Complete cts value for 32kHz Complete cts value for 32kHz and different pixel clock, otherwise there is no sound for 32kHz. Signed-off-by: Shengjiu Wang Reviewed-by: Sandor Yu --- drivers/mfd/mxc-hdmi-core.c | 23 +++++++++++++++++++++-- 1 file changed, 21 insertions(+), 2 deletions(-) diff --git a/drivers/mfd/mxc-hdmi-core.c b/drivers/mfd/mxc-hdmi-core.c index 01179b48040a..6f8602dfc6e7 100644 --- a/drivers/mfd/mxc-hdmi-core.c +++ b/drivers/mfd/mxc-hdmi-core.c @@ -441,10 +441,29 @@ static unsigned int hdmi_compute_cts(unsigned int freq, unsigned long pixel_clk, unsigned int cts = 0; switch (freq) { case 32000: - if (pixel_clk == 297000000) + switch (pixel_clk) { + case 25200000: + case 27000000: + case 54000000: + case 74250000: + case 148500000: + cts = pixel_clk / 1000; + break; + case 297000000: cts = 222750; - else if (pixel_clk == 25174000) + break; + case 25174000: cts = 28125; + break; + /* + * All other TMDS clocks are not supported by + * DWC_hdmi_tx. The TMDS clocks divided or + * multiplied by 1,001 coefficients are not + * supported. + */ + default: + break; + } break; case 48000: case 96000: