diff options
author | Evgeny Plehov <crazycat69@yandex.ru> | 2012-11-29 13:27:38 -0500 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@redhat.com> | 2013-01-06 08:08:44 -0500 |
commit | 73ec66c000e9816806c7380ca3420f4e0638c40e (patch) | |
tree | 141036c18c1ef9c34e42de9516dfa48124ecc304 /drivers/media/dvb-frontends | |
parent | 55ee64b30a38d688232e5eb2860467dddc493573 (diff) |
[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>
Diffstat (limited to 'drivers/media/dvb-frontends')
-rw-r--r-- | drivers/media/dvb-frontends/stv0900_core.c | 26 | ||||
-rw-r--r-- | drivers/media/dvb-frontends/stv0900_reg.h | 3 |
2 files changed, 29 insertions, 0 deletions
diff --git a/drivers/media/dvb-frontends/stv0900_core.c b/drivers/media/dvb-frontends/stv0900_core.c index b551ca350e00..0fb34e1909d1 100644 --- a/drivers/media/dvb-frontends/stv0900_core.c +++ b/drivers/media/dvb-frontends/stv0900_core.c | |||
@@ -1558,6 +1558,27 @@ static int stv0900_status(struct stv0900_internal *intp, | |||
1558 | return locked; | 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 | static enum dvbfe_search stv0900_search(struct dvb_frontend *fe) | 1582 | static enum dvbfe_search stv0900_search(struct dvb_frontend *fe) |
1562 | { | 1583 | { |
1563 | struct stv0900_state *state = fe->demodulator_priv; | 1584 | struct stv0900_state *state = fe->demodulator_priv; |
@@ -1578,6 +1599,8 @@ static enum dvbfe_search stv0900_search(struct dvb_frontend *fe) | |||
1578 | if (state->config->set_ts_params) | 1599 | if (state->config->set_ts_params) |
1579 | state->config->set_ts_params(fe, 0); | 1600 | state->config->set_ts_params(fe, 0); |
1580 | 1601 | ||
1602 | stv0900_set_mis(intp, demod, c->stream_id); | ||
1603 | |||
1581 | p_result.locked = FALSE; | 1604 | p_result.locked = FALSE; |
1582 | p_search.path = demod; | 1605 | p_search.path = demod; |
1583 | p_search.frequency = c->frequency; | 1606 | p_search.frequency = c->frequency; |
@@ -1935,6 +1958,9 @@ struct dvb_frontend *stv0900_attach(const struct stv0900_config *config, | |||
1935 | if (err_stv0900) | 1958 | if (err_stv0900) |
1936 | goto error; | 1959 | goto error; |
1937 | 1960 | ||
1961 | if (state->internal->chip_id >= 0x30) | ||
1962 | state->frontend.ops.info.caps |= FE_CAN_MULTISTREAM; | ||
1963 | |||
1938 | break; | 1964 | break; |
1939 | default: | 1965 | default: |
1940 | goto error; | 1966 | goto error; |
diff --git a/drivers/media/dvb-frontends/stv0900_reg.h b/drivers/media/dvb-frontends/stv0900_reg.h index 731afe93a823..511ed2a2d987 100644 --- a/drivers/media/dvb-frontends/stv0900_reg.h +++ b/drivers/media/dvb-frontends/stv0900_reg.h | |||
@@ -3446,8 +3446,11 @@ extern s32 shiftx(s32 x, int demod, s32 shift); | |||
3446 | #define R0900_P1_PDELCTRL1 0xf550 | 3446 | #define R0900_P1_PDELCTRL1 0xf550 |
3447 | #define PDELCTRL1 REGx(R0900_P1_PDELCTRL1) | 3447 | #define PDELCTRL1 REGx(R0900_P1_PDELCTRL1) |
3448 | #define F0900_P1_INV_MISMASK 0xf5500080 | 3448 | #define F0900_P1_INV_MISMASK 0xf5500080 |
3449 | #define INV_MISMASK FLDx(F0900_P1_INV_MISMASK) | ||
3449 | #define F0900_P1_FILTER_EN 0xf5500020 | 3450 | #define F0900_P1_FILTER_EN 0xf5500020 |
3451 | #define FILTER_EN FLDx(F0900_P1_FILTER_EN) | ||
3450 | #define F0900_P1_EN_MIS00 0xf5500002 | 3452 | #define F0900_P1_EN_MIS00 0xf5500002 |
3453 | #define EN_MIS00 FLDx(F0900_P1_EN_MIS00) | ||
3451 | #define F0900_P1_ALGOSWRST 0xf5500001 | 3454 | #define F0900_P1_ALGOSWRST 0xf5500001 |
3452 | #define ALGOSWRST FLDx(F0900_P1_ALGOSWRST) | 3455 | #define ALGOSWRST FLDx(F0900_P1_ALGOSWRST) |
3453 | 3456 | ||