Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 124083
b: refs/heads/master
c: ba8862a
h: refs/heads/master
i:
  124081: f289390
  124079: 486746c
v: v3
  • Loading branch information
Manu Abraham authored and Mauro Carvalho Chehab committed Dec 29, 2008
1 parent a3e1bc5 commit 7f36eb7
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 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: 9efdd297bc7c50dea24532a9b52bd0245e7e5169
refs/heads/master: ba8862a83f2db95cdd8e9193e83915e5e278927a
14 changes: 7 additions & 7 deletions trunk/drivers/media/dvb/frontends/stb0899_algo.c
Original file line number Diff line number Diff line change
Expand Up @@ -91,28 +91,28 @@ static u32 stb0899_set_srate(struct stb0899_state *state, u32 master_clk, u32 sr
u32 tmp, tmp_up, srate_up;
u8 sfr_up[3], sfr[3];

srate_up = srate;
// srate_up = srate;
dprintk(state->verbose, FE_DEBUG, 1, "-->");
/*
* in order to have the maximum precision, the symbol rate entered into
* the chip is computed as the closest value of the "true value".
* In this purpose, the symbol rate value is rounded (1 is added on the bit
* below the LSB )
*/
srate_up += (srate_up * 3) / 100;
// srate_up += (srate_up * 3) / 100;

tmp = BinaryFloatDiv(srate, master_clk, 20);
tmp_up = BinaryFloatDiv(srate_up, master_clk, 20);
// tmp_up = BinaryFloatDiv(srate_up, master_clk, 20);

sfr_up[0] = (tmp_up >> 12) & 0xff;
sfr_up[1] = (tmp_up >> 4) & 0xff;
sfr_up[2] = tmp_up & 0x0f;
// sfr_up[0] = (tmp_up >> 12) & 0xff;
// sfr_up[1] = (tmp_up >> 4) & 0xff;
// sfr_up[2] = tmp_up & 0x0f;

sfr[0] = (tmp >> 12) & 0xff;
sfr[1] = (tmp >> 4) & 0xff;
sfr[2] = tmp & 0x0f;

stb0899_write_regs(state, STB0899_SFRUPH, sfr_up, 3);
// stb0899_write_regs(state, STB0899_SFRUPH, sfr_up, 3);
stb0899_write_regs(state, STB0899_SFRH, sfr, 3);

return srate;
Expand Down

0 comments on commit 7f36eb7

Please sign in to comment.