diff options
Diffstat (limited to 'drivers/media/dvb/b2c2/flexcop-fe-tuner.c')
| -rw-r--r-- | drivers/media/dvb/b2c2/flexcop-fe-tuner.c | 102 |
1 files changed, 98 insertions, 4 deletions
diff --git a/drivers/media/dvb/b2c2/flexcop-fe-tuner.c b/drivers/media/dvb/b2c2/flexcop-fe-tuner.c index 0410cc96a48e..47e28b0ee951 100644 --- a/drivers/media/dvb/b2c2/flexcop-fe-tuner.c +++ b/drivers/media/dvb/b2c2/flexcop-fe-tuner.c | |||
| @@ -164,12 +164,11 @@ static int samsung_tbmu24112_set_symbol_rate(struct dvb_frontend* fe, u32 srate, | |||
| 164 | return 0; | 164 | return 0; |
| 165 | } | 165 | } |
| 166 | 166 | ||
| 167 | static int samsung_tbmu24112_pll_set(struct dvb_frontend* fe, struct dvb_frontend_parameters* params) | 167 | static int samsung_tbmu24112_pll_set(struct dvb_frontend* fe, struct i2c_adapter *i2c, struct dvb_frontend_parameters* params) |
| 168 | { | 168 | { |
| 169 | u8 buf[4]; | 169 | u8 buf[4]; |
| 170 | u32 div; | 170 | u32 div; |
| 171 | struct i2c_msg msg = { .addr = 0x61, .flags = 0, .buf = buf, .len = sizeof(buf) }; | 171 | struct i2c_msg msg = { .addr = 0x61, .flags = 0, .buf = buf, .len = sizeof(buf) }; |
| 172 | struct flexcop_device *fc = fe->dvb->priv; | ||
| 173 | 172 | ||
| 174 | div = params->frequency / 125; | 173 | div = params->frequency / 125; |
| 175 | 174 | ||
| @@ -180,7 +179,7 @@ static int samsung_tbmu24112_pll_set(struct dvb_frontend* fe, struct dvb_fronten | |||
| 180 | 179 | ||
| 181 | if (params->frequency < 1500000) buf[3] |= 0x10; | 180 | if (params->frequency < 1500000) buf[3] |= 0x10; |
| 182 | 181 | ||
| 183 | if (i2c_transfer(&fc->i2c_adap, &msg, 1) != 1) | 182 | if (i2c_transfer(i2c, &msg, 1) != 1) |
| 184 | return -EIO; | 183 | return -EIO; |
| 185 | return 0; | 184 | return 0; |
| 186 | } | 185 | } |
| @@ -335,8 +334,103 @@ static struct mt312_config skystar23_samsung_tbdu18132_config = { | |||
| 335 | .pll_set = skystar23_samsung_tbdu18132_pll_set, | 334 | .pll_set = skystar23_samsung_tbdu18132_pll_set, |
| 336 | }; | 335 | }; |
| 337 | 336 | ||
| 337 | |||
| 338 | static u8 alps_tdee4_stv0297_inittab[] = { | ||
| 339 | 0x80, 0x01, | ||
| 340 | 0x80, 0x00, | ||
| 341 | 0x81, 0x01, | ||
| 342 | 0x81, 0x00, | ||
| 343 | 0x00, 0x09, | ||
| 344 | 0x01, 0x69, | ||
| 345 | 0x03, 0x00, | ||
| 346 | 0x04, 0x00, | ||
| 347 | 0x07, 0x00, | ||
| 348 | 0x08, 0x00, | ||
| 349 | 0x20, 0x00, | ||
| 350 | 0x21, 0x40, | ||
| 351 | 0x22, 0x00, | ||
| 352 | 0x23, 0x00, | ||
| 353 | 0x24, 0x40, | ||
| 354 | 0x25, 0x88, | ||
| 355 | 0x30, 0xff, | ||
| 356 | 0x31, 0x00, | ||
| 357 | 0x32, 0xff, | ||
| 358 | 0x33, 0x00, | ||
| 359 | 0x34, 0x50, | ||
| 360 | 0x35, 0x7f, | ||
| 361 | 0x36, 0x00, | ||
| 362 | 0x37, 0x20, | ||
| 363 | 0x38, 0x00, | ||
| 364 | 0x40, 0x1c, | ||
| 365 | 0x41, 0xff, | ||
| 366 | 0x42, 0x29, | ||
| 367 | 0x43, 0x00, | ||
| 368 | 0x44, 0xff, | ||
| 369 | 0x45, 0x00, | ||
| 370 | 0x46, 0x00, | ||
| 371 | 0x49, 0x04, | ||
| 372 | 0x4a, 0x00, | ||
| 373 | 0x4b, 0xf8, | ||
| 374 | 0x52, 0x30, | ||
| 375 | 0x55, 0xae, | ||
| 376 | 0x56, 0x47, | ||
| 377 | 0x57, 0xe1, | ||
| 378 | 0x58, 0x3a, | ||
| 379 | 0x5a, 0x1e, | ||
| 380 | 0x5b, 0x34, | ||
| 381 | 0x60, 0x00, | ||
| 382 | 0x63, 0x00, | ||
| 383 | 0x64, 0x00, | ||
| 384 | 0x65, 0x00, | ||
| 385 | 0x66, 0x00, | ||
| 386 | 0x67, 0x00, | ||
| 387 | 0x68, 0x00, | ||
| 388 | 0x69, 0x00, | ||
| 389 | 0x6a, 0x02, | ||
| 390 | 0x6b, 0x00, | ||
| 391 | 0x70, 0xff, | ||
| 392 | 0x71, 0x00, | ||
| 393 | 0x72, 0x00, | ||
| 394 | 0x73, 0x00, | ||
| 395 | 0x74, 0x0c, | ||
| 396 | 0x80, 0x00, | ||
| 397 | 0x81, 0x00, | ||
| 398 | 0x82, 0x00, | ||
| 399 | 0x83, 0x00, | ||
| 400 | 0x84, 0x04, | ||
| 401 | 0x85, 0x80, | ||
| 402 | 0x86, 0x24, | ||
| 403 | 0x87, 0x78, | ||
| 404 | 0x88, 0x10, | ||
| 405 | 0x89, 0x00, | ||
| 406 | 0x90, 0x01, | ||
| 407 | 0x91, 0x01, | ||
| 408 | 0xa0, 0x04, | ||
| 409 | 0xa1, 0x00, | ||
| 410 | 0xa2, 0x00, | ||
| 411 | 0xb0, 0x91, | ||
| 412 | 0xb1, 0x0b, | ||
| 413 | 0xc0, 0x53, | ||
| 414 | 0xc1, 0x70, | ||
| 415 | 0xc2, 0x12, | ||
| 416 | 0xd0, 0x00, | ||
| 417 | 0xd1, 0x00, | ||
| 418 | 0xd2, 0x00, | ||
| 419 | 0xd3, 0x00, | ||
| 420 | 0xd4, 0x00, | ||
| 421 | 0xd5, 0x00, | ||
| 422 | 0xde, 0x00, | ||
| 423 | 0xdf, 0x00, | ||
| 424 | 0x61, 0x49, | ||
| 425 | 0x62, 0x0b, | ||
| 426 | 0x53, 0x08, | ||
| 427 | 0x59, 0x08, | ||
| 428 | 0xff, 0xff, | ||
| 429 | }; | ||
| 430 | |||
| 338 | static struct stv0297_config alps_tdee4_stv0297_config = { | 431 | static struct stv0297_config alps_tdee4_stv0297_config = { |
| 339 | .demod_address = 0x1c, | 432 | .demod_address = 0x1c, |
| 433 | .inittab = alps_tdee4_stv0297_inittab, | ||
| 340 | // .invert = 1, | 434 | // .invert = 1, |
| 341 | // .pll_set = alps_tdee4_stv0297_pll_set, | 435 | // .pll_set = alps_tdee4_stv0297_pll_set, |
| 342 | }; | 436 | }; |
| @@ -370,7 +464,7 @@ int flexcop_frontend_init(struct flexcop_device *fc) | |||
| 370 | info("found the bcm3510 at i2c address: 0x%02x",air2pc_atsc_first_gen_config.demod_address); | 464 | info("found the bcm3510 at i2c address: 0x%02x",air2pc_atsc_first_gen_config.demod_address); |
| 371 | } else | 465 | } else |
| 372 | /* try the cable dvb (stv0297) */ | 466 | /* try the cable dvb (stv0297) */ |
| 373 | if ((fc->fe = stv0297_attach(&alps_tdee4_stv0297_config, &fc->i2c_adap, 0xf8)) != NULL) { | 467 | if ((fc->fe = stv0297_attach(&alps_tdee4_stv0297_config, &fc->i2c_adap)) != NULL) { |
| 374 | fc->dev_type = FC_CABLE; | 468 | fc->dev_type = FC_CABLE; |
| 375 | info("found the stv0297 at i2c address: 0x%02x",alps_tdee4_stv0297_config.demod_address); | 469 | info("found the stv0297 at i2c address: 0x%02x",alps_tdee4_stv0297_config.demod_address); |
| 376 | } else | 470 | } else |
