Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 161542
b: refs/heads/master
c: decee2e
h: refs/heads/master
v: v3
  • Loading branch information
Aleksandr V. Piskunov authored and Mauro Carvalho Chehab committed Sep 12, 2009
1 parent ce04411 commit 5473fd9
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 4 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: 75b697f747b14b0c6afae48ee0f5e605abd2df4c
refs/heads/master: decee2e8a9538ae5476e6cb3f4b7714c92a04a2b
14 changes: 11 additions & 3 deletions trunk/drivers/media/dvb/frontends/zl10353.c
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,8 @@ struct zl10353_state {
struct zl10353_config config;

enum fe_bandwidth bandwidth;
u32 ucblocks;
u32 frequency;
};

static int debug;
Expand Down Expand Up @@ -199,6 +201,8 @@ static int zl10353_set_parameters(struct dvb_frontend *fe,
u16 tps = 0;
struct dvb_ofdm_parameters *op = &param->u.ofdm;

state->frequency = param->frequency;

zl10353_single_write(fe, RESET, 0x80);
udelay(200);
zl10353_single_write(fe, 0xEA, 0x01);
Expand Down Expand Up @@ -464,7 +468,7 @@ static int zl10353_get_parameters(struct dvb_frontend *fe,
break;
}

param->frequency = 0;
param->frequency = state->frequency;
op->bandwidth = state->bandwidth;
param->inversion = INVERSION_AUTO;

Expand Down Expand Up @@ -542,9 +546,13 @@ static int zl10353_read_snr(struct dvb_frontend *fe, u16 *snr)
static int zl10353_read_ucblocks(struct dvb_frontend *fe, u32 *ucblocks)
{
struct zl10353_state *state = fe->demodulator_priv;
u32 ubl = 0;

ubl = zl10353_read_register(state, RS_UBC_1) << 8 |
zl10353_read_register(state, RS_UBC_0);

*ucblocks = zl10353_read_register(state, RS_UBC_1) << 8 |
zl10353_read_register(state, RS_UBC_0);
state->ucblocks += ubl;
*ucblocks = state->ucblocks;

return 0;
}
Expand Down

0 comments on commit 5473fd9

Please sign in to comment.