Commit 2470fecc authored by Jean-Francois Moine's avatar Jean-Francois Moine Committed by Russell King

drm/i2c: tda998x: adjust the audio clock divider for S/PDIF

According to some tests on the Cubox (Marvell Armada 510 + TDA19988),
the S/PDIF input asks for a greater audio clock divider.
Tested-by: default avatarRussell King <rmk+kernel@arm.linux.org.uk>
Acked-by: default avatarRussell King <rmk+kernel@arm.linux.org.uk>
Signed-off-by: default avatarJean-Francois Moine <moinejf@free.fr>
Signed-off-by: default avatarRussell King <rmk+kernel@arm.linux.org.uk>
parent a8b517e5
...@@ -680,10 +680,14 @@ tda998x_configure_audio(struct tda998x_priv *priv, ...@@ -680,10 +680,14 @@ tda998x_configure_audio(struct tda998x_priv *priv,
* There is no detailed info in the datasheet, so we just * There is no detailed info in the datasheet, so we just
* assume 100MHz requires larger divider. * assume 100MHz requires larger divider.
*/ */
adiv = AUDIO_DIV_SERCLK_8;
if (mode->clock > 100000) if (mode->clock > 100000)
adiv = AUDIO_DIV_SERCLK_16; adiv++; /* AUDIO_DIV_SERCLK_16 */
else
adiv = AUDIO_DIV_SERCLK_8; /* S/PDIF asks for a larger divider */
if (p->audio_format == AFMT_SPDIF)
adiv++; /* AUDIO_DIV_SERCLK_16 or _32 */
reg_write(priv, REG_AUDIO_DIV, adiv); reg_write(priv, REG_AUDIO_DIV, adiv);
/* /*
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment