Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

[media] stv0900: Multistream support

Multistream support for stv0900. For Netup Dual S2 CI with STV0900BAC/AAC.

Signed-off-by: Evgeny Plehov <EvgenyPlehov@ukr.net>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>

authored by

Evgeny Plehov and committed by
Mauro Carvalho Chehab
73ec66c0 55ee64b3

+29
+26
drivers/media/dvb-frontends/stv0900_core.c
··· 1558 1558 return locked; 1559 1559 } 1560 1560 1561 + static int stv0900_set_mis(struct stv0900_internal *intp, 1562 + enum fe_stv0900_demod_num demod, int mis) 1563 + { 1564 + enum fe_stv0900_error error = STV0900_NO_ERROR; 1565 + 1566 + dprintk("%s\n", __func__); 1567 + 1568 + if (mis < 0 || mis > 255) { 1569 + dprintk("Disable MIS filtering\n"); 1570 + stv0900_write_bits(intp, FILTER_EN, 0); 1571 + } else { 1572 + dprintk("Enable MIS filtering - %d\n", mis); 1573 + stv0900_write_bits(intp, FILTER_EN, 1); 1574 + stv0900_write_reg(intp, ISIENTRY, mis); 1575 + stv0900_write_reg(intp, ISIBITENA, 0xff); 1576 + } 1577 + 1578 + return error; 1579 + } 1580 + 1581 + 1561 1582 static enum dvbfe_search stv0900_search(struct dvb_frontend *fe) 1562 1583 { 1563 1584 struct stv0900_state *state = fe->demodulator_priv; ··· 1598 1577 1599 1578 if (state->config->set_ts_params) 1600 1579 state->config->set_ts_params(fe, 0); 1580 + 1581 + stv0900_set_mis(intp, demod, c->stream_id); 1601 1582 1602 1583 p_result.locked = FALSE; 1603 1584 p_search.path = demod; ··· 1957 1934 1958 1935 if (err_stv0900) 1959 1936 goto error; 1937 + 1938 + if (state->internal->chip_id >= 0x30) 1939 + state->frontend.ops.info.caps |= FE_CAN_MULTISTREAM; 1960 1940 1961 1941 break; 1962 1942 default:
+3
drivers/media/dvb-frontends/stv0900_reg.h
··· 3446 3446 #define R0900_P1_PDELCTRL1 0xf550 3447 3447 #define PDELCTRL1 REGx(R0900_P1_PDELCTRL1) 3448 3448 #define F0900_P1_INV_MISMASK 0xf5500080 3449 + #define INV_MISMASK FLDx(F0900_P1_INV_MISMASK) 3449 3450 #define F0900_P1_FILTER_EN 0xf5500020 3451 + #define FILTER_EN FLDx(F0900_P1_FILTER_EN) 3450 3452 #define F0900_P1_EN_MIS00 0xf5500002 3453 + #define EN_MIS00 FLDx(F0900_P1_EN_MIS00) 3451 3454 #define F0900_P1_ALGOSWRST 0xf5500001 3452 3455 #define ALGOSWRST FLDx(F0900_P1_ALGOSWRST) 3453 3456