Commit 34ba2e65 authored by Mauro Carvalho Chehab's avatar Mauro Carvalho Chehab

[media] dib8000: Fix handling of interleave bigger than 2

If interleave is bigger than 2, the code will set it to 0, as
dib8000 registers use a log2(). So, change the code to handle
it accordingly.
Acked-By: default avatarPatrick Boettcher <pboettcher@kernellabs.com>
Signed-off-by: default avatarMauro Carvalho Chehab <m.chehab@samsung.com>
parent ff792c85
...@@ -2033,9 +2033,8 @@ static u16 dib8000_set_layer(struct dib8000_state *state, u8 layer_index, u16 ma ...@@ -2033,9 +2033,8 @@ static u16 dib8000_set_layer(struct dib8000_state *state, u8 layer_index, u16 ma
break; break;
} }
if ((c->layer[layer_index].interleaving > 0) && ((c->layer[layer_index].interleaving <= 3) || (c->layer[layer_index].interleaving == 4 && c->isdbt_sb_mode == 1))) time_intlv = fls(c->layer[layer_index].interleaving);
time_intlv = c->layer[layer_index].interleaving; if (time_intlv > 3 && !(time_intlv == 4 && c->isdbt_sb_mode == 1))
else
time_intlv = 0; time_intlv = 0;
dib8000_write_word(state, 2 + layer_index, (constellation << 10) | ((c->layer[layer_index].segment_count & 0xf) << 6) | (cr << 3) | time_intlv); dib8000_write_word(state, 2 + layer_index, (constellation << 10) | ((c->layer[layer_index].segment_count & 0xf) << 6) | (cr << 3) | time_intlv);
......
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