亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關于我們
? 蟲蟲下載站

?? budget-ci.c

?? linux 內核源代碼
?? C
?? 第 1 頁 / 共 3 頁
字號:
		}	} else {		// trigger on rising edge if a CAM is not present - when a CAM is inserted, we		// only want to get the IRQ when it sets READY. If we trigger on the falling edge,		// the CAM might not actually be ready yet.		saa7146_setgpio(saa, 0, SAA7146_GPIO_IRQHI);		// generate a CAM removal IRQ if we haven't already		if (budget_ci->slot_status & SLOTSTATUS_OCCUPIED) {			// CAM removal IRQ			budget_ci->slot_status = SLOTSTATUS_NONE;			dvb_ca_en50221_camchange_irq(&budget_ci->ca, 0,						     DVB_CA_EN50221_CAMCHANGE_REMOVED);		}	}}static int ciintf_poll_slot_status(struct dvb_ca_en50221 *ca, int slot, int open){	struct budget_ci *budget_ci = (struct budget_ci *) ca->data;	unsigned int flags;	// ensure we don't get spurious IRQs during initialisation	if (!budget_ci->budget.ci_present)		return -EINVAL;	// read the CAM status	flags = ttpci_budget_debiread(&budget_ci->budget, DEBICICTL, DEBIADDR_CICONTROL, 1, 1, 0);	if (flags & CICONTROL_CAMDETECT) {		// mark it as present if it wasn't before		if (budget_ci->slot_status & SLOTSTATUS_NONE) {			budget_ci->slot_status = SLOTSTATUS_PRESENT;		}		// during a RESET, we check if we can read from IO memory to see when CAM is ready		if (budget_ci->slot_status & SLOTSTATUS_RESET) {			if (ciintf_read_attribute_mem(ca, slot, 0) == 0x1d) {				budget_ci->slot_status = SLOTSTATUS_READY;			}		}	} else {		budget_ci->slot_status = SLOTSTATUS_NONE;	}	if (budget_ci->slot_status != SLOTSTATUS_NONE) {		if (budget_ci->slot_status & SLOTSTATUS_READY) {			return DVB_CA_EN50221_POLL_CAM_PRESENT | DVB_CA_EN50221_POLL_CAM_READY;		}		return DVB_CA_EN50221_POLL_CAM_PRESENT;	}	return 0;}static int ciintf_init(struct budget_ci *budget_ci){	struct saa7146_dev *saa = budget_ci->budget.dev;	int flags;	int result;	int ci_version;	int ca_flags;	memset(&budget_ci->ca, 0, sizeof(struct dvb_ca_en50221));	// enable DEBI pins	saa7146_write(saa, MC1, MASK_27 | MASK_11);	// test if it is there	ci_version = ttpci_budget_debiread(&budget_ci->budget, DEBICICTL, DEBIADDR_CIVERSION, 1, 1, 0);	if ((ci_version & 0xa0) != 0xa0) {		result = -ENODEV;		goto error;	}	// determine whether a CAM is present or not	flags = ttpci_budget_debiread(&budget_ci->budget, DEBICICTL, DEBIADDR_CICONTROL, 1, 1, 0);	budget_ci->slot_status = SLOTSTATUS_NONE;	if (flags & CICONTROL_CAMDETECT)		budget_ci->slot_status = SLOTSTATUS_PRESENT;	// version 0xa2 of the CI firmware doesn't generate interrupts	if (ci_version == 0xa2) {		ca_flags = 0;		budget_ci->ci_irq = 0;	} else {		ca_flags = DVB_CA_EN50221_FLAG_IRQ_CAMCHANGE |				DVB_CA_EN50221_FLAG_IRQ_FR |				DVB_CA_EN50221_FLAG_IRQ_DA;		budget_ci->ci_irq = 1;	}	// register CI interface	budget_ci->ca.owner = THIS_MODULE;	budget_ci->ca.read_attribute_mem = ciintf_read_attribute_mem;	budget_ci->ca.write_attribute_mem = ciintf_write_attribute_mem;	budget_ci->ca.read_cam_control = ciintf_read_cam_control;	budget_ci->ca.write_cam_control = ciintf_write_cam_control;	budget_ci->ca.slot_reset = ciintf_slot_reset;	budget_ci->ca.slot_shutdown = ciintf_slot_shutdown;	budget_ci->ca.slot_ts_enable = ciintf_slot_ts_enable;	budget_ci->ca.poll_slot_status = ciintf_poll_slot_status;	budget_ci->ca.data = budget_ci;	if ((result = dvb_ca_en50221_init(&budget_ci->budget.dvb_adapter,					  &budget_ci->ca,					  ca_flags, 1)) != 0) {		printk("budget_ci: CI interface detected, but initialisation failed.\n");		goto error;	}	// Setup CI slot IRQ	if (budget_ci->ci_irq) {		tasklet_init(&budget_ci->ciintf_irq_tasklet, ciintf_interrupt, (unsigned long) budget_ci);		if (budget_ci->slot_status != SLOTSTATUS_NONE) {			saa7146_setgpio(saa, 0, SAA7146_GPIO_IRQLO);		} else {			saa7146_setgpio(saa, 0, SAA7146_GPIO_IRQHI);		}		SAA7146_IER_ENABLE(saa, MASK_03);	}	// enable interface	ttpci_budget_debiwrite(&budget_ci->budget, DEBICICTL, DEBIADDR_CICONTROL, 1,			       CICONTROL_RESET, 1, 0);	// success!	printk("budget_ci: CI interface initialised\n");	budget_ci->budget.ci_present = 1;	// forge a fake CI IRQ so the CAM state is setup correctly	if (budget_ci->ci_irq) {		flags = DVB_CA_EN50221_CAMCHANGE_REMOVED;		if (budget_ci->slot_status != SLOTSTATUS_NONE)			flags = DVB_CA_EN50221_CAMCHANGE_INSERTED;		dvb_ca_en50221_camchange_irq(&budget_ci->ca, 0, flags);	}	return 0;error:	saa7146_write(saa, MC1, MASK_27);	return result;}static void ciintf_deinit(struct budget_ci *budget_ci){	struct saa7146_dev *saa = budget_ci->budget.dev;	// disable CI interrupts	if (budget_ci->ci_irq) {		SAA7146_IER_DISABLE(saa, MASK_03);		saa7146_setgpio(saa, 0, SAA7146_GPIO_INPUT);		tasklet_kill(&budget_ci->ciintf_irq_tasklet);	}	// reset interface	ttpci_budget_debiwrite(&budget_ci->budget, DEBICICTL, DEBIADDR_CICONTROL, 1, 0, 1, 0);	msleep(1);	ttpci_budget_debiwrite(&budget_ci->budget, DEBICICTL, DEBIADDR_CICONTROL, 1,			       CICONTROL_RESET, 1, 0);	// disable TS data stream to CI interface	saa7146_setgpio(saa, 1, SAA7146_GPIO_INPUT);	// release the CA device	dvb_ca_en50221_release(&budget_ci->ca);	// disable DEBI pins	saa7146_write(saa, MC1, MASK_27);}static void budget_ci_irq(struct saa7146_dev *dev, u32 * isr){	struct budget_ci *budget_ci = (struct budget_ci *) dev->ext_priv;	dprintk(8, "dev: %p, budget_ci: %p\n", dev, budget_ci);	if (*isr & MASK_06)		tasklet_schedule(&budget_ci->ir.msp430_irq_tasklet);	if (*isr & MASK_10)		ttpci_budget_irq10_handler(dev, isr);	if ((*isr & MASK_03) && (budget_ci->budget.ci_present) && (budget_ci->ci_irq))		tasklet_schedule(&budget_ci->ciintf_irq_tasklet);}static u8 philips_su1278_tt_inittab[] = {	0x01, 0x0f,	0x02, 0x30,	0x03, 0x00,	0x04, 0x5b,	0x05, 0x85,	0x06, 0x02,	0x07, 0x00,	0x08, 0x02,	0x09, 0x00,	0x0C, 0x01,	0x0D, 0x81,	0x0E, 0x44,	0x0f, 0x14,	0x10, 0x3c,	0x11, 0x84,	0x12, 0xda,	0x13, 0x97,	0x14, 0x95,	0x15, 0xc9,	0x16, 0x19,	0x17, 0x8c,	0x18, 0x59,	0x19, 0xf8,	0x1a, 0xfe,	0x1c, 0x7f,	0x1d, 0x00,	0x1e, 0x00,	0x1f, 0x50,	0x20, 0x00,	0x21, 0x00,	0x22, 0x00,	0x23, 0x00,	0x28, 0x00,	0x29, 0x28,	0x2a, 0x14,	0x2b, 0x0f,	0x2c, 0x09,	0x2d, 0x09,	0x31, 0x1f,	0x32, 0x19,	0x33, 0xfc,	0x34, 0x93,	0xff, 0xff};static int philips_su1278_tt_set_symbol_rate(struct dvb_frontend *fe, u32 srate, u32 ratio){	stv0299_writereg(fe, 0x0e, 0x44);	if (srate >= 10000000) {		stv0299_writereg(fe, 0x13, 0x97);		stv0299_writereg(fe, 0x14, 0x95);		stv0299_writereg(fe, 0x15, 0xc9);		stv0299_writereg(fe, 0x17, 0x8c);		stv0299_writereg(fe, 0x1a, 0xfe);		stv0299_writereg(fe, 0x1c, 0x7f);		stv0299_writereg(fe, 0x2d, 0x09);	} else {		stv0299_writereg(fe, 0x13, 0x99);		stv0299_writereg(fe, 0x14, 0x8d);		stv0299_writereg(fe, 0x15, 0xce);		stv0299_writereg(fe, 0x17, 0x43);		stv0299_writereg(fe, 0x1a, 0x1d);		stv0299_writereg(fe, 0x1c, 0x12);		stv0299_writereg(fe, 0x2d, 0x05);	}	stv0299_writereg(fe, 0x0e, 0x23);	stv0299_writereg(fe, 0x0f, 0x94);	stv0299_writereg(fe, 0x10, 0x39);	stv0299_writereg(fe, 0x15, 0xc9);	stv0299_writereg(fe, 0x1f, (ratio >> 16) & 0xff);	stv0299_writereg(fe, 0x20, (ratio >> 8) & 0xff);	stv0299_writereg(fe, 0x21, (ratio) & 0xf0);	return 0;}static int philips_su1278_tt_tuner_set_params(struct dvb_frontend *fe,					   struct dvb_frontend_parameters *params){	struct budget_ci *budget_ci = (struct budget_ci *) fe->dvb->priv;	u32 div;	u8 buf[4];	struct i2c_msg msg = {.addr = 0x60,.flags = 0,.buf = buf,.len = sizeof(buf) };	if ((params->frequency < 950000) || (params->frequency > 2150000))		return -EINVAL;	div = (params->frequency + (500 - 1)) / 500;	// round correctly	buf[0] = (div >> 8) & 0x7f;	buf[1] = div & 0xff;	buf[2] = 0x80 | ((div & 0x18000) >> 10) | 2;	buf[3] = 0x20;	if (params->u.qpsk.symbol_rate < 4000000)		buf[3] |= 1;	if (params->frequency < 1250000)		buf[3] |= 0;	else if (params->frequency < 1550000)		buf[3] |= 0x40;	else if (params->frequency < 2050000)		buf[3] |= 0x80;	else if (params->frequency < 2150000)		buf[3] |= 0xC0;	if (fe->ops.i2c_gate_ctrl)		fe->ops.i2c_gate_ctrl(fe, 1);	if (i2c_transfer(&budget_ci->budget.i2c_adap, &msg, 1) != 1)		return -EIO;	return 0;}static struct stv0299_config philips_su1278_tt_config = {	.demod_address = 0x68,	.inittab = philips_su1278_tt_inittab,	.mclk = 64000000UL,	.invert = 0,	.skip_reinit = 1,	.lock_output = STV0229_LOCKOUTPUT_1,	.volt13_op0_op1 = STV0299_VOLT13_OP1,	.min_delay_ms = 50,	.set_symbol_rate = philips_su1278_tt_set_symbol_rate,};static int philips_tdm1316l_tuner_init(struct dvb_frontend *fe){	struct budget_ci *budget_ci = (struct budget_ci *) fe->dvb->priv;	static u8 td1316_init[] = { 0x0b, 0xf5, 0x85, 0xab };	static u8 disable_mc44BC374c[] = { 0x1d, 0x74, 0xa0, 0x68 };	struct i2c_msg tuner_msg = {.addr = budget_ci->tuner_pll_address,.flags = 0,.buf = td1316_init,.len =			sizeof(td1316_init) };	// setup PLL configuration	if (fe->ops.i2c_gate_ctrl)		fe->ops.i2c_gate_ctrl(fe, 1);	if (i2c_transfer(&budget_ci->budget.i2c_adap, &tuner_msg, 1) != 1)		return -EIO;	msleep(1);	// disable the mc44BC374c (do not check for errors)	tuner_msg.addr = 0x65;	tuner_msg.buf = disable_mc44BC374c;	tuner_msg.len = sizeof(disable_mc44BC374c);	if (fe->ops.i2c_gate_ctrl)		fe->ops.i2c_gate_ctrl(fe, 1);	if (i2c_transfer(&budget_ci->budget.i2c_adap, &tuner_msg, 1) != 1) {		if (fe->ops.i2c_gate_ctrl)			fe->ops.i2c_gate_ctrl(fe, 1);		i2c_transfer(&budget_ci->budget.i2c_adap, &tuner_msg, 1);	}	return 0;}static int philips_tdm1316l_tuner_set_params(struct dvb_frontend *fe, struct dvb_frontend_parameters *params){	struct budget_ci *budget_ci = (struct budget_ci *) fe->dvb->priv;	u8 tuner_buf[4];	struct i2c_msg tuner_msg = {.addr = budget_ci->tuner_pll_address,.flags = 0,.buf = tuner_buf,.len = sizeof(tuner_buf) };	int tuner_frequency = 0;	u8 band, cp, filter;	// determine charge pump	tuner_frequency = params->frequency + 36130000;	if (tuner_frequency < 87000000)		return -EINVAL;	else if (tuner_frequency < 130000000)		cp = 3;	else if (tuner_frequency < 160000000)		cp = 5;	else if (tuner_frequency < 200000000)		cp = 6;	else if (tuner_frequency < 290000000)		cp = 3;	else if (tuner_frequency < 420000000)		cp = 5;	else if (tuner_frequency < 480000000)		cp = 6;	else if (tuner_frequency < 620000000)		cp = 3;	else if (tuner_frequency < 830000000)		cp = 5;	else if (tuner_frequency < 895000000)		cp = 7;	else		return -EINVAL;	// determine band	if (params->frequency < 49000000)		return -EINVAL;	else if (params->frequency < 159000000)		band = 1;	else if (params->frequency < 444000000)		band = 2;	else if (params->frequency < 861000000)		band = 4;	else		return -EINVAL;	// setup PLL filter and TDA9889	switch (params->u.ofdm.bandwidth) {	case BANDWIDTH_6_MHZ:		tda1004x_writereg(fe, 0x0C, 0x14);		filter = 0;		break;	case BANDWIDTH_7_MHZ:		tda1004x_writereg(fe, 0x0C, 0x80);		filter = 0;		break;	case BANDWIDTH_8_MHZ:		tda1004x_writereg(fe, 0x0C, 0x14);		filter = 1;		break;	default:		return -EINVAL;	}	// calculate divisor	// ((36130000+((1000000/6)/2)) + Finput)/(1000000/6)	tuner_frequency = (((params->frequency / 1000) * 6) + 217280) / 1000;	// setup tuner buffer	tuner_buf[0] = tuner_frequency >> 8;	tuner_buf[1] = tuner_frequency & 0xff;	tuner_buf[2] = 0xca;	tuner_buf[3] = (cp << 5) | (filter << 3) | band;

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
99久久婷婷国产| 天堂蜜桃91精品| 成人激情av网| 亚洲人妖av一区二区| 色综合一区二区| 五月激情综合色| 精品理论电影在线| 成人福利视频网站| 亚洲精品菠萝久久久久久久| 色综合久久精品| 青娱乐精品在线视频| 久久久久久久性| 在线亚洲一区观看| 麻豆成人久久精品二区三区小说| 久久综合久色欧美综合狠狠| 成人深夜福利app| 亚洲成人动漫在线观看| 久久在线观看免费| 91丨九色丨蝌蚪丨老版| 图片区小说区国产精品视频 | 欧美综合在线视频| 蜜桃视频在线一区| 国产精品理论片| 欧美精品一二三区| 成人在线一区二区三区| 亚洲小说欧美激情另类| 久久精品在这里| 欧美日韩在线播放三区| 国产福利91精品| 亚洲国产成人91porn| 久久久综合网站| 欧美日韩成人在线一区| 成人免费观看视频| 日韩av成人高清| 亚洲视频一区二区免费在线观看| 欧美美女一区二区三区| 成人动漫精品一区二区| 麻豆国产一区二区| 一区二区三区在线视频播放| 久久这里只有精品6| 欧美亚一区二区| 成人美女视频在线看| 免费成人在线观看视频| 亚洲激情男女视频| 欧美极品少妇xxxxⅹ高跟鞋 | 欧美日韩一区成人| 国产高清不卡一区二区| 偷拍亚洲欧洲综合| 亚洲欧美日韩中文字幕一区二区三区 | 在线精品视频免费观看| 国产成a人亚洲| 麻豆成人91精品二区三区| 亚洲蜜桃精久久久久久久| 亚洲国产精品精华液2区45| 精品日韩欧美在线| 在线播放中文一区| 欧美丝袜第三区| av资源网一区| 成人免费视频视频在线观看免费| 久久99精品久久只有精品| 丝袜a∨在线一区二区三区不卡| 亚洲丝袜精品丝袜在线| 欧美国产禁国产网站cc| 精品电影一区二区| 精品国产污网站| 欧美一级欧美三级在线观看| 欧美日韩一区中文字幕| 欧美亚洲一区二区在线观看| 色婷婷激情综合| 色综合色狠狠天天综合色| 91免费观看视频| 91在线视频观看| 99综合电影在线视频| 成人av在线播放网站| 懂色中文一区二区在线播放| 国产ts人妖一区二区| 国产黄色精品视频| 国产成人免费视频网站高清观看视频| 国产在线视频一区二区| 国产一区福利在线| 国产乱妇无码大片在线观看| 国产毛片精品一区| 粉嫩嫩av羞羞动漫久久久| 国产成人小视频| 成人黄色一级视频| 色噜噜狠狠成人网p站| 欧美网站一区二区| 欧美伦理视频网站| 日韩免费福利电影在线观看| 日韩无一区二区| 久久中文字幕电影| 国产精品伦理一区二区| 亚洲激情五月婷婷| 日韩激情一区二区| 久草这里只有精品视频| 福利电影一区二区三区| 91污在线观看| 欧美日韩国产首页在线观看| 日韩午夜电影在线观看| 国产喷白浆一区二区三区| 亚洲图片你懂的| 三级一区在线视频先锋| 国产一区二区三区香蕉| 91网址在线看| 日韩一区二区在线观看| 国产女人水真多18毛片18精品视频| 中文字幕一区二区三区乱码在线| 亚洲日韩欧美一区二区在线| 日韩精品欧美成人高清一区二区| 美腿丝袜亚洲综合| 成人动漫中文字幕| 欧美高清性hdvideosex| 久久综合给合久久狠狠狠97色69| 亚洲欧洲99久久| 日日夜夜免费精品视频| 国产乱码精品一区二区三| 91香蕉视频mp4| 精品免费国产一区二区三区四区| ...xxx性欧美| 蜜臀va亚洲va欧美va天堂| 在线综合视频播放| 精品国产一区二区三区不卡| 亚洲欧美综合色| 另类调教123区| 日本韩国一区二区| 久久一区二区三区国产精品| 亚洲精品老司机| 国产精品一二三区| 欧美日韩高清在线| 中文字幕一区二区三区在线播放 | 亚洲永久免费av| 狠狠色狠狠色综合| 欧美日韩国产成人在线免费| 国产日本一区二区| 日本三级亚洲精品| 欧美亚洲综合色| 综合电影一区二区三区| 国产美女一区二区| 欧美岛国在线观看| 亚洲一区二区三区四区在线| 成人免费毛片app| 久久婷婷国产综合国色天香| 亚洲成人资源网| 91国产福利在线| 亚洲欧洲另类国产综合| 国产精品一区久久久久| 91麻豆精品国产91久久久更新时间 | 成人手机电影网| 久久午夜电影网| 久久国产成人午夜av影院| 欧美日韩一级视频| 亚洲一级片在线观看| 色综合网色综合| 欧美激情一区在线| 国产成人夜色高潮福利影视| 精品国产欧美一区二区| 免费成人你懂的| 日韩一区二区免费电影| 青青草国产精品97视觉盛宴 | 99re视频精品| 中文字幕一区不卡| 不卡av电影在线播放| 欧美极品少妇xxxxⅹ高跟鞋| 国产激情91久久精品导航| 国产婷婷一区二区| 福利一区二区在线观看| 中文字幕电影一区| www.亚洲激情.com| 日韩毛片在线免费观看| 91蝌蚪porny九色| 亚洲精品国产一区二区三区四区在线| 91在线观看视频| 亚洲一区二区在线播放相泽 | 欧美一区二区美女| 免费观看成人av| 久久综合狠狠综合久久激情| 国产一区二区在线免费观看| 26uuu久久天堂性欧美| 国产一级精品在线| 国产精品久久网站| 色狠狠一区二区三区香蕉| 午夜免费欧美电影| 欧美成人aa大片| 国产成人鲁色资源国产91色综 | 色综合色综合色综合色综合色综合| 亚洲欧美在线另类| 欧美视频你懂的| 日本美女一区二区三区| 久久久久国产精品麻豆| 99re热这里只有精品免费视频| 亚洲欧洲制服丝袜| 欧美电影一区二区| 在线观看日韩电影| 欧美bbbbb| 国产精品无遮挡| 欧美色图天堂网| 韩国精品在线观看| 亚洲女人的天堂| 欧美一区二区三区喷汁尤物| 国内成人自拍视频|