⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 bttv-cards.c

📁 pxa270下的摄像头mtd91111的驱动
💻 C
📖 第 1 页 / 共 5 页
字号:
	pll:            PLL_35,	tuner_type:     -1,},{        /* Daniel Herrington <daniel.herrington@home.com> */        name:           "Askey CPH060/ Phoebe TV Master Only (No FM)",        video_inputs:   3,        audio_inputs:   1,        tuner:          0,        svhs:           2,        gpiomask:       0xe00,        muxsel:         { 2, 3, 1, 1},        audiomux:       { 0x400, 0x400, 0x400, 0x400, 0x800, 0x400 },        needs_tvaudio:  1,        pll:            PLL_28,        tuner_type:     TUNER_TEMIC_4036FY5_NTSC,},{	/* Matti Mottus <mottus@physic.ut.ee> */	name:		"Askey CPH03x TV Capturer",	video_inputs:	4,	audio_inputs:	1,	tuner:		0,	svhs:		2,        gpiomask:       0x03000F,	muxsel:		{ 2, 3, 1, 0},        audiomux:       { 2,0,0,0,1 },	pll:            PLL_28,	tuner_type:	0,},{/* ---- card 0x3c ---------------------------------- */	/* Philip Blundell <philb@gnu.org> */	name:           "Modular Technology MM100PCTV",	video_inputs:   2,	audio_inputs:   2,	tuner:		0,	svhs:		-1,	gpiomask:       11,	muxsel:         { 2, 3, 1, 1},	audiomux:       { 2, 0, 0, 1, 8},	pll:            PLL_35,	tuner_type:     TUNER_TEMIC_PAL,},{	/* Adrian Cox <adrian@humboldt.co.uk */	name:	        "AG Electronics GMV1",	video_inputs:   2,	audio_inputs:   0,	tuner:	        -1,	svhs:	        1,	gpiomask:       0xF,	muxsel:	        { 2, 2},	audiomux:       { },	no_msp34xx:     1,	needs_tvaudio:  0,	pll:	        PLL_28,	tuner_type:     -1,},{	/* Miguel Angel Alvarez <maacruz@navegalia.com>	   new Easy TV BT878 version (model CPH061) 	   special thanks to Informatica Mieres for providing the card */	name:           "Askey CPH061/ BESTBUY Easy TV (bt878)",	video_inputs:	3,	audio_inputs:   2,	tuner:          0,	svhs:           2,	gpiomask:       0xFF,	muxsel:         { 2, 3, 1, 0},	audiomux:       { 1, 0, 4, 4, 9},	needs_tvaudio:  0,	pll:		PLL_28,	tuner_type:	TUNER_PHILIPS_PAL,},{	/* Lukas Gebauer <geby@volny.cz> */	name:		"ATI TV-Wonder",	video_inputs:	3,	audio_inputs:	1,	tuner:		0,	svhs:		2,	gpiomask:	0xf03f,	muxsel:		{ 2, 3, 1, 0 },	audiomux:	{ 0xbffe, 0, 0xbfff, 0, 0xbffe},	pll:		PLL_28,	tuner_type:	TUNER_TEMIC_4006FN5_MULTI_PAL,},{/* ---- card 0x40 ---------------------------------- */	/* Lukas Gebauer <geby@volny.cz> */	name:		"ATI TV-Wonder VE",	video_inputs:	2,	audio_inputs:	1,	tuner:		0,	svhs:		-1,	gpiomask:	1,	muxsel:		{ 2, 3, 0, 1},	audiomux:	{ 0, 0, 1, 0, 0},	no_msp34xx:	1,	pll:		PLL_28,	tuner_type:	TUNER_TEMIC_4006FN5_MULTI_PAL,},{	/* DeeJay <deejay@westel900.net (2000S) */	name:           "Lifeview FlyVideo 2000S LR90",	video_inputs:   3,	audio_inputs:   3,	tuner:          0,	svhs:           2,	gpiomask:	0x18e0,	muxsel:		{ 2, 3, 0, 1},			/* Radio changed from 1e80 to 0x800 to make			   FlyVideo2000S in .hu happy (gm)*/			/* -dk-???: set mute=0x1800 for tda9874h daughterboard */	audiomux:	{ 0x0000,0x0800,0x1000,0x1000,0x1800, 0x1080 },	audio_hook:	fv2000s_audio,	no_msp34xx:	1,	no_tda9875:	1,	needs_tvaudio:  1,	pll:            PLL_28,	tuner_type:     5,},{	name:		"Terratec TValueRadio",	video_inputs:	3,	audio_inputs:	1,	tuner:		0,	svhs:		2,	gpiomask:	0xffff00,	muxsel:		{ 2, 3, 1, 1},	audiomux:	{ 0x500, 0x500, 0x300, 0x900, 0x900},	needs_tvaudio:	1,	pll:		PLL_28,	tuner_type:	TUNER_PHILIPS_PAL,	has_radio:	1,},{	/* TANAKA Kei <peg00625@nifty.com> */	name:           "IODATA GV-BCTV4/PCI",	video_inputs:   3,	audio_inputs:   1,	tuner:          0,	svhs:           2,	gpiomask:       0x010f00,	muxsel:         {2, 3, 0, 0},	audiomux:       {0x10000, 0, 0x10000, 0, 0, 0},	no_msp34xx:     1,	pll:            PLL_28,	tuner_type:     TUNER_SHARP_2U5JF5540_NTSC,	audio_hook:     gvbctv3pci_audio,},{/* ---- card 0x44 ---------------------------------- */        name:           "3Dfx VoodooTV FM (Euro), VoodooTV 200 (USA)",	// try "insmod msp3400 simple=0" if you have	// sound problems with this card.        video_inputs:   4,        audio_inputs:   1,        tuner:          0,        svhs:           -1,        gpiomask:       0x4f8a00,	// 0x100000: 1=MSP enabled (0=disable again)	// 0x010000: Connected to "S0" on tda9880 (0=Pal/BG, 1=NTSC)        audiomux:       {0x947fff, 0x987fff,0x947fff,0x947fff, 0x947fff},	// tvtuner, radio,   external,internal, mute,  stereo	/* tuner, Composit, SVid, Composit-on-Svid-adapter*/        muxsel:         { 2, 3 ,0 ,1},        tuner_type:     TUNER_MT2032,	pll:		PLL_28,	has_radio:	1,},{	/* Philip Blundell <pb@nexus.co.uk> */	name:           "Active Imaging AIMMS",	video_inputs:   1,	audio_inputs:   0,	tuner:          -1,	tuner_type:     -1,	pll:            PLL_28,	muxsel:         { 2 },	gpiomask:       0},{        /* Tomasz Pyra <hellfire@sedez.iq.pl> */        name:           "Prolink Pixelview PV-BT878P+ (Rev.4C)",        video_inputs:   3,        audio_inputs:   4,        tuner:          0,        svhs:           2,        gpiomask:       15,        muxsel:         { 2, 3, 1, 1},        audiomux:       { 0, 0, 11, 7, 13, 0},        needs_tvaudio:  1,        pll:            PLL_28,        tuner_type:     25,},{	name:		"Lifeview FlyVideo 98EZ (capture only) LR51",	video_inputs:	4,	audio_inputs:   0,	tuner:		-1,	svhs:		2,	muxsel:		{ 2, 3, 1, 1}, // AV1, AV2, SVHS, CVid adapter on SVHS	pll:		PLL_28,	no_msp34xx:	1,},{/* ---- card 0x48 ---------------------------------- */	/* Dariusz Kowalewski <darekk@automex.pl> */	name:		"Prolink Pixelview PV-BT878P+9B (PlayTV Pro rev.9B FM+NICAM)",	video_inputs:	3,	audio_inputs:	1,	tuner:		0,	svhs:		2,	gpiomask:	0x3f,	muxsel:		{ 2, 3, 0, 1 },	audiomux:	{ 0x01, 0x00, 0x03, 0x03, 0x09, 0x02 },	needs_tvaudio:  1,	no_msp34xx:	1,	no_tda9875:	1,	pll:		PLL_28,	tuner_type:	-1,	audio_hook:	pvbt878p9b_audio,	has_radio:	1,},{	/* Clay Kunz <ckunz@mail.arc.nasa.gov> */	/* you must jumper JP5 for the card to work */	name:           "Sensoray 311",	video_inputs:   5,	audio_inputs:   0,	tuner:          -1,	svhs:           4,	gpiomask:       0,	muxsel:         { 2, 3, 1, 0, 0},	audiomux:       { 0 },	needs_tvaudio:  0,	tuner_type:     -1,},{	/* Miguel Freitas <miguel@cetuc.puc-rio.br> */	name:           "RemoteVision MX (RV605)",	video_inputs:   16,	audio_inputs:   0,	tuner:          -1,	svhs:           -1,	gpiomask:       0x00,	gpiomask2:      0x07ff,	muxsel:         { 0x33, 0x13, 0x23, 0x43, 0xf3, 0x73, 0xe3, 0x03,			  0xd3, 0xb3, 0xc3, 0x63, 0x93, 0x53, 0x83, 0xa3 },	no_msp34xx:     1,	no_tda9875:     1,	tuner_type:     -1,	muxsel_hook:    rv605_muxsel,},{        name:           "Powercolor MTV878/ MTV878R/ MTV878F",        video_inputs:   3,        audio_inputs:   2, 	tuner:		0,        svhs:           2,        gpiomask:       0x1C800F,  // Bit0-2: Audio select, 8-12:remote control 14:remote valid 15:remote reset        muxsel:         { 2, 1, 1, },        audiomux:       { 0, 1, 2, 2, 4 },        needs_tvaudio:  0,        tuner_type:     TUNER_PHILIPS_PAL,	pll:		PLL_28,	has_radio:	1,},{/* ---- card 0x4c ---------------------------------- */        /* Masaki Suzuki <masaki@btree.org> */        name:           "Canopus WinDVR PCI (COMPAQ Presario 3524JP, 5112JP)",        video_inputs:   3,        audio_inputs:   1,        tuner:          0,        svhs:           2,        gpiomask:       0x140007,        muxsel:         { 2, 3, 1, 1 },        audiomux:       { 0, 1, 2, 3, 4, 0 },        tuner_type:     TUNER_PHILIPS_NTSC,        audio_hook:     windvr_audio,},{        name:           "GrandTec Multi Capture Card (Bt878)",        video_inputs:   4,        audio_inputs:   0,        tuner:          -1,        svhs:           -1,        gpiomask:       0,        muxsel:         { 2, 3, 1, 0 },        audiomux:       { 0 },        needs_tvaudio:  0,        no_msp34xx:     1,        pll:            PLL_28,        tuner_type:     -1,},{        name:           "Jetway TV/Capture JW-TV878-FBK, Kworld KW-TV878RF",        video_inputs:   4,        audio_inputs:   3,         tuner:          0,        svhs:           2,        gpiomask:       7,        muxsel:         { 2, 3, 1, 1 },   // Tuner, SVid, SVHS, SVid to SVHS connector        audiomux:       { 0 ,0 ,4, 4,4,4},// Yes, this tuner uses the same audio output for TV and FM radio!					  // This card lacks external Audio In, so we mute it on Ext. & Int.					  // The PCB can take a sbx1637/sbx1673, wiring unknown.					  // This card lacks PCI subsystem ID, sigh.					  // audiomux=1: lower volume, 2+3: mute					  // btwincap uses 0x80000/0x80003        needs_tvaudio:  0,        no_msp34xx:     1,        pll:            PLL_28,        tuner_type:     5, // Samsung TCPA9095PC27A (BG+DK), philips compatible, w/FM, stereo and			   // radio signal strength indicators work fine.	has_radio:		1,	/* GPIO Info:		GPIO0,1:   HEF4052 A0,A1		GPIO2:     HEF4052 nENABLE		GPIO3-7:   n.c.		GPIO8-13:  IRDC357 data0,5 (data6 n.c. ?) [chip not present on my card]		GPIO14,15: ??		GPIO16-21: n.c.		GPIO22,23: ??		??       : mtu8b56ep microcontroller for IR (GPIO wiring unknown)*/},{        /* Arthur Tetzlaff-Deas, DSP Design Ltd <software@dspdesign.com> */        name:           "DSP Design TCVIDEO",        video_inputs:   4,        svhs:           -1,        muxsel:         { 2, 3, 1, 0},        pll:            PLL_28,        tuner_type:     -1,},{        /* ---- card 0x50 ---------------------------------- */	name:           "Hauppauge WinTV PVR",        video_inputs:   4,        audio_inputs:   1,        tuner:          0,        svhs:           2,        muxsel:         { 2, 0, 1, 1},        needs_tvaudio:  1,        pll:            PLL_28,        tuner_type:     -1,	gpiomask:       7,	audiomux:       {7},}};const int bttv_num_tvcards = (sizeof(bttv_tvcards)/sizeof(struct tvcard));/* ----------------------------------------------------------------------- */static unsigned char eeprom_data[256];/* * identify card */void __devinit bttv_idcard(struct bttv *btv){	unsigned int gpiobits;	int i,type;	unsigned short tmp;	/* read PCI subsystem ID */	pci_read_config_word(btv->dev, PCI_SUBSYSTEM_ID, &tmp);	btv->cardid = tmp << 16;	pci_read_config_word(btv->dev, PCI_SUBSYSTEM_VENDOR_ID, &tmp);	btv->cardid |= tmp;	if (0 != btv->cardid && 0xffffffff != btv->cardid) {		/* look for the card */		for (type = -1, i = 0; cards[i].id != 0; i++)			if (cards[i].id  == btv->cardid)				type = i;				if (type != -1) {			/* found it */			printk(KERN_INFO "bttv%d: detected: %s [card=%d], "			       "PCI subsystem ID is %04x:%04x\n",			       btv->nr,cards[type].name,cards[type].cardnr,			       btv->cardid & 0xffff, btv->cardid >> 16);			btv->type = cards[type].cardnr;		} else {			/* 404 */			printk(KERN_INFO "bttv%d: subsystem: %04x:%04x (UNKNOWN)\n",			       btv->nr, btv->cardid&0xffff, btv->cardid>>16);			printk(KERN_DEBUG "please mail id, board name and "			       "the correct card= insmod option to kraxel@bytesex.org\n");		}	}	/* let the user override the autodetected type */	if (card[btv->nr] >= 0 && card[btv->nr] < bttv_num_tvcards)		btv->type=card[btv->nr];		/* print which card config we are using */	sprintf(btv->video_dev.name,"BT%d%s(%.23s)",		btv->id,		(btv->id==848 && btv->revision==0x12) ? "A" : "",		bttv_tvcards[btv->type].name);	printk(KERN_INFO "bttv%d: using: %s [card=%d,%s]\n",btv->nr,	       btv->video_dev.name,btv->type,	       (card[btv->nr] >= 0 && card[btv->nr] < bttv_num_tvcards) ?	       "insmod option" : "autodetected");	/* overwrite gpio stuff ?? */	if (-1 == audioall && -1 == audiomux[0])		return;	if (-1 != audiomux[0]) {		gpiobits = 0;		for (i = 0; i < 5; i++) {			bttv_tvcards[btv->type].audiomux[i] = audiomux[i];			gpiobits |= audiomux[i];		}	} else {		gpiobits = audioall;		for (i = 0; i < 5; i++) {			bttv_tvcards[btv->type].audiomux[i] = audioall;		}	}	bttv_tvcards[btv->type].gpiomask = (-1 != gpiomask) ? gpiomask : gpiobits;	printk(KERN_INFO "bttv%d: gpio config override: mask=0x%x, mux=",	       btv->nr,bttv_tvcards[btv->type].gpiomask);	for (i = 0; i < 5; i++) {		printk("%s0x%x", i ? "," : "", bttv_tvcards[btv->type].audiomux[i]);	}	printk("\n");}/* * (most) board specific initialisations goes here */static void flyvideo_gpio(struct bttv *btv){ 	int gpio,outbits,has_remote,has_radio,is_capture_only,is_lr90,has_tda9820_tda9821;	int tuner=-1,ttype;		outbits = btread(BT848_GPIO_OUT_EN);	btwrite(0x00, BT848_GPIO_OUT_EN);	udelay(8);  // without this we would see the 0x1800 mask	gpio=btread(BT848_GPIO_DATA);	btwrite(outbits, BT848_GPIO_OUT_EN);	// all cards provide GPIO info, some have an additional eeprom	// LR50: GPIO coding can be found lower right CP1 .. CP9	//       CP9=GPIO23 .. CP1=GPIO15; when OPEN, the corresponding GPIO reads 1.	//       GPIO14-12: n.c.	// LR90: GP9=GPIO23 .. GP1=GPIO15 (right above the bt878)		// lowest 3 bytes are remote control codes (no handshake needed)        // xxxFFF: No remote control chip soldered        // xxxF00(LR26/LR50), xxxFE0(LR90): Remote control chip (LVA001 or CF45) soldered 	// Note: Some bits are Audio_Mask !	ttype=(gpio&0x0f0000)>>16;	switch(ttype) {	case 0x0: tuner=4; // None		break;        case 0x2: tuner=39;// LG NTSC (newer TAPC series) TAPC-H701P		break;	case 0x4: tuner=5; // Philips PAL TPI8PSB02P, TPI8PSB12P, TPI8PSB12D or FI1216, FM1216		break;	case 0x6: tuner=37; // LG PAL (newer TAPC series) TAPC-G702P		break;	case 0xC: tuner=3; // Philips SECAM(+PAL) FQ1216ME or FI1216MF		break;	default:		printk(KERN_INFO "bttv%d: FlyVideo_gpio: unknown tuner type.\n", btv->nr);	}	has_remote          =   gpio & 0x800000;	has_radio	    =   gpio & 0x400000;	//   unknown                   0x200000;	//   unknown2                  0x100000;        is_capture_only     = !(gpio & 0x008000); //GPIO15	has_tda9820_tda9821 = !(gpio & 0x004000);	is_lr90             = !(gpio & 0x002000); // else LR26/LR50 (LR38/LR51 f. capture only)        //		        gpio & 0x001000 // output bit for audio routing

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -