Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 285574
b: refs/heads/master
c: 15115c1
h: refs/heads/master
v: v3
  • Loading branch information
Mauro Carvalho Chehab committed Dec 31, 2011
1 parent 8c491b3 commit f566c49
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 14 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: e11eb28876867ea4d5837e79da0fc95dc042979b
refs/heads/master: 15115c17cb1a264a265d6d4769ae0397ed61e630
34 changes: 21 additions & 13 deletions trunk/drivers/media/dvb/siano/smsdvb.c
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ struct smsdvb_client_t {
struct completion tune_done;

/* todo: save freq/band instead whole struct */
struct dvb_frontend_parameters fe_params;
struct dtv_frontend_properties fe_params;

struct SMSHOSTLIB_STATISTICS_DVB_S sms_stat_dvb;
int event_fe_state;
Expand Down Expand Up @@ -591,8 +591,7 @@ static int smsdvb_get_tune_settings(struct dvb_frontend *fe,
return 0;
}

static int smsdvb_dvbt_set_frontend(struct dvb_frontend *fe,
struct dvb_frontend_parameters *p)
static int smsdvb_dvbt_set_frontend(struct dvb_frontend *fe)
{
struct dtv_frontend_properties *c = &fe->dtv_property_cache;
struct smsdvb_client_t *client =
Expand Down Expand Up @@ -658,8 +657,7 @@ static int smsdvb_dvbt_set_frontend(struct dvb_frontend *fe,
&client->tune_done);
}

static int smsdvb_isdbt_set_frontend(struct dvb_frontend *fe,
struct dvb_frontend_parameters *p)
static int smsdvb_isdbt_set_frontend(struct dvb_frontend *fe)
{
struct dtv_frontend_properties *c = &fe->dtv_property_cache;
struct smsdvb_client_t *client =
Expand Down Expand Up @@ -723,8 +721,7 @@ static int smsdvb_isdbt_set_frontend(struct dvb_frontend *fe,
&client->tune_done);
}

static int smsdvb_set_frontend(struct dvb_frontend *fe,
struct dvb_frontend_parameters *fep)
static int smsdvb_set_frontend(struct dvb_frontend *fe)
{
struct smsdvb_client_t *client =
container_of(fe, struct smsdvb_client_t, frontend);
Expand All @@ -733,17 +730,17 @@ static int smsdvb_set_frontend(struct dvb_frontend *fe,
switch (smscore_get_device_mode(coredev)) {
case DEVICE_MODE_DVBT:
case DEVICE_MODE_DVBT_BDA:
return smsdvb_dvbt_set_frontend(fe, fep);
return smsdvb_dvbt_set_frontend(fe);
case DEVICE_MODE_ISDBT:
case DEVICE_MODE_ISDBT_BDA:
return smsdvb_isdbt_set_frontend(fe, fep);
return smsdvb_isdbt_set_frontend(fe);
default:
return -EINVAL;
}
}

static int smsdvb_get_frontend(struct dvb_frontend *fe,
struct dvb_frontend_parameters *fep)
struct dtv_frontend_properties *fep)
{
struct smsdvb_client_t *client =
container_of(fe, struct smsdvb_client_t, frontend);
Expand All @@ -752,7 +749,7 @@ static int smsdvb_get_frontend(struct dvb_frontend *fe,

/* todo: */
memcpy(fep, &client->fe_params,
sizeof(struct dvb_frontend_parameters));
sizeof(struct dtv_frontend_properties));

return 0;
}
Expand Down Expand Up @@ -805,8 +802,8 @@ static struct dvb_frontend_ops smsdvb_fe_ops = {

.release = smsdvb_release,

.set_frontend_legacy = smsdvb_set_frontend,
.get_frontend_legacy = smsdvb_get_frontend,
.set_frontend = smsdvb_set_frontend,
.get_frontend = smsdvb_get_frontend,
.get_tune_settings = smsdvb_get_tune_settings,

.read_status = smsdvb_read_status,
Expand Down Expand Up @@ -873,6 +870,17 @@ static int smsdvb_hotplug(struct smscore_device_t *coredev,
memcpy(&client->frontend.ops, &smsdvb_fe_ops,
sizeof(struct dvb_frontend_ops));

switch (smscore_get_device_mode(coredev)) {
case DEVICE_MODE_DVBT:
case DEVICE_MODE_DVBT_BDA:
smsdvb_fe_ops.delsys[0] = SYS_DVBT;
break;
case DEVICE_MODE_ISDBT:
case DEVICE_MODE_ISDBT_BDA:
smsdvb_fe_ops.delsys[0] = SYS_ISDBT;
break;
}

rc = dvb_register_frontend(&client->adapter, &client->frontend);
if (rc < 0) {
sms_err("frontend registration failed %d", rc);
Expand Down

0 comments on commit f566c49

Please sign in to comment.