Update to driver release 1.74
Bug fix: xmradio nolonger experiences a 6Mhz offset after running FXTV New feature: Automatic Tuner selection for AVerMedia cards with configuration EEPROMs on (ie the Bt878 based cards)
This commit is contained in:
parent
28b50861e7
commit
f53c00ee1a
@ -459,6 +459,15 @@ They are unrelated to Revision Control numbering of FreeBSD or any other system.
|
||||
Ladislav Kostal <kostal@pefstud.uniag.sk>
|
||||
Added select() code (for VBI) for the 2.2.x driver
|
||||
tested by Steve Richards <steve@richsoft.demon.co.uk>
|
||||
|
||||
1.74 17 Sep 1999 Roger Hardiman <roger@freebsd.org>
|
||||
Fix bug where FM radio stations were offset after using FXTV
|
||||
AVerMedia tuner type autodetection added for cards with
|
||||
a configuration EEPROM (currently their Bt878 range)
|
||||
Thanks to Frank at AVerMedia for providing the information.
|
||||
Tested by David La Croix <dlacroix@cowpie.acm.vt.edu>
|
||||
Tidy up some tuner code and Hauppauge detection code.
|
||||
New NetBSD code from Bernd Ernesti<bernd@arresum.inka.de>
|
||||
*/
|
||||
|
||||
#ifdef __FreeBSD__
|
||||
@ -870,9 +879,9 @@ static struct {
|
||||
#define PHILIPS_SECAM 6
|
||||
#define TEMIC_PALI 7
|
||||
#define PHILIPS_PALI 8
|
||||
#define PHILIPS_FR1236_NTSC 9
|
||||
#define PHILIPS_FR1216_PAL 10
|
||||
#define PHILIPS_FR1236_SECAM 11
|
||||
#define PHILIPS_FR1236_NTSC 9 /* These have FM Radio support */
|
||||
#define PHILIPS_FR1216_PAL 10 /* These have FM Radio support */
|
||||
#define PHILIPS_FR1236_SECAM 11 /* These have FM Radio support */
|
||||
#define ALPS_TSCH5 12
|
||||
#define ALPS_TSBH1 13
|
||||
#define Bt848_MAX_TUNER 14
|
||||
@ -1006,10 +1015,10 @@ static const struct TUNER tuners[] = {
|
||||
TSA552x_SCONTROL,
|
||||
TSA552x_RADIO },
|
||||
{ 0x00, 0x00 }, /* band-switch crosspoints */
|
||||
{ 0xa0, 0x90, 0x30,0xa4 } }, /* the band-switch values */
|
||||
{ 0xa0, 0x90, 0x30, 0xa4 } }, /* the band-switch values */
|
||||
|
||||
/* PHILIPS_FR1216_PAL */
|
||||
{ "Philips FR1216 PAL" , /* the 'name' */
|
||||
{ "Philips FR1216 PAL FM" , /* the 'name' */
|
||||
TTYPE_PAL, /* input type */
|
||||
{ TSA552x_FCONTROL, /* control byte for Tuner PLL */
|
||||
TSA552x_FCONTROL,
|
||||
@ -1029,7 +1038,7 @@ static const struct TUNER tuners[] = {
|
||||
{ 0xa0, 0x90, 0x30, 0xa4 } }, /* the band-switch values */
|
||||
|
||||
/* ALPS TSCH5 NTSC */
|
||||
{ "ALPS TSCH5", /* the 'name' */
|
||||
{ "ALPS TSCH5 NTSC FM", /* the 'name' */
|
||||
TTYPE_NTSC, /* input type */
|
||||
{ TSCH5_FCONTROL, /* control byte for Tuner PLL */
|
||||
TSCH5_FCONTROL,
|
||||
@ -1039,7 +1048,7 @@ static const struct TUNER tuners[] = {
|
||||
{ 0x14, 0x12, 0x11, 0x04 } }, /* the band-switch values */
|
||||
|
||||
/* ALPS TSBH1 NTSC */
|
||||
{ "ALPS TSBH1", /* the 'name' */
|
||||
{ "ALPS TSBH1 NTSC", /* the 'name' */
|
||||
TTYPE_NTSC, /* input type */
|
||||
{ TSBH1_FCONTROL, /* control byte for Tuner PLL */
|
||||
TSBH1_FCONTROL,
|
||||
@ -1521,6 +1530,8 @@ common_bktr_attach( bktr_ptr_t bktr, int unit, u_long pci_id, u_int rev )
|
||||
bktr->tuner.frequency = 0;
|
||||
bktr->tuner.channel = 0;
|
||||
bktr->tuner.chnlset = DEFAULT_CHNLSET;
|
||||
bktr->tuner.afc = 0;
|
||||
bktr->tuner.radio_mode = 0;
|
||||
bktr->audio_mux_select = 0;
|
||||
bktr->audio_mute_state = FALSE;
|
||||
bktr->bt848_card = -1;
|
||||
@ -2000,6 +2011,10 @@ tuner_open( bktr_ptr_t bktr )
|
||||
return( 0 );
|
||||
|
||||
bktr->tflags |= TUNER_OPEN;
|
||||
bktr->tuner.frequency = 0;
|
||||
bktr->tuner.channel = 0;
|
||||
bktr->tuner.chnlset = DEFAULT_CHNLSET;
|
||||
bktr->tuner.afc = 0;
|
||||
bktr->tuner.radio_mode = 0;
|
||||
|
||||
/* enable drivers on the GPIO port that control the MUXes */
|
||||
@ -3594,8 +3609,9 @@ rgb_vbi_prog( bktr_ptr_t bktr, char i_flag, int cols, int rows, int interlace )
|
||||
bt848_ptr_t bt848;
|
||||
volatile u_long target_buffer, buffer, target,width;
|
||||
volatile u_long pitch;
|
||||
volatile u_long *dma_prog;
|
||||
vm_offset_t loop_point;
|
||||
volatile u_long *dma_prog; /* DMA prog is an array of
|
||||
32 bit RISC instructions */
|
||||
volatile u_long *loop_point;
|
||||
struct meteor_pixfmt_internal *pf_int = &pixfmt_table[ bktr->pixfmt ];
|
||||
u_int Bpp = pf_int->public.Bpp;
|
||||
unsigned int vbisamples; /* VBI samples per line */
|
||||
@ -5355,7 +5371,6 @@ probeCard( bktr_ptr_t bktr, int verbose, int unit )
|
||||
u_char probe_signature[128], *probe_temp;
|
||||
int any_i2c_devices;
|
||||
u_char eeprom[256];
|
||||
u_char tuner_code = 0;
|
||||
int tuner_i2c_address = -1;
|
||||
int eeprom_i2c_address = -1;
|
||||
|
||||
@ -5668,13 +5683,15 @@ probeCard( bktr_ptr_t bktr, int verbose, int unit )
|
||||
|
||||
*/
|
||||
|
||||
if (bktr->card.eepromAddr != 0) {
|
||||
u_char tuner_code;
|
||||
u_int model;
|
||||
u_int revision;
|
||||
|
||||
readEEProm(bktr, 0, 128, (u_char *) &eeprom );
|
||||
|
||||
|
||||
/* Determine the model number from the eeprom */
|
||||
{
|
||||
u_int model;
|
||||
u_int revision;
|
||||
model = (eeprom[12] << 8 | eeprom[11]);
|
||||
revision = (eeprom[15] << 16 | eeprom[14] << 8 | eeprom[13]);
|
||||
if (verbose)
|
||||
@ -5685,7 +5702,6 @@ probeCard( bktr_ptr_t bktr, int verbose, int unit )
|
||||
((revision >> 12) & 0x3f) + 32,
|
||||
((revision >> 6) & 0x3f) + 32,
|
||||
((revision >> 0) & 0x3f) + 32 );
|
||||
}
|
||||
|
||||
/* Determine the tuner type from the eeprom */
|
||||
tuner_code = eeprom[9];
|
||||
@ -5728,6 +5744,72 @@ probeCard( bktr_ptr_t bktr, int verbose, int unit )
|
||||
default :
|
||||
printf("Warning - Unknown Hauppauge Tuner 0x%x\n",tuner_code);
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
||||
case CARD_AVER_MEDIA:
|
||||
/* AVerMedia kindly supplied some details of their EEPROM contents
|
||||
* which allow us to auto select the Tuner Type.
|
||||
* Only the newer AVerMedia cards actually have an EEPROM.
|
||||
*/
|
||||
if (bktr->card.eepromAddr != 0) {
|
||||
|
||||
u_char tuner_make; /* Eg Philips, Temic */
|
||||
u_char tuner_tv_fm; /* TV or TV with FM Radio */
|
||||
u_char tuner_format; /* Eg NTSC, PAL, SECAM */
|
||||
int tuner;
|
||||
|
||||
int tuner_0_table[] = {
|
||||
PHILIPS_NTSC, PHILIPS_PAL,
|
||||
PHILIPS_PAL, PHILIPS_PAL,
|
||||
PHILIPS_PAL, PHILIPS_PAL,
|
||||
PHILIPS_SECAM, PHILIPS_SECAM,
|
||||
PHILIPS_SECAM, PHILIPS_PAL};
|
||||
|
||||
int tuner_0_fm_table[] = {
|
||||
PHILIPS_FR1236_NTSC, PHILIPS_FR1216_PAL,
|
||||
PHILIPS_FR1216_PAL, PHILIPS_FR1216_PAL,
|
||||
PHILIPS_FR1216_PAL, PHILIPS_FR1216_PAL,
|
||||
PHILIPS_FR1236_SECAM, PHILIPS_FR1236_SECAM,
|
||||
PHILIPS_FR1236_SECAM, PHILIPS_FR1216_PAL};
|
||||
|
||||
int tuner_1_table[] = {
|
||||
TEMIC_NTSC, TEMIC_PAL, TEMIC_PAL,
|
||||
TEMIC_PAL, TEMIC_PAL, TEMIC_PAL,
|
||||
TEMIC_SECAM, TEMIC_SECAM, TEMIC_SECAM,
|
||||
TEMIC_PAL};
|
||||
|
||||
|
||||
/* Extract information from the EEPROM data */
|
||||
readEEProm(bktr, 0, 128, (u_char *) &eeprom );
|
||||
tuner_make = (eeprom[0x41] & 0x7);
|
||||
tuner_tv_fm = (eeprom[0x41] & 0x18) >> 3;
|
||||
tuner_format = (eeprom[0x42] & 0xf0) >> 4;
|
||||
|
||||
/* Treat tuner makes 0 (Philips) and 2 (LG) the same */
|
||||
if ( ((tuner_make == 0) || (tuner_make == 2))
|
||||
&& (tuner_format <= 9) && (tuner_tv_fm == 0) ) {
|
||||
tuner = tuner_0_table[tuner_format];
|
||||
bktr->card.tuner = &tuners[ tuner ];
|
||||
goto checkDBX;
|
||||
}
|
||||
|
||||
if ( ((tuner_make == 0) || (tuner_make == 2))
|
||||
&& (tuner_format <= 9) && (tuner_tv_fm == 1) ) {
|
||||
tuner = tuner_0_fm_table[tuner_format];
|
||||
bktr->card.tuner = &tuners[ tuner ];
|
||||
goto checkDBX;
|
||||
}
|
||||
|
||||
if ( (tuner_make == 1) && (tuner_format <= 9) ) {
|
||||
tuner = tuner_1_table[tuner_format];
|
||||
bktr->card.tuner = &tuners[ tuner ];
|
||||
goto checkDBX;
|
||||
}
|
||||
|
||||
printf("Warning - Unknown AVerMedia Tuner Make %d Format %d\n",
|
||||
tuner_make, tuner_format);
|
||||
}
|
||||
break;
|
||||
|
||||
} /* end switch(card) */
|
||||
|
@ -459,6 +459,15 @@ They are unrelated to Revision Control numbering of FreeBSD or any other system.
|
||||
Ladislav Kostal <kostal@pefstud.uniag.sk>
|
||||
Added select() code (for VBI) for the 2.2.x driver
|
||||
tested by Steve Richards <steve@richsoft.demon.co.uk>
|
||||
|
||||
1.74 17 Sep 1999 Roger Hardiman <roger@freebsd.org>
|
||||
Fix bug where FM radio stations were offset after using FXTV
|
||||
AVerMedia tuner type autodetection added for cards with
|
||||
a configuration EEPROM (currently their Bt878 range)
|
||||
Thanks to Frank at AVerMedia for providing the information.
|
||||
Tested by David La Croix <dlacroix@cowpie.acm.vt.edu>
|
||||
Tidy up some tuner code and Hauppauge detection code.
|
||||
New NetBSD code from Bernd Ernesti<bernd@arresum.inka.de>
|
||||
*/
|
||||
|
||||
#ifdef __FreeBSD__
|
||||
@ -870,9 +879,9 @@ static struct {
|
||||
#define PHILIPS_SECAM 6
|
||||
#define TEMIC_PALI 7
|
||||
#define PHILIPS_PALI 8
|
||||
#define PHILIPS_FR1236_NTSC 9
|
||||
#define PHILIPS_FR1216_PAL 10
|
||||
#define PHILIPS_FR1236_SECAM 11
|
||||
#define PHILIPS_FR1236_NTSC 9 /* These have FM Radio support */
|
||||
#define PHILIPS_FR1216_PAL 10 /* These have FM Radio support */
|
||||
#define PHILIPS_FR1236_SECAM 11 /* These have FM Radio support */
|
||||
#define ALPS_TSCH5 12
|
||||
#define ALPS_TSBH1 13
|
||||
#define Bt848_MAX_TUNER 14
|
||||
@ -1006,10 +1015,10 @@ static const struct TUNER tuners[] = {
|
||||
TSA552x_SCONTROL,
|
||||
TSA552x_RADIO },
|
||||
{ 0x00, 0x00 }, /* band-switch crosspoints */
|
||||
{ 0xa0, 0x90, 0x30,0xa4 } }, /* the band-switch values */
|
||||
{ 0xa0, 0x90, 0x30, 0xa4 } }, /* the band-switch values */
|
||||
|
||||
/* PHILIPS_FR1216_PAL */
|
||||
{ "Philips FR1216 PAL" , /* the 'name' */
|
||||
{ "Philips FR1216 PAL FM" , /* the 'name' */
|
||||
TTYPE_PAL, /* input type */
|
||||
{ TSA552x_FCONTROL, /* control byte for Tuner PLL */
|
||||
TSA552x_FCONTROL,
|
||||
@ -1029,7 +1038,7 @@ static const struct TUNER tuners[] = {
|
||||
{ 0xa0, 0x90, 0x30, 0xa4 } }, /* the band-switch values */
|
||||
|
||||
/* ALPS TSCH5 NTSC */
|
||||
{ "ALPS TSCH5", /* the 'name' */
|
||||
{ "ALPS TSCH5 NTSC FM", /* the 'name' */
|
||||
TTYPE_NTSC, /* input type */
|
||||
{ TSCH5_FCONTROL, /* control byte for Tuner PLL */
|
||||
TSCH5_FCONTROL,
|
||||
@ -1039,7 +1048,7 @@ static const struct TUNER tuners[] = {
|
||||
{ 0x14, 0x12, 0x11, 0x04 } }, /* the band-switch values */
|
||||
|
||||
/* ALPS TSBH1 NTSC */
|
||||
{ "ALPS TSBH1", /* the 'name' */
|
||||
{ "ALPS TSBH1 NTSC", /* the 'name' */
|
||||
TTYPE_NTSC, /* input type */
|
||||
{ TSBH1_FCONTROL, /* control byte for Tuner PLL */
|
||||
TSBH1_FCONTROL,
|
||||
@ -1521,6 +1530,8 @@ common_bktr_attach( bktr_ptr_t bktr, int unit, u_long pci_id, u_int rev )
|
||||
bktr->tuner.frequency = 0;
|
||||
bktr->tuner.channel = 0;
|
||||
bktr->tuner.chnlset = DEFAULT_CHNLSET;
|
||||
bktr->tuner.afc = 0;
|
||||
bktr->tuner.radio_mode = 0;
|
||||
bktr->audio_mux_select = 0;
|
||||
bktr->audio_mute_state = FALSE;
|
||||
bktr->bt848_card = -1;
|
||||
@ -2000,6 +2011,10 @@ tuner_open( bktr_ptr_t bktr )
|
||||
return( 0 );
|
||||
|
||||
bktr->tflags |= TUNER_OPEN;
|
||||
bktr->tuner.frequency = 0;
|
||||
bktr->tuner.channel = 0;
|
||||
bktr->tuner.chnlset = DEFAULT_CHNLSET;
|
||||
bktr->tuner.afc = 0;
|
||||
bktr->tuner.radio_mode = 0;
|
||||
|
||||
/* enable drivers on the GPIO port that control the MUXes */
|
||||
@ -3594,8 +3609,9 @@ rgb_vbi_prog( bktr_ptr_t bktr, char i_flag, int cols, int rows, int interlace )
|
||||
bt848_ptr_t bt848;
|
||||
volatile u_long target_buffer, buffer, target,width;
|
||||
volatile u_long pitch;
|
||||
volatile u_long *dma_prog;
|
||||
vm_offset_t loop_point;
|
||||
volatile u_long *dma_prog; /* DMA prog is an array of
|
||||
32 bit RISC instructions */
|
||||
volatile u_long *loop_point;
|
||||
struct meteor_pixfmt_internal *pf_int = &pixfmt_table[ bktr->pixfmt ];
|
||||
u_int Bpp = pf_int->public.Bpp;
|
||||
unsigned int vbisamples; /* VBI samples per line */
|
||||
@ -5355,7 +5371,6 @@ probeCard( bktr_ptr_t bktr, int verbose, int unit )
|
||||
u_char probe_signature[128], *probe_temp;
|
||||
int any_i2c_devices;
|
||||
u_char eeprom[256];
|
||||
u_char tuner_code = 0;
|
||||
int tuner_i2c_address = -1;
|
||||
int eeprom_i2c_address = -1;
|
||||
|
||||
@ -5668,13 +5683,15 @@ probeCard( bktr_ptr_t bktr, int verbose, int unit )
|
||||
|
||||
*/
|
||||
|
||||
if (bktr->card.eepromAddr != 0) {
|
||||
u_char tuner_code;
|
||||
u_int model;
|
||||
u_int revision;
|
||||
|
||||
readEEProm(bktr, 0, 128, (u_char *) &eeprom );
|
||||
|
||||
|
||||
/* Determine the model number from the eeprom */
|
||||
{
|
||||
u_int model;
|
||||
u_int revision;
|
||||
model = (eeprom[12] << 8 | eeprom[11]);
|
||||
revision = (eeprom[15] << 16 | eeprom[14] << 8 | eeprom[13]);
|
||||
if (verbose)
|
||||
@ -5685,7 +5702,6 @@ probeCard( bktr_ptr_t bktr, int verbose, int unit )
|
||||
((revision >> 12) & 0x3f) + 32,
|
||||
((revision >> 6) & 0x3f) + 32,
|
||||
((revision >> 0) & 0x3f) + 32 );
|
||||
}
|
||||
|
||||
/* Determine the tuner type from the eeprom */
|
||||
tuner_code = eeprom[9];
|
||||
@ -5728,6 +5744,72 @@ probeCard( bktr_ptr_t bktr, int verbose, int unit )
|
||||
default :
|
||||
printf("Warning - Unknown Hauppauge Tuner 0x%x\n",tuner_code);
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
||||
case CARD_AVER_MEDIA:
|
||||
/* AVerMedia kindly supplied some details of their EEPROM contents
|
||||
* which allow us to auto select the Tuner Type.
|
||||
* Only the newer AVerMedia cards actually have an EEPROM.
|
||||
*/
|
||||
if (bktr->card.eepromAddr != 0) {
|
||||
|
||||
u_char tuner_make; /* Eg Philips, Temic */
|
||||
u_char tuner_tv_fm; /* TV or TV with FM Radio */
|
||||
u_char tuner_format; /* Eg NTSC, PAL, SECAM */
|
||||
int tuner;
|
||||
|
||||
int tuner_0_table[] = {
|
||||
PHILIPS_NTSC, PHILIPS_PAL,
|
||||
PHILIPS_PAL, PHILIPS_PAL,
|
||||
PHILIPS_PAL, PHILIPS_PAL,
|
||||
PHILIPS_SECAM, PHILIPS_SECAM,
|
||||
PHILIPS_SECAM, PHILIPS_PAL};
|
||||
|
||||
int tuner_0_fm_table[] = {
|
||||
PHILIPS_FR1236_NTSC, PHILIPS_FR1216_PAL,
|
||||
PHILIPS_FR1216_PAL, PHILIPS_FR1216_PAL,
|
||||
PHILIPS_FR1216_PAL, PHILIPS_FR1216_PAL,
|
||||
PHILIPS_FR1236_SECAM, PHILIPS_FR1236_SECAM,
|
||||
PHILIPS_FR1236_SECAM, PHILIPS_FR1216_PAL};
|
||||
|
||||
int tuner_1_table[] = {
|
||||
TEMIC_NTSC, TEMIC_PAL, TEMIC_PAL,
|
||||
TEMIC_PAL, TEMIC_PAL, TEMIC_PAL,
|
||||
TEMIC_SECAM, TEMIC_SECAM, TEMIC_SECAM,
|
||||
TEMIC_PAL};
|
||||
|
||||
|
||||
/* Extract information from the EEPROM data */
|
||||
readEEProm(bktr, 0, 128, (u_char *) &eeprom );
|
||||
tuner_make = (eeprom[0x41] & 0x7);
|
||||
tuner_tv_fm = (eeprom[0x41] & 0x18) >> 3;
|
||||
tuner_format = (eeprom[0x42] & 0xf0) >> 4;
|
||||
|
||||
/* Treat tuner makes 0 (Philips) and 2 (LG) the same */
|
||||
if ( ((tuner_make == 0) || (tuner_make == 2))
|
||||
&& (tuner_format <= 9) && (tuner_tv_fm == 0) ) {
|
||||
tuner = tuner_0_table[tuner_format];
|
||||
bktr->card.tuner = &tuners[ tuner ];
|
||||
goto checkDBX;
|
||||
}
|
||||
|
||||
if ( ((tuner_make == 0) || (tuner_make == 2))
|
||||
&& (tuner_format <= 9) && (tuner_tv_fm == 1) ) {
|
||||
tuner = tuner_0_fm_table[tuner_format];
|
||||
bktr->card.tuner = &tuners[ tuner ];
|
||||
goto checkDBX;
|
||||
}
|
||||
|
||||
if ( (tuner_make == 1) && (tuner_format <= 9) ) {
|
||||
tuner = tuner_1_table[tuner_format];
|
||||
bktr->card.tuner = &tuners[ tuner ];
|
||||
goto checkDBX;
|
||||
}
|
||||
|
||||
printf("Warning - Unknown AVerMedia Tuner Make %d Format %d\n",
|
||||
tuner_make, tuner_format);
|
||||
}
|
||||
break;
|
||||
|
||||
} /* end switch(card) */
|
||||
|
Loading…
Reference in New Issue
Block a user