1/* BT848 1.53 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 9 the Philips chipsets and the Bt848 are very different. --- 287 unchanged lines hidden (view full) --- 297 Removed Hauppauge EEPROM 0x10 detection as I think 298 0x10 should be a PAL tuner, not NTSC. 299 Reinstated some Tuner Guesswork code from 1.27 300 3011.52 3 Sep 1998 Roger Hardiman <roger@cs.strath.ac.uk> 302 Submitted patch by Vsevolod Lobko <seva@alex-ua.com> 303 to correct SECAM B-Delay and add XUSSR channel set. 304 |
3051.53 9 Sep 1998 Roger Hardiman <roger@cs.strath.ac.uk> 306 Changed METEORSINPUT for Hauppauge cards with bt878. 307 Submitted by Fred Templin <templin@erg.sri.com> 308 Also fixed video_open defines and 878 support. |
309 |
310*/ 311 312#define DDB(x) x 313#define DEB(x) 314 315#ifdef __FreeBSD__ 316#include "bktr.h" 317#include "opt_bktr.h" --- 639 unchanged lines hidden (view full) --- 957/* 958 * the data for each type of card 959 * 960 * Note: 961 * these entried MUST be kept in the order defined by the CARD_XXX defines! 962 */ 963static const struct CARDTYPE cards[] = { 964 |
965 { CARD_UNKNOWN, /* the card id */ 966 "Unknown", /* the 'name' */ |
967 NULL, /* the tuner */ 968 0, /* dbx unknown */ 969 0, 970 0, /* EEProm unknown */ 971 0, /* EEProm unknown */ 972 { 0, 0, 0, 0, 0 } }, 973 |
974 { CARD_MIRO, /* the card id */ 975 "Miro TV", /* the 'name' */ |
976 NULL, /* the tuner */ 977 0, /* dbx unknown */ 978 0, 979 0, /* EEProm unknown */ 980 0, /* size unknown */ 981 { 0x02, 0x01, 0x00, 0x0a, 1 } }, /* XXX ??? */ 982 |
983 { CARD_HAUPPAUGE, /* the card id */ 984 "Hauppauge WinCast/TV", /* the 'name' */ |
985 NULL, /* the tuner */ 986 0, /* dbx is optional */ 987 0, 988 PFC8582_WADDR, /* EEProm type */ 989 (u_char)(256 / EEPROMBLOCKSIZE), /* 256 bytes */ 990 { 0x00, 0x02, 0x01, 0x01, 1 } }, /* audio MUX values */ 991 |
992 { CARD_STB, /* the card id */ 993 "STB TV/PCI", /* the 'name' */ |
994 NULL, /* the tuner */ 995 0, /* dbx is optional */ 996 0, 997 X24C01_WADDR, /* EEProm type */ 998 (u_char)(128 / EEPROMBLOCKSIZE), /* 128 bytes */ 999 { 0x00, 0x01, 0x02, 0x02, 1 } }, /* audio MUX values */ 1000 |
1001 { CARD_INTEL, /* the card id */ 1002 "Intel Smart Video III/VideoLogic Captivator PCI", /* the 'name' */ |
1003 NULL, /* the tuner */ 1004 0, 1005 0, 1006 0, 1007 0, 1008 { 0, 0, 0, 0, 0 } }, 1009 |
1010 { CARD_IMS_TURBO, /* the card id */ 1011 "IMS TV Turbo", /* the 'name' */ |
1012 NULL, /* the tuner */ 1013 0, /* dbx is optional */ 1014 0, 1015 PFC8582_WADDR, /* EEProm type */ 1016 (u_char)(256 / EEPROMBLOCKSIZE), /* 256 bytes */ 1017 { 0x01, 0x02, 0x01, 0x00, 1 } }, /* audio MUX values */ 1018 |
1019 { CARD_AVER_MEDIA, /* the card id */ 1020 "AVer Media TV/FM", /* the 'name' */ |
1021 NULL, /* the tuner */ 1022 0, /* dbx is optional */ 1023 0, 1024 0, /* EEProm type */ 1025 0, /* EEProm size */ 1026 { 0x0c, 0x00, 0x0b, 0x0b, 1 } }, /* audio MUX values */ 1027}; 1028 --- 639 unchanged lines hidden (view full) --- 1668 1669 if (bt848_format == 0 ) 1670 video_format = 0; 1671 1672 if (bt848_format == 1 ) 1673 video_format = 1; 1674 1675 if (video_format == 1 ) { |
1676 bt848->iform = BT848_IFORM_F_NTSCM; |
1677 bktr->format_params = BT848_IFORM_F_NTSCM; 1678 1679 } else { |
1680 bt848->iform = BT848_IFORM_F_PALBDGHI; |
1681 bktr->format_params = BT848_IFORM_F_PALBDGHI; 1682 1683 } 1684 |
1685 bt848->iform |= format_params[bktr->format_params].iform_xtsel; 1686 1687 /* work around for new Hauppauge 878 cards */ 1688 if ((bktr->card.card_id == CARD_HAUPPAUGE) && 1689 (bktr->id==BROOKTREE_878_ID || bktr->id==BROOKTREE_879_ID) ) 1690 bt848->iform |= BT848_IFORM_M_MUX3; 1691 else 1692 bt848->iform |= BT848_IFORM_M_MUX1; 1693 |
1694 bt848->adelay = format_params[bktr->format_params].adelay; 1695 bt848->bdelay = format_params[bktr->format_params].bdelay; 1696 frame_rate = format_params[bktr->format_params].frame_rate; 1697 1698#ifdef BKTR_USE_PLL 1699 bt848->tgctrl=0; 1700 bt848->pll_f_lo=0xf9; 1701 bt848->pll_f_hi=0xdc; --- 1184 unchanged lines hidden (view full) --- 2886{ 2887 int pixfmt; 2888 unsigned int temp; 2889 struct meteor_pixfmt *pf_pub; 2890 2891 switch (cmd) { 2892 2893 case METEORSINPUT: /* set input device */ |
2894 /* Bt848 has 3 MUX Inputs. Bt848a/849/878/879 has 4 MUX Inputs*/ 2895 /* On the original bt848 boards, */ 2896 /* Tuner is MUX0, RCA is MUX1, S-Video is MUX2 */ 2897 /* On the Hauppauge bt878 boards, */ 2898 /* Tuner is MUX0, RCA is MUX4 */ 2899 /* Unfortunatly Meteor driver codes DEV_RCA as DEV_0, so we */ 2900 /* stick with this system in our Meteor Emulation */ 2901 |
2902 switch(*(unsigned long *)arg & METEOR_DEV_MASK) { 2903 2904 /* this is the RCA video input */ 2905 case 0: /* default */ 2906 case METEOR_INPUT_DEV0: |
2907 /* METEOR_INPUT_DEV_RCA: */ |
2908 bktr->flags = (bktr->flags & ~METEOR_DEV_MASK) 2909 | METEOR_DEV0; 2910 bt848->iform &= ~BT848_IFORM_MUXSEL; |
2911 2912 /* work around for new Hauppauge 878 cards */ 2913 if ((bktr->card.card_id == CARD_HAUPPAUGE) && 2914 (bktr->id==BROOKTREE_878_ID || 2915 bktr->id==BROOKTREE_879_ID) ) 2916 bt848->iform |= BT848_IFORM_M_MUX3; 2917 else 2918 bt848->iform |= BT848_IFORM_M_MUX1; 2919 |
2920 bt848->e_control &= ~BT848_E_CONTROL_COMP; 2921 bt848->o_control &= ~BT848_O_CONTROL_COMP; 2922 set_audio( bktr, AUDIO_EXTERN ); 2923 break; 2924 2925 /* this is the tuner input */ 2926 case METEOR_INPUT_DEV1: 2927 bktr->flags = (bktr->flags & ~METEOR_DEV_MASK) --- 13 unchanged lines hidden (view full) --- 2941 bt848->iform &= ~BT848_IFORM_MUXSEL; 2942 bt848->iform |= BT848_IFORM_M_MUX2; 2943 bt848->e_control |= BT848_E_CONTROL_COMP; 2944 bt848->o_control |= BT848_O_CONTROL_COMP; 2945 set_audio( bktr, AUDIO_EXTERN ); 2946 break; 2947 2948 case METEOR_INPUT_DEV3: |
2949 /* how do I detect a bt848a ? */ 2950 if ((bktr->id == BROOKTREE_849_ID) || 2951 (bktr->id == BROOKTREE_878_ID) || 2952 (bktr->id == BROOKTREE_879_ID) ) { |
2953 bktr->flags = (bktr->flags & ~METEOR_DEV_MASK) 2954 | METEOR_DEV3; 2955 bt848->iform &= ~BT848_IFORM_MUXSEL; 2956 bt848->iform |= BT848_IFORM_M_MUX3; 2957 bt848->e_control &= ~BT848_E_CONTROL_COMP; 2958 bt848->o_control &= ~BT848_O_CONTROL_COMP; 2959 set_audio( bktr, AUDIO_EXTERN ); 2960 --- 2466 unchanged lines hidden --- |