diff options
author | Steve Passe <fsmp@FreeBSD.org> | 1997-06-14 19:10:53 +0000 |
---|---|---|
committer | Steve Passe <fsmp@FreeBSD.org> | 1997-06-14 19:10:53 +0000 |
commit | cc81bca6bece9cc1b3fd4ea38ed57e964f554f22 (patch) | |
tree | 5ec6cc3c071c06ff5f023f8b742eca1ff3da9fab | |
parent | b91ba2181a148ec08c8fd48aac13e61e331e509a (diff) | |
download | src-cc81bca6bece9cc1b3fd4ea38ed57e964f554f22.tar.gz src-cc81bca6bece9cc1b3fd4ea38ed57e964f554f22.zip |
Added 2 new defines:
- OVERRIDE_TUNER: allows you to manually choose the tuner type for those
cards that fail to probe properly. See source for legal
values.
- OVERRIDE_DBX: allows you to manually choose DBX or NO DBX for those
cards that fail to probe properly.
0 == no DBX circuit present, 1 == DBX circuit present.
Notes
Notes:
svn path=/head/; revision=26651
-rw-r--r-- | sys/dev/bktr/bktr_core.c | 23 | ||||
-rw-r--r-- | sys/pci/brooktree848.c | 23 |
2 files changed, 36 insertions, 10 deletions
diff --git a/sys/dev/bktr/bktr_core.c b/sys/dev/bktr/bktr_core.c index 7b044307b407..5657e2d63661 100644 --- a/sys/dev/bktr/bktr_core.c +++ b/sys/dev/bktr/bktr_core.c @@ -374,8 +374,6 @@ static struct { * i2c things: */ -#define TEST_PAL - /* PLL on a Temic NTSC tuner: 4032FY5 */ #define TEMIC_NTSC_WADDR 0xc0 #define TEMIC_NTSC_RADDR 0xc1 @@ -3246,6 +3244,13 @@ const struct CARDTYPE cards[] = { /* * the data for each type of tuner + * + * if probeCard() fails to detect the proper tuner on boot you can + * override it by setting the following define to the tuner present: + * +#define OVERRIDE_TUNER <tuner type> + * + * where <tuner type> is one of the following tuner defines. */ /* indexes into tuners[] */ @@ -3402,6 +3407,11 @@ probeCard( bktr_ptr_t bktr, int verbose ) bktr->card = cards[ (card = CARD_MIRO) ]; checkTuner: +#if defined( OVERRIDE_TUNER ) + bktr->card.tuner = &tuners[ OVERRIDE_TUNER ]; + goto checkDBX; +#endif + /* differentiate type of tuner */ if ( i2cRead( bktr, TEMIC_NTSC_RADDR ) != ABSENT ) { bktr->card.tuner = &tuners[ TEMIC_NTSC ]; @@ -3412,20 +3422,23 @@ checkTuner: bktr->card.tuner = &tuners[ PHILIPS_NTSC ]; goto checkDBX; } -#if defined( TEST_PAL ) -/** WARNING: this is a test */ + if ( card == CARD_HAUPPAUGE ) { if ( i2cRead( bktr, TEMIC_PALI_RADDR ) != ABSENT ) { bktr->card.tuner = &tuners[ TEMIC_PAL ]; goto checkDBX; } } -#endif /* TEST_PAL */ /* no tuner found */ bktr->card.tuner = &tuners[ NO_TUNER ]; checkDBX: +#if defined( OVERRIDE_DBX ) + bktr->card.dbx = OVERRIDE_DBX; + goto end; +#endif + /* probe for BTSC (dbx) chips */ if ( i2cRead( bktr, TDA9850_RADDR ) != ABSENT ) bktr->card.dbx = 1; diff --git a/sys/pci/brooktree848.c b/sys/pci/brooktree848.c index 7b044307b407..5657e2d63661 100644 --- a/sys/pci/brooktree848.c +++ b/sys/pci/brooktree848.c @@ -374,8 +374,6 @@ static struct { * i2c things: */ -#define TEST_PAL - /* PLL on a Temic NTSC tuner: 4032FY5 */ #define TEMIC_NTSC_WADDR 0xc0 #define TEMIC_NTSC_RADDR 0xc1 @@ -3246,6 +3244,13 @@ const struct CARDTYPE cards[] = { /* * the data for each type of tuner + * + * if probeCard() fails to detect the proper tuner on boot you can + * override it by setting the following define to the tuner present: + * +#define OVERRIDE_TUNER <tuner type> + * + * where <tuner type> is one of the following tuner defines. */ /* indexes into tuners[] */ @@ -3402,6 +3407,11 @@ probeCard( bktr_ptr_t bktr, int verbose ) bktr->card = cards[ (card = CARD_MIRO) ]; checkTuner: +#if defined( OVERRIDE_TUNER ) + bktr->card.tuner = &tuners[ OVERRIDE_TUNER ]; + goto checkDBX; +#endif + /* differentiate type of tuner */ if ( i2cRead( bktr, TEMIC_NTSC_RADDR ) != ABSENT ) { bktr->card.tuner = &tuners[ TEMIC_NTSC ]; @@ -3412,20 +3422,23 @@ checkTuner: bktr->card.tuner = &tuners[ PHILIPS_NTSC ]; goto checkDBX; } -#if defined( TEST_PAL ) -/** WARNING: this is a test */ + if ( card == CARD_HAUPPAUGE ) { if ( i2cRead( bktr, TEMIC_PALI_RADDR ) != ABSENT ) { bktr->card.tuner = &tuners[ TEMIC_PAL ]; goto checkDBX; } } -#endif /* TEST_PAL */ /* no tuner found */ bktr->card.tuner = &tuners[ NO_TUNER ]; checkDBX: +#if defined( OVERRIDE_DBX ) + bktr->card.dbx = OVERRIDE_DBX; + goto end; +#endif + /* probe for BTSC (dbx) chips */ if ( i2cRead( bktr, TDA9850_RADDR ) != ABSENT ) bktr->card.dbx = 1; |