aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Krufky <mkrufky@linuxtv.org>2006-04-16 12:19:24 -0400
committerMauro Carvalho Chehab <mchehab@infradead.org>2006-06-25 00:58:13 -0400
commit8d6cdd235d19c3bb1f86f40bf0305049c1a61955 (patch)
tree722fc0ba60efd92e3e588c03d355c6f1628e6086
parent3febc04d42d4a0bda64af0c929fdb871370e2a7a (diff)
V4L/DVB (3811): Cxusb: lgh064f: set auxiliary byte in pll_set
This changeset removes pll_init, and instead sets the tuner auxiliary byte in pll_set. Signed-off-by: Michael Krufky <mkrufky@linuxtv.org> Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
-rw-r--r--drivers/media/dvb/dvb-usb/cxusb.c36
1 files changed, 31 insertions, 5 deletions
diff --git a/drivers/media/dvb/dvb-usb/cxusb.c b/drivers/media/dvb/dvb-usb/cxusb.c
index 1f0d3e995c8d..5151fb4172df 100644
--- a/drivers/media/dvb/dvb-usb/cxusb.c
+++ b/drivers/media/dvb/dvb-usb/cxusb.c
@@ -322,6 +322,36 @@ static int cxusb_mt352_demod_init(struct dvb_frontend* fe)
322 return 0; 322 return 0;
323} 323}
324 324
325static int cxusb_lgh064f_pll_set_i2c(struct dvb_frontend *fe,
326 struct dvb_frontend_parameters *fep)
327{
328 struct dvb_usb_device *d = fe->dvb->priv;
329 int ret = 0;
330 u8 b[5];
331 struct i2c_msg msg = { .addr = d->pll_addr, .flags = 0,
332 .buf = &b[1], .len = 4 };
333
334 dvb_usb_pll_set(fe,fep,b);
335
336 if (i2c_transfer (&d->i2c_adap, &msg, 1) != 1) {
337 err("tuner i2c write failed for pll_set.");
338 ret = -EREMOTEIO;
339 }
340 msleep(1);
341
342 /* Set the Auxiliary Byte. */
343 b[3] &= ~0x20;
344 b[3] |= 0x18;
345 b[4] = 0x50;
346 if (i2c_transfer(&d->i2c_adap, &msg, 1) != 1) {
347 err("tuner i2c write failed writing auxiliary byte.");
348 ret = -EREMOTEIO;
349 }
350 msleep(1);
351
352 return ret;
353}
354
325static struct cx22702_config cxusb_cx22702_config = { 355static struct cx22702_config cxusb_cx22702_config = {
326 .demod_address = 0x63, 356 .demod_address = 0x63,
327 357
@@ -334,7 +364,7 @@ static struct cx22702_config cxusb_cx22702_config = {
334static struct lgdt330x_config cxusb_lgdt3303_config = { 364static struct lgdt330x_config cxusb_lgdt3303_config = {
335 .demod_address = 0x0e, 365 .demod_address = 0x0e,
336 .demod_chip = LGDT3303, 366 .demod_chip = LGDT3303,
337 .pll_set = dvb_usb_pll_set_i2c, 367 .pll_set = cxusb_lgh064f_pll_set_i2c,
338}; 368};
339 369
340static struct mt352_config cxusb_dee1601_config = { 370static struct mt352_config cxusb_dee1601_config = {
@@ -362,11 +392,7 @@ static int cxusb_fmd1216me_tuner_attach(struct dvb_usb_device *d)
362 392
363static int cxusb_lgh064f_tuner_attach(struct dvb_usb_device *d) 393static int cxusb_lgh064f_tuner_attach(struct dvb_usb_device *d)
364{ 394{
365 u8 bpll[4] = { 0x00, 0x00, 0x18, 0x50 };
366 /* bpll[2] : unset bit 3, set bits 4&5
367 bpll[3] : 0x50 - digital, 0x20 - analog */
368 d->pll_addr = 0x61; 395 d->pll_addr = 0x61;
369 memcpy(d->pll_init, bpll, 4);
370 d->pll_desc = &dvb_pll_tdvs_tua6034; 396 d->pll_desc = &dvb_pll_tdvs_tua6034;
371 return 0; 397 return 0;
372} 398}