Commit a27378c6 authored by Mauro Carvalho Chehab's avatar Mauro Carvalho Chehab

[media] bcm3510: convert set_fontend to use DVBv5 parameters

Instead of using dvb_frontend_parameters struct, that were
designed for a subset of the supported standards, use the DVBv5
cache information.

Also, fill the supported delivery systems at dvb_frontend_ops
struct.
Signed-off-by: default avatarMauro Carvalho Chehab <mchehab@redhat.com>
parent 9b6a132b
...@@ -479,16 +479,16 @@ static int bcm3510_set_freq(struct bcm3510_state* st,u32 freq) ...@@ -479,16 +479,16 @@ static int bcm3510_set_freq(struct bcm3510_state* st,u32 freq)
return -EINVAL; return -EINVAL;
} }
static int bcm3510_set_frontend(struct dvb_frontend* fe, static int bcm3510_set_frontend(struct dvb_frontend *fe)
struct dvb_frontend_parameters *p)
{ {
struct dtv_frontend_properties *c = &fe->dtv_property_cache;
struct bcm3510_state* st = fe->demodulator_priv; struct bcm3510_state* st = fe->demodulator_priv;
struct bcm3510_hab_cmd_ext_acquire cmd; struct bcm3510_hab_cmd_ext_acquire cmd;
struct bcm3510_hab_cmd_bert_control bert; struct bcm3510_hab_cmd_bert_control bert;
int ret; int ret;
memset(&cmd,0,sizeof(cmd)); memset(&cmd,0,sizeof(cmd));
switch (p->u.vsb.modulation) { switch (c->modulation) {
case QAM_256: case QAM_256:
cmd.ACQUIRE0.MODE = 0x1; cmd.ACQUIRE0.MODE = 0x1;
cmd.ACQUIRE1.SYM_RATE = 0x1; cmd.ACQUIRE1.SYM_RATE = 0x1;
...@@ -499,7 +499,8 @@ static int bcm3510_set_frontend(struct dvb_frontend* fe, ...@@ -499,7 +499,8 @@ static int bcm3510_set_frontend(struct dvb_frontend* fe,
cmd.ACQUIRE1.SYM_RATE = 0x2; cmd.ACQUIRE1.SYM_RATE = 0x2;
cmd.ACQUIRE1.IF_FREQ = 0x1; cmd.ACQUIRE1.IF_FREQ = 0x1;
break; break;
/* case QAM_256: #if 0
case QAM_256:
cmd.ACQUIRE0.MODE = 0x3; cmd.ACQUIRE0.MODE = 0x3;
break; break;
case QAM_128: case QAM_128:
...@@ -513,7 +514,8 @@ static int bcm3510_set_frontend(struct dvb_frontend* fe, ...@@ -513,7 +514,8 @@ static int bcm3510_set_frontend(struct dvb_frontend* fe,
break; break;
case QAM_16: case QAM_16:
cmd.ACQUIRE0.MODE = 0x7; cmd.ACQUIRE0.MODE = 0x7;
break;*/ break;
#endif
case VSB_8: case VSB_8:
cmd.ACQUIRE0.MODE = 0x8; cmd.ACQUIRE0.MODE = 0x8;
cmd.ACQUIRE1.SYM_RATE = 0x0; cmd.ACQUIRE1.SYM_RATE = 0x0;
...@@ -552,7 +554,8 @@ static int bcm3510_set_frontend(struct dvb_frontend* fe, ...@@ -552,7 +554,8 @@ static int bcm3510_set_frontend(struct dvb_frontend* fe,
bcm3510_bert_reset(st); bcm3510_bert_reset(st);
if ((ret = bcm3510_set_freq(st,p->frequency)) < 0) ret = bcm3510_set_freq(st, c->frequency);
if (ret < 0)
return ret; return ret;
memset(&st->status1,0,sizeof(st->status1)); memset(&st->status1,0,sizeof(st->status1));
...@@ -819,7 +822,7 @@ struct dvb_frontend* bcm3510_attach(const struct bcm3510_config *config, ...@@ -819,7 +822,7 @@ struct dvb_frontend* bcm3510_attach(const struct bcm3510_config *config,
EXPORT_SYMBOL(bcm3510_attach); EXPORT_SYMBOL(bcm3510_attach);
static struct dvb_frontend_ops bcm3510_ops = { static struct dvb_frontend_ops bcm3510_ops = {
.delsys = { SYS_ATSC, SYS_DVBC_ANNEX_B },
.info = { .info = {
.name = "Broadcom BCM3510 VSB/QAM frontend", .name = "Broadcom BCM3510 VSB/QAM frontend",
.type = FE_ATSC, .type = FE_ATSC,
...@@ -839,7 +842,7 @@ static struct dvb_frontend_ops bcm3510_ops = { ...@@ -839,7 +842,7 @@ static struct dvb_frontend_ops bcm3510_ops = {
.init = bcm3510_init, .init = bcm3510_init,
.sleep = bcm3510_sleep, .sleep = bcm3510_sleep,
.set_frontend_legacy = bcm3510_set_frontend, .set_frontend = bcm3510_set_frontend,
.get_tune_settings = bcm3510_get_tune_settings, .get_tune_settings = bcm3510_get_tune_settings,
.read_status = bcm3510_read_status, .read_status = bcm3510_read_status,
......
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