Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 285572
b: refs/heads/master
c: e4b4003
h: refs/heads/master
v: v3
  • Loading branch information
Mauro Carvalho Chehab committed Dec 31, 2011
1 parent 9076c29 commit d1236d9
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 18 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: 4fa102d5cc5b412fa3bc7cc8c24e4d9052e4f693
refs/heads/master: e4b40030bf14986b8b295b4bdebe252b6a512528
33 changes: 16 additions & 17 deletions trunk/drivers/media/dvb/dvb-usb/vp7045-fe.c
Original file line number Diff line number Diff line change
Expand Up @@ -103,9 +103,9 @@ static int vp7045_fe_get_tune_settings(struct dvb_frontend* fe, struct dvb_front
return 0;
}

static int vp7045_fe_set_frontend(struct dvb_frontend* fe,
struct dvb_frontend_parameters *fep)
static int vp7045_fe_set_frontend(struct dvb_frontend *fe)
{
struct dtv_frontend_properties *fep = &fe->dtv_property_cache;
struct vp7045_fe_state *state = fe->demodulator_priv;
u8 buf[5];
u32 freq = fep->frequency / 1000;
Expand All @@ -115,25 +115,24 @@ static int vp7045_fe_set_frontend(struct dvb_frontend* fe,
buf[2] = freq & 0xff;
buf[3] = 0;

switch (fep->u.ofdm.bandwidth) {
case BANDWIDTH_8_MHZ: buf[4] = 8; break;
case BANDWIDTH_7_MHZ: buf[4] = 7; break;
case BANDWIDTH_6_MHZ: buf[4] = 6; break;
case BANDWIDTH_AUTO: return -EOPNOTSUPP;
default:
return -EINVAL;
switch (fep->bandwidth_hz) {
case 8000000:
buf[4] = 8;
break;
case 7000000:
buf[4] = 7;
break;
case 6000000:
buf[4] = 6;
break;
default:
return -EINVAL;
}

vp7045_usb_op(state->d,LOCK_TUNER_COMMAND,buf,5,NULL,0,200);
return 0;
}

static int vp7045_fe_get_frontend(struct dvb_frontend* fe,
struct dvb_frontend_parameters *fep)
{
return 0;
}

static void vp7045_fe_release(struct dvb_frontend* fe)
{
struct vp7045_fe_state *state = fe->demodulator_priv;
Expand All @@ -159,6 +158,7 @@ struct dvb_frontend * vp7045_fe_attach(struct dvb_usb_device *d)


static struct dvb_frontend_ops vp7045_fe_ops = {
.delsys = { SYS_DVBT },
.info = {
.name = "Twinhan VP7045/46 USB DVB-T",
.type = FE_OFDM,
Expand All @@ -180,8 +180,7 @@ static struct dvb_frontend_ops vp7045_fe_ops = {
.init = vp7045_fe_init,
.sleep = vp7045_fe_sleep,

.set_frontend_legacy = vp7045_fe_set_frontend,
.get_frontend_legacy = vp7045_fe_get_frontend,
.set_frontend = vp7045_fe_set_frontend,
.get_tune_settings = vp7045_fe_get_tune_settings,

.read_status = vp7045_fe_read_status,
Expand Down

0 comments on commit d1236d9

Please sign in to comment.