Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 285471
b: refs/heads/master
c: a0a9ff7
h: refs/heads/master
i:
  285469: 189b334
  285467: 7d8d361
  285463: 3c7895f
  285455: 86620fc
  285439: 3f73f14
v: v3
  • Loading branch information
Mauro Carvalho Chehab committed Dec 31, 2011
1 parent 6a20068 commit 86c58ee
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 9 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: 9b54464f16ae4f0a7ce14f384294ddb30c203a21
refs/heads/master: a0a9ff7f58c99bad8a57d5cafaa29b86cfda6186
23 changes: 15 additions & 8 deletions trunk/drivers/media/dvb/ttpci/budget-patch.c
Original file line number Diff line number Diff line change
Expand Up @@ -263,17 +263,23 @@ static int budget_patch_diseqc_send_burst(struct dvb_frontend* fe, fe_sec_mini_c

static int alps_bsrv2_tuner_set_params(struct dvb_frontend* fe, struct dvb_frontend_parameters* params)
{
struct dtv_frontend_properties *p = &fe->dtv_property_cache;
struct budget_patch* budget = (struct budget_patch*) fe->dvb->priv;
u8 pwr = 0;
u8 buf[4];
struct i2c_msg msg = { .addr = 0x61, .flags = 0, .buf = buf, .len = sizeof(buf) };
u32 div = (params->frequency + 479500) / 125;

if (params->frequency > 2000000) pwr = 3;
else if (params->frequency > 1800000) pwr = 2;
else if (params->frequency > 1600000) pwr = 1;
else if (params->frequency > 1200000) pwr = 0;
else if (params->frequency >= 1100000) pwr = 1;
u32 div = (p->frequency + 479500) / 125;

if (p->frequency > 2000000)
pwr = 3;
else if (p->frequency > 1800000)
pwr = 2;
else if (p->frequency > 1600000)
pwr = 1;
else if (p->frequency > 1200000)
pwr = 0;
else if (p->frequency >= 1100000)
pwr = 1;
else pwr = 2;

buf[0] = (div >> 8) & 0x7f;
Expand All @@ -299,12 +305,13 @@ static struct ves1x93_config alps_bsrv2_config = {

static int grundig_29504_451_tuner_set_params(struct dvb_frontend* fe, struct dvb_frontend_parameters* params)
{
struct dtv_frontend_properties *p = &fe->dtv_property_cache;
struct budget_patch* budget = (struct budget_patch*) fe->dvb->priv;
u32 div;
u8 data[4];
struct i2c_msg msg = { .addr = 0x61, .flags = 0, .buf = data, .len = sizeof(data) };

div = params->frequency / 125;
div = p->frequency / 125;
data[0] = (div >> 8) & 0x7f;
data[1] = div & 0xff;
data[2] = 0x8e;
Expand Down

0 comments on commit 86c58ee

Please sign in to comment.