Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 76448
b: refs/heads/master
c: 2ce4b3a
h: refs/heads/master
v: v3
  • Loading branch information
Chris Pascoe authored and Mauro Carvalho Chehab committed Jan 25, 2008
1 parent 2604eb5 commit e457e39
Show file tree
Hide file tree
Showing 2 changed files with 6 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: 06fd82dc7bdc6045bf8d6c1438d2a33ffb1cf337
refs/heads/master: 2ce4b3aa7c3c199466ae9f5ed32ea177912c8c3a
12 changes: 5 additions & 7 deletions trunk/drivers/media/video/tuner-xc2028.c
Original file line number Diff line number Diff line change
Expand Up @@ -740,7 +740,7 @@ static int generic_set_tv_freq(struct dvb_frontend *fe, u32 freq /* in Hz */ ,
{
struct xc2028_data *priv = fe->tuner_priv;
int rc = -EINVAL;
unsigned char buf[5];
unsigned char buf[4];
u32 div, offset = 0;

tuner_dbg("%s called\n", __FUNCTION__);
Expand All @@ -758,7 +758,7 @@ static int generic_set_tv_freq(struct dvb_frontend *fe, u32 freq /* in Hz */ ,
goto ret;

msleep(10);
tuner_dbg("should set frequency %d kHz)\n", freq / 1000);
tuner_dbg("should set frequency %d kHz\n", freq / 1000);

if (check_firmware(fe, new_mode, std, bandwidth) < 0)
goto ret;
Expand All @@ -769,7 +769,6 @@ static int generic_set_tv_freq(struct dvb_frontend *fe, u32 freq /* in Hz */ ,
div = (freq - offset + DIV / 2) / DIV;

/* CMD= Set frequency */

if (priv->firm_version < 0x0202)
rc = send_seq(priv, {0x00, 0x02, 0x00, 0x00});
else
Expand All @@ -787,7 +786,6 @@ static int generic_set_tv_freq(struct dvb_frontend *fe, u32 freq /* in Hz */ ,
buf[1] = 0xff & (div >> 16);
buf[2] = 0xff & (div >> 8);
buf[3] = 0xff & (div);
buf[4] = 0;

rc = i2c_send(priv, buf, sizeof(buf));
if (rc < 0)
Expand All @@ -796,9 +794,9 @@ static int generic_set_tv_freq(struct dvb_frontend *fe, u32 freq /* in Hz */ ,

priv->frequency = freq;

tuner_dbg("divider= %02x %02x %02x %02x (freq=%d.%02d)\n",
buf[1], buf[2], buf[3], buf[4],
freq / 1000000, (freq % 1000000) / 10000);
tuner_dbg("divisor= %02x %02x %02x %02x (freq=%d.%03d)\n",
buf[0], buf[1], buf[2], buf[3],
freq / 1000000, (freq % 1000000) / 1000);

rc = 0;

Expand Down

0 comments on commit e457e39

Please sign in to comment.