diff options
author | Jean-Francois Moine <moinejf@free.fr> | 2014-01-25 18:14:36 +0100 |
---|---|---|
committer | Russell King <rmk+kernel@arm.linux.org.uk> | 2014-02-13 20:43:46 +0100 |
commit | 2470feccbf030652380c2d73304576137b0fb12e (patch) | |
tree | e422312c2c12d875ac2401ab39f914405841a15c /drivers/gpu/drm/i2c | |
parent | drm/i2c: tda998x: code optimization (diff) | |
download | linux-2470feccbf030652380c2d73304576137b0fb12e.tar.xz linux-2470feccbf030652380c2d73304576137b0fb12e.zip |
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: Russell King <rmk+kernel@arm.linux.org.uk>
Acked-by: Russell King <rmk+kernel@arm.linux.org.uk>
Signed-off-by: Jean-Francois Moine <moinejf@free.fr>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Diffstat (limited to 'drivers/gpu/drm/i2c')
-rw-r--r-- | drivers/gpu/drm/i2c/tda998x_drv.c | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/drivers/gpu/drm/i2c/tda998x_drv.c b/drivers/gpu/drm/i2c/tda998x_drv.c index 666ee24329b9..d0f3a4cbb866 100644 --- a/drivers/gpu/drm/i2c/tda998x_drv.c +++ b/drivers/gpu/drm/i2c/tda998x_drv.c @@ -680,10 +680,14 @@ tda998x_configure_audio(struct tda998x_priv *priv, * There is no detailed info in the datasheet, so we just * assume 100MHz requires larger divider. */ + adiv = AUDIO_DIV_SERCLK_8; if (mode->clock > 100000) - adiv = AUDIO_DIV_SERCLK_16; - else - adiv = AUDIO_DIV_SERCLK_8; + adiv++; /* AUDIO_DIV_SERCLK_16 */ + + /* 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); /* |