Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 285567
b: refs/heads/master
c: adcc8f0
h: refs/heads/master
i:
  285565: 764026d
  285563: b393c31
  285559: de5f0ba
  285551: b53f8f3
  285535: 76e4047
  285503: ac7b78c
  285439: 3f73f14
v: v3
  • Loading branch information
Mauro Carvalho Chehab committed Dec 31, 2011
1 parent c62a811 commit c7b9c12
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 15 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: 7830bbaff9f5f9cefcdc9acfb1783b230cc69fac
refs/heads/master: adcc8f0e196e05ff9cee69044251509ff891a21a
34 changes: 20 additions & 14 deletions trunk/drivers/media/dvb/dvb-usb/dtt200u-fe.c
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ struct dtt200u_fe_state {

fe_status_t stat;

struct dvb_frontend_parameters fep;
struct dtv_frontend_properties fep;
struct dvb_frontend frontend;
};

Expand Down Expand Up @@ -100,22 +100,27 @@ static int dtt200u_fe_get_tune_settings(struct dvb_frontend* fe, struct dvb_fron
return 0;
}

static int dtt200u_fe_set_frontend(struct dvb_frontend* fe,
struct dvb_frontend_parameters *fep)
static int dtt200u_fe_set_frontend(struct dvb_frontend *fe)
{
struct dtv_frontend_properties *fep = &fe->dtv_property_cache;
struct dtt200u_fe_state *state = fe->demodulator_priv;
int i;
fe_status_t st;
u16 freq = fep->frequency / 250000;
u8 bwbuf[2] = { SET_BANDWIDTH, 0 },freqbuf[3] = { SET_RF_FREQ, 0, 0 };

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

dvb_usb_generic_write(state->d,bwbuf,2);
Expand All @@ -135,10 +140,10 @@ static int dtt200u_fe_set_frontend(struct dvb_frontend* fe,
}

static int dtt200u_fe_get_frontend(struct dvb_frontend* fe,
struct dvb_frontend_parameters *fep)
struct dtv_frontend_properties *fep)
{
struct dtt200u_fe_state *state = fe->demodulator_priv;
memcpy(fep,&state->fep,sizeof(struct dvb_frontend_parameters));
memcpy(fep, &state->fep, sizeof(struct dtv_frontend_properties));
return 0;
}

Expand Down Expand Up @@ -172,6 +177,7 @@ struct dvb_frontend* dtt200u_fe_attach(struct dvb_usb_device *d)
}

static struct dvb_frontend_ops dtt200u_fe_ops = {
.delsys = { SYS_DVBT },
.info = {
.name = "WideView USB DVB-T",
.type = FE_OFDM,
Expand All @@ -193,8 +199,8 @@ static struct dvb_frontend_ops dtt200u_fe_ops = {
.init = dtt200u_fe_init,
.sleep = dtt200u_fe_sleep,

.set_frontend_legacy = dtt200u_fe_set_frontend,
.get_frontend_legacy = dtt200u_fe_get_frontend,
.set_frontend = dtt200u_fe_set_frontend,
.get_frontend = dtt200u_fe_get_frontend,
.get_tune_settings = dtt200u_fe_get_tune_settings,

.read_status = dtt200u_fe_read_status,
Expand Down

0 comments on commit c7b9c12

Please sign in to comment.