summaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorMauro Carvalho Chehab <m.chehab@samsung.com>2014-07-11 21:37:47 -0300
committerMauro Carvalho Chehab <m.chehab@samsung.com>2014-07-22 21:33:41 -0300
commit4247368bf76fcf40307e471333f18a07e0c9fe91 (patch)
treef503ee793adb15825829e2779af6d5c9cc39d746 /drivers
parent276dfc4b99a65c3b05e37a267e5e36e0e8381b7a (diff)
[media] mb86a20s: Fix Interleaving
Interleaving code was wrong at mb86a20s: instead, it was looking at the Guard Interval. Fix it. Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/media/dvb-frontends/mb86a20s.c18
1 files changed, 4 insertions, 14 deletions
diff --git a/drivers/media/dvb-frontends/mb86a20s.c b/drivers/media/dvb-frontends/mb86a20s.c
index 79bc1c9d0fa..83fac788681 100644
--- a/drivers/media/dvb-frontends/mb86a20s.c
+++ b/drivers/media/dvb-frontends/mb86a20s.c
@@ -459,6 +459,9 @@ static int mb86a20s_get_interleaving(struct mb86a20s_state *state,
unsigned layer)
{
int rc;
+ int interleaving[] = {
+ 0, 1, 2, 4, 8
+ };
static unsigned char reg[] = {
[0] = 0x88, /* Layer A */
@@ -475,20 +478,7 @@ static int mb86a20s_get_interleaving(struct mb86a20s_state *state,
if (rc < 0)
return rc;
- switch ((rc >> 4) & 0x07) {
- case 1:
- return GUARD_INTERVAL_1_4;
- case 2:
- return GUARD_INTERVAL_1_8;
- case 3:
- return GUARD_INTERVAL_1_16;
- case 4:
- return GUARD_INTERVAL_1_32;
-
- default:
- case 0:
- return GUARD_INTERVAL_AUTO;
- }
+ return interleaving[(rc >> 4) & 0x07];
}
static int mb86a20s_get_segment_count(struct mb86a20s_state *state,