diff options
author | Andy Walls <awalls@radix.net> | 2009-06-07 20:39:03 -0400 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@redhat.com> | 2009-06-16 18:07:25 -0400 |
commit | 5ddc9b100fc96e8f3c6d435cecd9d09e5b9673f9 (patch) | |
tree | c5a25e1cdb82741a85f239c378b07ab3ad7fa953 /drivers/media/common/tuners/tuner-simple.c | |
parent | 7360055aa31f5f732af4d0ed23517f1b6adfa573 (diff) |
V4L/DVB (11933): tuner-simple, tveeprom: Add Philips FQ1216LME MK3 analog tuner
Signed-off-by: Andy Walls <awalls@radix.net>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'drivers/media/common/tuners/tuner-simple.c')
-rw-r--r-- | drivers/media/common/tuners/tuner-simple.c | 38 |
1 files changed, 27 insertions, 11 deletions
diff --git a/drivers/media/common/tuners/tuner-simple.c b/drivers/media/common/tuners/tuner-simple.c index 78412c9c424a..a5eb6592abe2 100644 --- a/drivers/media/common/tuners/tuner-simple.c +++ b/drivers/media/common/tuners/tuner-simple.c | |||
@@ -416,6 +416,24 @@ static int simple_std_setup(struct dvb_frontend *fe, | |||
416 | return 0; | 416 | return 0; |
417 | } | 417 | } |
418 | 418 | ||
419 | static int simple_set_aux_byte(struct dvb_frontend *fe, u8 config, u8 aux) | ||
420 | { | ||
421 | struct tuner_simple_priv *priv = fe->tuner_priv; | ||
422 | int rc; | ||
423 | u8 buffer[2]; | ||
424 | |||
425 | buffer[0] = (config & ~0x38) | 0x18; | ||
426 | buffer[1] = aux; | ||
427 | |||
428 | tuner_dbg("setting aux byte: 0x%02x 0x%02x\n", buffer[0], buffer[1]); | ||
429 | |||
430 | rc = tuner_i2c_xfer_send(&priv->i2c_props, buffer, 2); | ||
431 | if (2 != rc) | ||
432 | tuner_warn("i2c i/o error: rc == %d (should be 2)\n", rc); | ||
433 | |||
434 | return rc == 2 ? 0 : rc; | ||
435 | } | ||
436 | |||
419 | static int simple_post_tune(struct dvb_frontend *fe, u8 *buffer, | 437 | static int simple_post_tune(struct dvb_frontend *fe, u8 *buffer, |
420 | u16 div, u8 config, u8 cb) | 438 | u16 div, u8 config, u8 cb) |
421 | { | 439 | { |
@@ -424,17 +442,10 @@ static int simple_post_tune(struct dvb_frontend *fe, u8 *buffer, | |||
424 | 442 | ||
425 | switch (priv->type) { | 443 | switch (priv->type) { |
426 | case TUNER_LG_TDVS_H06XF: | 444 | case TUNER_LG_TDVS_H06XF: |
427 | /* Set the Auxiliary Byte. */ | 445 | simple_set_aux_byte(fe, config, 0x20); |
428 | buffer[0] = buffer[2]; | 446 | break; |
429 | buffer[0] &= ~0x20; | 447 | case TUNER_PHILIPS_FQ1216LME_MK3: |
430 | buffer[0] |= 0x18; | 448 | simple_set_aux_byte(fe, config, 0x60); /* External AGC */ |
431 | buffer[1] = 0x20; | ||
432 | tuner_dbg("tv 0x%02x 0x%02x\n", buffer[0], buffer[1]); | ||
433 | |||
434 | rc = tuner_i2c_xfer_send(&priv->i2c_props, buffer, 2); | ||
435 | if (2 != rc) | ||
436 | tuner_warn("i2c i/o error: rc == %d " | ||
437 | "(should be 2)\n", rc); | ||
438 | break; | 449 | break; |
439 | case TUNER_MICROTUNE_4042FI5: | 450 | case TUNER_MICROTUNE_4042FI5: |
440 | { | 451 | { |
@@ -506,6 +517,11 @@ static int simple_radio_bandswitch(struct dvb_frontend *fe, u8 *buffer) | |||
506 | case TUNER_THOMSON_DTT761X: | 517 | case TUNER_THOMSON_DTT761X: |
507 | buffer[3] = 0x39; | 518 | buffer[3] = 0x39; |
508 | break; | 519 | break; |
520 | case TUNER_PHILIPS_FQ1216LME_MK3: | ||
521 | tuner_err("This tuner doesn't have FM\n"); | ||
522 | /* Set the low band for sanity, since it covers 88-108 MHz */ | ||
523 | buffer[3] = 0x01; | ||
524 | break; | ||
509 | case TUNER_MICROTUNE_4049FM5: | 525 | case TUNER_MICROTUNE_4049FM5: |
510 | default: | 526 | default: |
511 | buffer[3] = 0xa4; | 527 | buffer[3] = 0xa4; |