Commit e399a789 authored by Manu Abraham's avatar Manu Abraham Committed by Mauro Carvalho Chehab

V4L/DVB (9463): Make delivery system standalone.

Eventhough the delivery system is made standalone, DVBFE_SET_DELSYS
needs to be set as the very first operation, for a multistandard frontend

Splitting delivery system out as a new ioctl, makes things a bit more
easier to understand.
Signed-off-by: default avatarManu Abraham <manu@linuxtv.org>
Signed-off-by: default avatarMauro Carvalho Chehab <mchehab@redhat.com>
parent b91a7cb0
...@@ -1374,7 +1374,6 @@ static int stb0899_get_info(struct dvb_frontend *fe, struct dvbfe_info *fe_info) ...@@ -1374,7 +1374,6 @@ static int stb0899_get_info(struct dvb_frontend *fe, struct dvbfe_info *fe_info)
dprintk(verbose, FE_DEBUG, 1, "Get Info"); dprintk(verbose, FE_DEBUG, 1, "Get Info");
state->delsys = fe_info->delivery;
switch (state->delsys) { switch (state->delsys) {
case DVBFE_DELSYS_DVBS: case DVBFE_DELSYS_DVBS:
dprintk(verbose, FE_ERROR, 1, "Querying DVB-S info"); dprintk(verbose, FE_ERROR, 1, "Querying DVB-S info");
...@@ -1404,7 +1403,7 @@ static int stb0899_get_delsys(struct dvb_frontend *fe, enum dvbfe_delsys *fe_del ...@@ -1404,7 +1403,7 @@ static int stb0899_get_delsys(struct dvb_frontend *fe, enum dvbfe_delsys *fe_del
return 0; return 0;
} }
void stb0899_set_delsys(struct stb0899_state *state) static void stb0899_set_delivery(struct stb0899_state *state)
{ {
u8 reg; u8 reg;
u8 stop_clk[2]; u8 stop_clk[2];
...@@ -1563,7 +1562,7 @@ static enum dvbfe_search stb0899_search(struct dvb_frontend *fe, struct dvbfe_pa ...@@ -1563,7 +1562,7 @@ static enum dvbfe_search stb0899_search(struct dvb_frontend *fe, struct dvbfe_pa
/* checking Search Range is meaningless for a fixed 3 Mhz */ /* checking Search Range is meaningless for a fixed 3 Mhz */
if (INRANGE(i_params->srate, 1000000, 45000000)) { if (INRANGE(i_params->srate, 1000000, 45000000)) {
dprintk(verbose, FE_DEBUG, 1, "Parameters IN RANGE"); dprintk(verbose, FE_DEBUG, 1, "Parameters IN RANGE");
stb0899_set_delsys(state); stb0899_set_delivery(state);
if (state->config->tuner_set_rfsiggain) { if (state->config->tuner_set_rfsiggain) {
if (internal->srate > 15000000) if (internal->srate > 15000000)
...@@ -1934,6 +1933,14 @@ static enum dvbfe_algo stb0899_frontend_algo(struct dvb_frontend *fe) ...@@ -1934,6 +1933,14 @@ static enum dvbfe_algo stb0899_frontend_algo(struct dvb_frontend *fe)
return DVBFE_ALGO_CUSTOM; return DVBFE_ALGO_CUSTOM;
} }
static int stb0899_set_delsys(struct dvb_frontend *fe, enum dvbfe_delsys delsys)
{
struct stb0899_state *state = fe->demodulator_priv;
state->delsys = delsys;
return 0;
}
static struct dvb_frontend_ops stb0899_ops = { static struct dvb_frontend_ops stb0899_ops = {
.info = { .info = {
...@@ -1948,6 +1955,7 @@ static struct dvb_frontend_ops stb0899_ops = { ...@@ -1948,6 +1955,7 @@ static struct dvb_frontend_ops stb0899_ops = {
.i2c_gate_ctrl = stb0899_i2c_gate_ctrl, .i2c_gate_ctrl = stb0899_i2c_gate_ctrl,
.get_info = stb0899_get_info, .get_info = stb0899_get_info,
.get_delsys = stb0899_get_delsys, .get_delsys = stb0899_get_delsys,
.set_delsys = stb0899_set_delsys,
.get_frontend_algo = stb0899_frontend_algo, .get_frontend_algo = stb0899_frontend_algo,
.search = stb0899_search, .search = stb0899_search,
......
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