mirror of
https://github.com/edk2-porting/linux-next.git
synced 2025-01-11 23:23:52 +08:00
[media] mn88473: simplify bandwidth registers setting code
Signed-off-by: Benjamin Larsson <benjamin@southpole.se> Reviewed-by: Antti Palosaari <crope@iki.fi> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
This commit is contained in:
parent
3b786f1316
commit
3d945be05a
@ -59,28 +59,13 @@ static int mn88473_set_frontend(struct dvb_frontend *fe)
|
|||||||
goto err;
|
goto err;
|
||||||
}
|
}
|
||||||
|
|
||||||
switch (c->delivery_system) {
|
if (c->bandwidth_hz <= 6000000) {
|
||||||
case SYS_DVBT:
|
memcpy(bw_val, "\xe9\x55\x55\x1c\x29\x1c\x29", 7);
|
||||||
case SYS_DVBT2:
|
} else if (c->bandwidth_hz <= 7000000) {
|
||||||
if (c->bandwidth_hz <= 6000000) {
|
memcpy(bw_val, "\xc8\x00\x00\x17\x0a\x17\x0a", 7);
|
||||||
/* IF 3570000 Hz, BW 6000000 Hz */
|
} else if (c->bandwidth_hz <= 8000000) {
|
||||||
memcpy(bw_val, "\xe9\x55\x55\x1c\x29\x1c\x29", 7);
|
|
||||||
} else if (c->bandwidth_hz <= 7000000) {
|
|
||||||
/* IF 4570000 Hz, BW 7000000 Hz */
|
|
||||||
memcpy(bw_val, "\xc8\x00\x00\x17\x0a\x17\x0a", 7);
|
|
||||||
} else if (c->bandwidth_hz <= 8000000) {
|
|
||||||
/* IF 4570000 Hz, BW 8000000 Hz */
|
|
||||||
memcpy(bw_val, "\xaf\x00\x00\x11\xec\x11\xec", 7);
|
|
||||||
} else {
|
|
||||||
ret = -EINVAL;
|
|
||||||
goto err;
|
|
||||||
}
|
|
||||||
break;
|
|
||||||
case SYS_DVBC_ANNEX_A:
|
|
||||||
/* IF 5070000 Hz, BW 8000000 Hz */
|
|
||||||
memcpy(bw_val, "\xaf\x00\x00\x11\xec\x11\xec", 7);
|
memcpy(bw_val, "\xaf\x00\x00\x11\xec\x11\xec", 7);
|
||||||
break;
|
} else {
|
||||||
default:
|
|
||||||
ret = -EINVAL;
|
ret = -EINVAL;
|
||||||
goto err;
|
goto err;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user