bktr_core.c (33940) | bktr_core.c (35050) |
---|---|
1/* BT848 1.27 Driver for Brooktree's Bt848 based cards. 2 The Brooktree BT848 Driver driver is based upon Mark Tinguely and 3 Jim Lowe's driver for the Matrox Meteor PCI card . The 4 Philips SAA 7116 and SAA 7196 are very different chipsets than 5 the BT848. For starters, the BT848 is a one chipset solution and 6 it incorporates a RISC engine to control the DMA transfers -- 7 that is it the actual dma process is control by a program which 8 resides in the hosts memory also the register definitions between --- 205 unchanged lines hidden (view full) --- 2141.26 Moved Luigi's I2CWR ioctl from the video_ioctl 215 section to the tuner_ioctl section 216 Changed Major device from 79 to 92 and reserved 217 our Major device number -- hasty@star-gate.com 2181.27 Last batch of patches for radio support from 219 Flemming Jacobsen <fj@trw.nl>. 220 Added B849 PCI ID submitted by: 221 Tomi Vainio <tomppa@fidata.fi> | 1/* BT848 1.27 Driver for Brooktree's Bt848 based cards. 2 The Brooktree BT848 Driver driver is based upon Mark Tinguely and 3 Jim Lowe's driver for the Matrox Meteor PCI card . The 4 Philips SAA 7116 and SAA 7196 are very different chipsets than 5 the BT848. For starters, the BT848 is a one chipset solution and 6 it incorporates a RISC engine to control the DMA transfers -- 7 that is it the actual dma process is control by a program which 8 resides in the hosts memory also the register definitions between --- 205 unchanged lines hidden (view full) --- 2141.26 Moved Luigi's I2CWR ioctl from the video_ioctl 215 section to the tuner_ioctl section 216 Changed Major device from 79 to 92 and reserved 217 our Major device number -- hasty@star-gate.com 2181.27 Last batch of patches for radio support from 219 Flemming Jacobsen <fj@trw.nl>. 220 Added B849 PCI ID submitted by: 221 Tomi Vainio <tomppa@fidata.fi> |
2221.28 Frank Nobis <fn@Radio-do.de> added tuner support 223 for the German Phillips PAL tuner and 224 additional channels for german cable tv. |
|
222*/ 223 224#define DDB(x) x 225#define DEB(x) 226 227#ifdef __FreeBSD__ 228#include "bktr.h" | 225*/ 226 227#define DDB(x) x 228#define DEB(x) 229 230#ifdef __FreeBSD__ 231#include "bktr.h" |
232#include "opt_bktr.h" |
|
229#include "opt_devfs.h" 230#include "pci.h" 231#endif /* __FreeBSD__ */ 232 233#if !defined(__FreeBSD__) || (NBKTR > 0 && NPCI > 0) 234 235#include <sys/param.h> 236#include <sys/systm.h> --- 317 unchanged lines hidden (view full) --- 554/* PLL on a Philips tuner */ 555#define PHILIPS_NTSC_WADDR 0xc6 556#define PHILIPS_NTSC_RADDR 0xc7 557 558/* PLL on a the Philips FR1236MK2 tuner */ 559#define PHILIPS_FR1236_NTSC_WADDR 0xc2 560#define PHILIPS_FR1236_NTSC_RADDR 0xc3 561 | 233#include "opt_devfs.h" 234#include "pci.h" 235#endif /* __FreeBSD__ */ 236 237#if !defined(__FreeBSD__) || (NBKTR > 0 && NPCI > 0) 238 239#include <sys/param.h> 240#include <sys/systm.h> --- 317 unchanged lines hidden (view full) --- 558/* PLL on a Philips tuner */ 559#define PHILIPS_NTSC_WADDR 0xc6 560#define PHILIPS_NTSC_RADDR 0xc7 561 562/* PLL on a the Philips FR1236MK2 tuner */ 563#define PHILIPS_FR1236_NTSC_WADDR 0xc2 564#define PHILIPS_FR1236_NTSC_RADDR 0xc3 565 |
566/* PLL on a the Philips FR1216MK2 tuner, 567 yes, the european version of the tuner is 1216 */ 568#define PHILIPS_FR1216_PAL_WADDR 0xc2 569#define PHILIPS_FR1216_PAL_RADDR 0xc3 570 |
|
562/* guaranteed address for any TSA5522/3 (PLL on all(?) tuners) */ 563#define TSA552x_WADDR 0xc2 564#define TSA552x_RADDR 0xc3 565 566#define PHILIPS_PAL_WADDR 0xc2 567#define PHILIPS_PAL_RADDR 0xc3 568 569 --- 183 unchanged lines hidden (view full) --- 753 * the boot time probe routine. 754 */ 755static char* 756bktr_probe( pcici_t tag, pcidi_t type ) 757{ 758 switch (type) { 759 case BROOKTREE_848_ID: 760 return("BrookTree 848"); | 571/* guaranteed address for any TSA5522/3 (PLL on all(?) tuners) */ 572#define TSA552x_WADDR 0xc2 573#define TSA552x_RADDR 0xc3 574 575#define PHILIPS_PAL_WADDR 0xc2 576#define PHILIPS_PAL_RADDR 0xc3 577 578 --- 183 unchanged lines hidden (view full) --- 762 * the boot time probe routine. 763 */ 764static char* 765bktr_probe( pcici_t tag, pcidi_t type ) 766{ 767 switch (type) { 768 case BROOKTREE_848_ID: 769 return("BrookTree 848"); |
770 case BROOKTREE_849_ID: 771 return("BrookTree 849"); |
|
761 }; 762 763 return ((char *)0); 764} 765#endif /* __FreeBSD__ */ 766 767 768 --- 2842 unchanged lines hidden (view full) --- 3611 /* check for ACK */ 3612 if ( !x || !(bt848->int_stat & BT848_INT_RACK) ) 3613 return( -1 ); 3614 3615 /* it was a read */ 3616 return( (bt848->i2c_data_ctl >> 8) & 0xff ); 3617} 3618 | 772 }; 773 774 return ((char *)0); 775} 776#endif /* __FreeBSD__ */ 777 778 779 --- 2842 unchanged lines hidden (view full) --- 3622 /* check for ACK */ 3623 if ( !x || !(bt848->int_stat & BT848_INT_RACK) ) 3624 return( -1 ); 3625 3626 /* it was a read */ 3627 return( (bt848->i2c_data_ctl >> 8) & 0xff ); 3628} 3629 |
3619 | |
3620#if defined( I2C_SOFTWARE_PROBE ) 3621 3622/* 3623 * we are keeping this around for any parts that we need to probe 3624 * but that CANNOT be probed via an i2c read. 3625 * this is necessary because the hardware i2c mechanism 3626 * cannot be programmed for 1 byte writes. 3627 * currently there are no known i2c parts that we need to probe --- 199 unchanged lines hidden (view full) --- 3827#define TEMIC_PAL 2 3828#define TEMIC_SECAM 3 3829#define PHILIPS_NTSC 4 3830#define PHILIPS_PAL 5 3831#define PHILIPS_SECAM 6 3832#define TEMIC_PALI 7 3833#define PHILIPS_PALI 8 3834#define PHILIPS_FR1236_NTSC 9 | 3630#if defined( I2C_SOFTWARE_PROBE ) 3631 3632/* 3633 * we are keeping this around for any parts that we need to probe 3634 * but that CANNOT be probed via an i2c read. 3635 * this is necessary because the hardware i2c mechanism 3636 * cannot be programmed for 1 byte writes. 3637 * currently there are no known i2c parts that we need to probe --- 199 unchanged lines hidden (view full) --- 3837#define TEMIC_PAL 2 3838#define TEMIC_SECAM 3 3839#define PHILIPS_NTSC 4 3840#define PHILIPS_PAL 5 3841#define PHILIPS_SECAM 6 3842#define TEMIC_PALI 7 3843#define PHILIPS_PALI 8 3844#define PHILIPS_FR1236_NTSC 9 |
3845#define PHILIPS_FR1216_PAL 10 |
|
3835 3836/* XXX FIXME: this list is incomplete */ 3837 3838/* input types */ 3839#define TTYPE_XXX 0 3840#define TTYPE_NTSC 1 3841#define TTYPE_NTSC_J 2 3842#define TTYPE_PAL 3 --- 117 unchanged lines hidden (view full) --- 3960 TTYPE_NTSC, /* input type */ 3961 PHILIPS_FR1236_NTSC_WADDR, /* PLL write address */ 3962 { TSA552x_SCONTROL, /* control byte for PLL */ 3963 TSA552x_SCONTROL, 3964 TSA552x_SCONTROL, 3965 0x00}, 3966 { 0x00, 0x00 }, /* band-switch crosspoints */ 3967 { 0xa0, 0x90, 0x30,0x00 } }, /* the band-switch values */ | 3846 3847/* XXX FIXME: this list is incomplete */ 3848 3849/* input types */ 3850#define TTYPE_XXX 0 3851#define TTYPE_NTSC 1 3852#define TTYPE_NTSC_J 2 3853#define TTYPE_PAL 3 --- 117 unchanged lines hidden (view full) --- 3971 TTYPE_NTSC, /* input type */ 3972 PHILIPS_FR1236_NTSC_WADDR, /* PLL write address */ 3973 { TSA552x_SCONTROL, /* control byte for PLL */ 3974 TSA552x_SCONTROL, 3975 TSA552x_SCONTROL, 3976 0x00}, 3977 { 0x00, 0x00 }, /* band-switch crosspoints */ 3978 { 0xa0, 0x90, 0x30,0x00 } }, /* the band-switch values */ |
3979 3980 /* PHILIPS_FR1216_PAL */ 3981 { "Philips FR1216 PAL FM", /* the 'name' */ 3982 TTYPE_PAL, /* input type */ 3983 PHILIPS_FR1216_PAL_WADDR, /* PLL write address */ 3984 { TSA552x_FCONTROL, /* control byte for PLL */ 3985 TSA552x_FCONTROL, 3986 TSA552x_FCONTROL, 3987 TSA552x_RADIO }, 3988 { 0x00, 0x00 }, /* band-switch crosspoints */ 3989 { 0xa0, 0x90, 0x30, 0xa4 } }, /* the band-switch values */ |
|
3968}; 3969 3970 3971/* 3972 * get a signature of the card 3973 * read all 128 possible i2c read addresses from 0x01 thru 0xff 3974 * build a bit array with a 1 bit for each i2c device that responds 3975 * --- 335 unchanged lines hidden (view full) --- 4311 * 92 24525 700 S13 4312 * 93 25225 700 S14 4313 * 94 25925 700 S15 4314 * 95 26625 700 S16 4315 * 96 27325 700 S17 4316 * 97 28025 700 S18 4317 * 98 28725 700 S19 4318 * 99 29425 700 S20 | 3990}; 3991 3992 3993/* 3994 * get a signature of the card 3995 * read all 128 possible i2c read addresses from 0x01 thru 0xff 3996 * build a bit array with a 1 bit for each i2c device that responds 3997 * --- 335 unchanged lines hidden (view full) --- 4333 * 92 24525 700 S13 4334 * 93 25225 700 S14 4335 * 94 25925 700 S15 4336 * 95 26625 700 S16 4337 * 96 27325 700 S17 4338 * 97 28025 700 S18 4339 * 98 28725 700 S19 4340 * 99 29425 700 S20 |
4341 * 4342 * 4343 * Channels S21 - S41 are taken from 4344 * http://gemma.apple.com:80/dev/technotes/tn/tn1012.html 4345 * 4346 * 100 30325 800 S21 4347 * 101 31125 800 S22 4348 * 102 31925 800 S23 4349 * 103 32725 800 S24 4350 * 104 33525 800 S25 4351 * 105 34325 800 S26 4352 * 106 35125 800 S27 4353 * 107 35925 800 S28 4354 * 108 36725 800 S29 4355 * 109 37525 800 S30 4356 * 110 38325 800 S31 4357 * 111 39125 800 S32 4358 * 112 39925 800 S33 4359 * 113 40725 800 S34 4360 * 114 41525 800 S35 4361 * 115 42325 800 S36 4362 * 116 43125 800 S37 4363 * 117 43925 800 S38 4364 * 118 44725 800 S39 4365 * 119 45525 800 S40 4366 * 120 46325 800 S41 |
|
4319 * | 4367 * |
4320 * 100 3890 000 IFFREQ | 4368 * 121 3890 000 IFFREQ |
4321 * 4322 */ 4323static int weurope[] = { | 4369 * 4370 */ 4371static int weurope[] = { |
4324 100, (int)( 38.90 * FREQFACTOR), 0, | 4372 121, (int)( 38.90 * FREQFACTOR), 0, 4373 100, (int)(303.25 * FREQFACTOR), (int)(8.00 * FREQFACTOR), |
4325 90, (int)(231.25 * FREQFACTOR), (int)(7.00 * FREQFACTOR), 4326 80, (int)(105.25 * FREQFACTOR), (int)(7.00 * FREQFACTOR), 4327 74, (int)( 69.25 * FREQFACTOR), (int)(7.00 * FREQFACTOR), 4328 21, (int)(471.25 * FREQFACTOR), (int)(8.00 * FREQFACTOR), 4329 17, (int)(183.25 * FREQFACTOR), (int)(9.00 * FREQFACTOR), 4330 16, (int)(175.25 * FREQFACTOR), (int)(9.00 * FREQFACTOR), 4331 15, (int)(82.25 * FREQFACTOR), (int)(8.50 * FREQFACTOR), 4332 13, (int)(53.75 * FREQFACTOR), (int)(8.50 * FREQFACTOR), --- 423 unchanged lines hidden --- | 4374 90, (int)(231.25 * FREQFACTOR), (int)(7.00 * FREQFACTOR), 4375 80, (int)(105.25 * FREQFACTOR), (int)(7.00 * FREQFACTOR), 4376 74, (int)( 69.25 * FREQFACTOR), (int)(7.00 * FREQFACTOR), 4377 21, (int)(471.25 * FREQFACTOR), (int)(8.00 * FREQFACTOR), 4378 17, (int)(183.25 * FREQFACTOR), (int)(9.00 * FREQFACTOR), 4379 16, (int)(175.25 * FREQFACTOR), (int)(9.00 * FREQFACTOR), 4380 15, (int)(82.25 * FREQFACTOR), (int)(8.50 * FREQFACTOR), 4381 13, (int)(53.75 * FREQFACTOR), (int)(8.50 * FREQFACTOR), --- 423 unchanged lines hidden --- |