summaryrefslogtreecommitdiffstats
path: root/drivers/gpu
diff options
context:
space:
mode:
authorBogdan Togorean <bogdan.togorean@analog.com>2020-04-13 14:35:08 +0300
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2020-06-20 10:25:06 +0200
commit805574dc4f38d6604d740a441758414a4ffd6315 (patch)
tree0040c2977ed8a8706312d9507d2fbf60017cd3b4 /drivers/gpu
parent16cdceada68c5643ee05f28949d6724f1fabb080 (diff)
downloadlinux-stable-805574dc4f38d6604d740a441758414a4ffd6315.tar.gz
linux-stable-805574dc4f38d6604d740a441758414a4ffd6315.tar.bz2
linux-stable-805574dc4f38d6604d740a441758414a4ffd6315.zip
drm: bridge: adv7511: Extend list of audio sample rates
[ Upstream commit b97b6a1f6e14a25d1e1ca2a46c5fa3e2ca374e22 ] ADV7511 support sample rates up to 192kHz. CTS and N parameters should be computed accordingly so this commit extend the list up to maximum supported sample rate. Signed-off-by: Bogdan Togorean <bogdan.togorean@analog.com> Reviewed-by: Andrzej Hajda <a.hajda@samsung.com> Signed-off-by: Andrzej Hajda <a.hajda@samsung.com> Link: https://patchwork.freedesktop.org/patch/msgid/20200413113513.86091-2-bogdan.togorean@analog.com Signed-off-by: Sasha Levin <sashal@kernel.org>
Diffstat (limited to 'drivers/gpu')
-rw-r--r--drivers/gpu/drm/bridge/adv7511/adv7511_audio.c12
1 files changed, 7 insertions, 5 deletions
diff --git a/drivers/gpu/drm/bridge/adv7511/adv7511_audio.c b/drivers/gpu/drm/bridge/adv7511/adv7511_audio.c
index 67469c26bae8..45a027d7a1e4 100644
--- a/drivers/gpu/drm/bridge/adv7511/adv7511_audio.c
+++ b/drivers/gpu/drm/bridge/adv7511/adv7511_audio.c
@@ -20,13 +20,15 @@ static void adv7511_calc_cts_n(unsigned int f_tmds, unsigned int fs,
{
switch (fs) {
case 32000:
- *n = 4096;
+ case 48000:
+ case 96000:
+ case 192000:
+ *n = fs * 128 / 1000;
break;
case 44100:
- *n = 6272;
- break;
- case 48000:
- *n = 6144;
+ case 88200:
+ case 176400:
+ *n = fs * 128 / 900;
break;
}