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

📄 ivtv-cards.c

📁 linux内核源码
💻 C
📖 第 1 页 / 共 3 页
字号:
};static const struct ivtv_card ivtv_card_gotview_pci_dvd = {	.type = IVTV_CARD_GOTVIEW_PCI_DVD,	.name = "GotView PCI DVD",	.v4l2_capabilities = IVTV_CAP_ENCODER,	.hw_video = IVTV_HW_SAA717X,	.hw_audio = IVTV_HW_SAA717X,	.hw_audio_ctrl = IVTV_HW_SAA717X,	.hw_all = IVTV_HW_SAA717X | IVTV_HW_TUNER,	.video_inputs = {		{ IVTV_CARD_INPUT_VID_TUNER,  0, IVTV_SAA71XX_COMPOSITE1 },  /* pin 116 */		{ IVTV_CARD_INPUT_SVIDEO1,    1, IVTV_SAA71XX_SVIDEO0 },     /* pin 114/109 */		{ IVTV_CARD_INPUT_COMPOSITE1, 1, IVTV_SAA71XX_COMPOSITE3 },  /* pin 118 */	},	.audio_inputs = {		{ IVTV_CARD_INPUT_AUD_TUNER,  IVTV_SAA717X_IN0 },		{ IVTV_CARD_INPUT_LINE_IN1,   IVTV_SAA717X_IN2 },	},	.gpio_init = { .direction = 0xf000, .initial_value = 0xA000 },	.tuners = {		/* This card has a Philips FQ1216ME MK3 tuner */		{ .std = V4L2_STD_625_50, .tuner = TUNER_PHILIPS_FM1216ME_MK3 },	},	.pci_list = ivtv_pci_gotview_pci_dvd,};/* ------------------------------------------------------------------------- *//* GotVIEW PCI DVD2 Deluxe card */static const struct ivtv_card_pci_info ivtv_pci_gotview_pci_dvd2[] = {	{ PCI_DEVICE_ID_IVTV16, IVTV_PCI_ID_GOTVIEW1, 0x0600 },	{ 0, 0, 0 }};static const struct ivtv_card ivtv_card_gotview_pci_dvd2 = {	.type = IVTV_CARD_GOTVIEW_PCI_DVD2,	.name = "GotView PCI DVD2 Deluxe",	.v4l2_capabilities = IVTV_CAP_ENCODER,	.hw_video = IVTV_HW_CX25840,	.hw_audio = IVTV_HW_CX25840,	.hw_audio_ctrl = IVTV_HW_CX25840,	.hw_muxer = IVTV_HW_GPIO,	.hw_all = IVTV_HW_CX25840 | IVTV_HW_TUNER,	.video_inputs = {		{ IVTV_CARD_INPUT_VID_TUNER,  0, CX25840_COMPOSITE2 },		{ IVTV_CARD_INPUT_SVIDEO1,    1,		  CX25840_SVIDEO_LUMA3 | CX25840_SVIDEO_CHROMA4 },		{ IVTV_CARD_INPUT_COMPOSITE1, 1, CX25840_COMPOSITE1 },	},	.audio_inputs = {		{ IVTV_CARD_INPUT_AUD_TUNER,  CX25840_AUDIO5,       0 },		{ IVTV_CARD_INPUT_LINE_IN1,   CX25840_AUDIO_SERIAL, 1 },	},	.radio_input = { IVTV_CARD_INPUT_AUD_TUNER, CX25840_AUDIO_SERIAL, 2 },	.gpio_init = { .direction = 0x0800, .initial_value = 0 },	.gpio_audio_input  = { .mask = 0x0800, .tuner = 0, .linein = 0, .radio = 0x0800 },	.tuners = {		/* This card has a Philips FQ1216ME MK5 tuner */		{ .std = V4L2_STD_625_50, .tuner = TUNER_PHILIPS_FM1216ME_MK3 },	},	.pci_list = ivtv_pci_gotview_pci_dvd2,};/* ------------------------------------------------------------------------- *//* Yuan MPC622 miniPCI card */static const struct ivtv_card_pci_info ivtv_pci_yuan_mpc622[] = {	{ PCI_DEVICE_ID_IVTV16, IVTV_PCI_ID_YUAN2, 0xd998 },	{ 0, 0, 0 }};static const struct ivtv_card ivtv_card_yuan_mpc622 = {	.type = IVTV_CARD_YUAN_MPC622,	.name = "Yuan MPC622",	.v4l2_capabilities = IVTV_CAP_ENCODER,	.hw_video = IVTV_HW_CX25840,	.hw_audio = IVTV_HW_CX25840,	.hw_audio_ctrl = IVTV_HW_CX25840,	.hw_all = IVTV_HW_CX25840 | IVTV_HW_TUNER,	.video_inputs = {		{ IVTV_CARD_INPUT_VID_TUNER,  0, CX25840_COMPOSITE2 },		{ IVTV_CARD_INPUT_SVIDEO1,    1,		  CX25840_SVIDEO_LUMA3 | CX25840_SVIDEO_CHROMA4 },		{ IVTV_CARD_INPUT_COMPOSITE1, 1, CX25840_COMPOSITE1 },	},	.audio_inputs = {		{ IVTV_CARD_INPUT_AUD_TUNER,  CX25840_AUDIO5       },		{ IVTV_CARD_INPUT_LINE_IN1,   CX25840_AUDIO_SERIAL },	},	.gpio_init = { .direction = 0x00ff, .initial_value = 0x0002 },	.tuners = {		/* This card has the TDA8290/TDA8275 tuner chips */		{ .std = V4L2_STD_ALL, .tuner = TUNER_PHILIPS_TDA8290 },	},	.pci_list = ivtv_pci_yuan_mpc622,};/* ------------------------------------------------------------------------- *//* DIGITAL COWBOY DCT-MTVP1 card */static const struct ivtv_card_pci_info ivtv_pci_dctmvtvp1[] = {	{ PCI_DEVICE_ID_IVTV16, IVTV_PCI_ID_AVERMEDIA, 0xbfff },	{ 0, 0, 0 }};static const struct ivtv_card ivtv_card_dctmvtvp1 = {	.type = IVTV_CARD_DCTMTVP1,	.name = "Digital Cowboy DCT-MTVP1",	.v4l2_capabilities = IVTV_CAP_ENCODER,	.hw_video = IVTV_HW_SAA7115 | IVTV_HW_UPD64031A | IVTV_HW_UPD6408X |		IVTV_HW_GPIO,	.hw_audio = IVTV_HW_GPIO,	.hw_audio_ctrl = IVTV_HW_GPIO,	.hw_all = IVTV_HW_GPIO | IVTV_HW_SAA7115 | IVTV_HW_TUNER |		IVTV_HW_UPD64031A | IVTV_HW_UPD6408X,	.video_inputs = {		{ IVTV_CARD_INPUT_VID_TUNER,  0, IVTV_SAA71XX_SVIDEO0    },		{ IVTV_CARD_INPUT_SVIDEO1,    1, IVTV_SAA71XX_SVIDEO2    },		{ IVTV_CARD_INPUT_COMPOSITE1, 1, IVTV_SAA71XX_SVIDEO2 },	},	.audio_inputs = {		{ IVTV_CARD_INPUT_AUD_TUNER,  IVTV_GPIO_TUNER   },		{ IVTV_CARD_INPUT_LINE_IN1,   IVTV_GPIO_LINE_IN },	},	.gpio_init = { .direction = 0xe080, .initial_value = 0x8000 },	.gpio_audio_input  = { .mask = 0x8080, .tuner  = 0x8000, .linein = 0x0080 },	.gpio_audio_mute   = { .mask = 0x6000, .mute   = 0x6000 },	.gpio_audio_mode   = { .mask = 0x4300, .mono   = 0x4000, .stereo = 0x0200,			      .lang1 = 0x0300, .lang2  = 0x0000, .both   = 0x0200 },	.gpio_video_input  = { .mask = 0x0030, .tuner  = 0x0000,			       .composite = 0x0010, .svideo = 0x0020},	.tuners = {		{ .std = V4L2_STD_525_60, .tuner = TUNER_PHILIPS_FQ1286 },	},	.pci_list = ivtv_pci_dctmvtvp1,};/* ------------------------------------------------------------------------- *//* Yuan PG600-2/GotView PCI DVD Lite cards */static const struct ivtv_card_pci_info ivtv_pci_pg600v2[] = {	{ PCI_DEVICE_ID_IVTV16, IVTV_PCI_ID_YUAN3,     0x0600 },	{ PCI_DEVICE_ID_IVTV16, IVTV_PCI_ID_GOTVIEW2,  0x0600 },	{ 0, 0, 0 }};static const struct ivtv_card ivtv_card_pg600v2 = {	.type = IVTV_CARD_PG600V2,	.name = "Yuan PG600-2, GotView PCI DVD Lite",	.v4l2_capabilities = IVTV_CAP_ENCODER,	.hw_video = IVTV_HW_CX25840,	.hw_audio = IVTV_HW_CX25840,	.hw_audio_ctrl = IVTV_HW_CX25840,	.hw_all = IVTV_HW_CX25840 | IVTV_HW_TUNER,	.video_inputs = {		{ IVTV_CARD_INPUT_SVIDEO1,    0,		  CX25840_SVIDEO_LUMA3 | CX25840_SVIDEO_CHROMA4 },		{ IVTV_CARD_INPUT_COMPOSITE1, 0, CX25840_COMPOSITE1 },	},	.audio_inputs = {		{ IVTV_CARD_INPUT_LINE_IN1,   CX25840_AUDIO_SERIAL },	},	.tuners = {		{ .std = V4L2_STD_ALL, .tuner = TUNER_XCEIVE_XC3028 },	},	.pci_list = ivtv_pci_pg600v2,};/* ------------------------------------------------------------------------- *//* Club3D ZAP-TV1x01 cards */static const struct ivtv_card_pci_info ivtv_pci_club3d[] = {	{ PCI_DEVICE_ID_IVTV16, IVTV_PCI_ID_YUAN3,     0x0600 },	{ 0, 0, 0 }};static const struct ivtv_card ivtv_card_club3d = {	.type = IVTV_CARD_CLUB3D,	.name = "Club3D ZAP-TV1x01",	.v4l2_capabilities = IVTV_CAP_ENCODER,	.hw_video = IVTV_HW_CX25840,	.hw_audio = IVTV_HW_CX25840,	.hw_audio_ctrl = IVTV_HW_CX25840,	.hw_all = IVTV_HW_CX25840 | IVTV_HW_TUNER,	.video_inputs = {		{ IVTV_CARD_INPUT_SVIDEO1,    0,		  CX25840_SVIDEO_LUMA3 | CX25840_SVIDEO_CHROMA4 },		{ IVTV_CARD_INPUT_COMPOSITE1, 0, CX25840_COMPOSITE3 },	},	.audio_inputs = {		{ IVTV_CARD_INPUT_LINE_IN1,   CX25840_AUDIO_SERIAL },	},	.tuners = {		{ .std = V4L2_STD_ALL, .tuner = TUNER_XCEIVE_XC3028 },	},	.pci_list = ivtv_pci_club3d,};/* ------------------------------------------------------------------------- *//* AVerTV MCE 116 Plus (M116) card */static const struct ivtv_card_pci_info ivtv_pci_avertv_mce116[] = {	{ PCI_DEVICE_ID_IVTV16, IVTV_PCI_ID_AVERMEDIA, 0xc439 },	{ 0, 0, 0 }};static const struct ivtv_card ivtv_card_avertv_mce116 = {	.type = IVTV_CARD_AVERTV_MCE116,	.name = "AVerTV MCE 116 Plus",	.v4l2_capabilities = IVTV_CAP_ENCODER,	.hw_video = IVTV_HW_CX25840,	.hw_audio = IVTV_HW_CX25840,	.hw_audio_ctrl = IVTV_HW_CX25840,	.hw_all = IVTV_HW_CX25840 | IVTV_HW_TUNER | IVTV_HW_WM8739,	.video_inputs = {		{ IVTV_CARD_INPUT_SVIDEO1,    0, CX25840_SVIDEO3    },		{ IVTV_CARD_INPUT_COMPOSITE1, 0, CX25840_COMPOSITE1 },	},	.audio_inputs = {		{ IVTV_CARD_INPUT_LINE_IN1,   CX25840_AUDIO_SERIAL, 1 },	},	.gpio_init = { .direction = 0xe000, .initial_value = 0x4000 }, /* enable line-in */	.tuners = {		{ .std = V4L2_STD_ALL, .tuner = TUNER_XCEIVE_XC3028 },	},	.pci_list = ivtv_pci_avertv_mce116,};static const struct ivtv_card *ivtv_card_list[] = {	&ivtv_card_pvr250,	&ivtv_card_pvr350,	&ivtv_card_pvr150,	&ivtv_card_m179,	&ivtv_card_mpg600,	&ivtv_card_mpg160,	&ivtv_card_pg600,	&ivtv_card_avc2410,	&ivtv_card_avc2010,	&ivtv_card_tg5000tv,	&ivtv_card_va2000,	&ivtv_card_cx23416gyc,	&ivtv_card_gv_mvprx,	&ivtv_card_gv_mvprx2e,	&ivtv_card_gotview_pci_dvd,	&ivtv_card_gotview_pci_dvd2,	&ivtv_card_yuan_mpc622,	&ivtv_card_dctmvtvp1,	&ivtv_card_pg600v2,	&ivtv_card_club3d,	&ivtv_card_avertv_mce116,	/* Variations of standard cards but with the same PCI IDs.	   These cards must come last in this list. */	&ivtv_card_pvr350_v1,	&ivtv_card_cx23416gyc_nogr,	&ivtv_card_cx23416gyc_nogrycs,};const struct ivtv_card *ivtv_get_card(u16 index){	if (index >= ARRAY_SIZE(ivtv_card_list))		return NULL;	return ivtv_card_list[index];}int ivtv_get_input(struct ivtv *itv, u16 index, struct v4l2_input *input){	const struct ivtv_card_video_input *card_input = itv->card->video_inputs + index;	static const char * const input_strs[] = {		"Tuner 1",		"S-Video 1",		"S-Video 2",		"Composite 1",		"Composite 2",		"Composite 3"	};	memset(input, 0, sizeof(*input));	if (index >= itv->nof_inputs)		return -EINVAL;	input->index = index;	strcpy(input->name, input_strs[card_input->video_type - 1]);	input->type = (card_input->video_type == IVTV_CARD_INPUT_VID_TUNER ?			V4L2_INPUT_TYPE_TUNER : V4L2_INPUT_TYPE_CAMERA);	input->audioset = (1 << itv->nof_audio_inputs) - 1;	input->std = (input->type == V4L2_INPUT_TYPE_TUNER) ?				itv->tuner_std : V4L2_STD_ALL;	return 0;}int ivtv_get_output(struct ivtv *itv, u16 index, struct v4l2_output *output){	const struct ivtv_card_output *card_output = itv->card->video_outputs + index;	memset(output, 0, sizeof(*output));	if (index >= itv->card->nof_outputs)		return -EINVAL;	output->index = index;	strcpy(output->name, card_output->name);	output->type = V4L2_OUTPUT_TYPE_ANALOG;	output->audioset = 1;	output->std = V4L2_STD_ALL;	return 0;}int ivtv_get_audio_input(struct ivtv *itv, u16 index, struct v4l2_audio *audio){	const struct ivtv_card_audio_input *aud_input = itv->card->audio_inputs + index;	static const char * const input_strs[] = {		"Tuner 1",		"Line In 1",		"Line In 2"	};	memset(audio, 0, sizeof(*audio));	if (index >= itv->nof_audio_inputs)		return -EINVAL;	strcpy(audio->name, input_strs[aud_input->audio_type - 1]);	audio->index = index;	audio->capability = V4L2_AUDCAP_STEREO;	return 0;}int ivtv_get_audio_output(struct ivtv *itv, u16 index, struct v4l2_audioout *aud_output){	memset(aud_output, 0, sizeof(*aud_output));	if (itv->card->video_outputs == NULL || index != 0)		return -EINVAL;	strcpy(aud_output->name, "A/V Audio Out");	return 0;}

⌨️ 快捷键说明

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