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

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

?? cx24123.c

?? linux2.6.16版本
?? C
?? 第 1 頁 / 共 2 頁
字號:
/*    Conexant cx24123/cx24109 - DVB QPSK Satellite demod/tuner driver    Copyright (C) 2005 Steven Toth <stoth@hauppauge.com>    Support for KWorld DVB-S 100 by Vadim Catana <skystar@moldova.cc>    This program is free software; you can redistribute it and/or modify    it under the terms of the GNU General Public License as published by    the Free Software Foundation; either version 2 of the License, or    (at your option) any later version.    This program is distributed in the hope that it will be useful,    but WITHOUT ANY WARRANTY; without even the implied warranty of    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the    GNU General Public License for more details.    You should have received a copy of the GNU General Public License    along with this program; if not, write to the Free Software    Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.*/#include <linux/slab.h>#include <linux/kernel.h>#include <linux/module.h>#include <linux/moduleparam.h>#include <linux/init.h>#include "dvb_frontend.h"#include "cx24123.h"static int debug;#define dprintk(args...) \	do { \		if (debug) printk (KERN_DEBUG "cx24123: " args); \	} while (0)struct cx24123_state{	struct i2c_adapter* i2c;	struct dvb_frontend_ops ops;	const struct cx24123_config* config;	struct dvb_frontend frontend;	u32 lastber;	u16 snr;	u8  lnbreg;	/* Some PLL specifics for tuning */	u32 VCAarg;	u32 VGAarg;	u32 bandselectarg;	u32 pllarg;	/* The Demod/Tuner can't easily provide these, we cache them */	u32 currentfreq;	u32 currentsymbolrate;};/* Various tuner defaults need to be established for a given symbol rate Sps */static struct{	u32 symbolrate_low;	u32 symbolrate_high;	u32 VCAslope;	u32 VCAoffset;	u32 VGA1offset;	u32 VGA2offset;	u32 VCAprogdata;	u32 VGAprogdata;} cx24123_AGC_vals[] ={	{		.symbolrate_low		= 1000000,		.symbolrate_high	= 4999999,		.VCAslope		= 0x07,		.VCAoffset		= 0x0f,		.VGA1offset		= 0x1f8,		.VGA2offset		= 0x1f8,		.VGAprogdata		= (2 << 18) | (0x1f8 << 9) | 0x1f8,		.VCAprogdata		= (4 << 18) | (0x07 << 9) | 0x07,	},	{		.symbolrate_low		=  5000000,		.symbolrate_high	= 14999999,		.VCAslope		= 0x1f,		.VCAoffset		= 0x1f,		.VGA1offset		= 0x1e0,		.VGA2offset		= 0x180,		.VGAprogdata		= (2 << 18) | (0x180 << 9) | 0x1e0,		.VCAprogdata		= (4 << 18) | (0x07 << 9) | 0x1f,	},	{		.symbolrate_low		= 15000000,		.symbolrate_high	= 45000000,		.VCAslope		= 0x3f,		.VCAoffset		= 0x3f,		.VGA1offset		= 0x180,		.VGA2offset		= 0x100,		.VGAprogdata		= (2 << 18) | (0x100 << 9) | 0x180,		.VCAprogdata		= (4 << 18) | (0x07 << 9) | 0x3f,	},};/* * Various tuner defaults need to be established for a given frequency kHz. * fixme: The bounds on the bands do not match the doc in real life. * fixme: Some of them have been moved, other might need adjustment. */static struct{	u32 freq_low;	u32 freq_high;	u32 bandselect;	u32 VCOdivider;	u32 VCOnumber;	u32 progdata;} cx24123_bandselect_vals[] ={	{		.freq_low	= 950000,		.freq_high	= 1018999,		.bandselect	= 0x40,		.VCOdivider	= 4,		.VCOnumber	= 7,		.progdata	= (0 << 18) | (0 << 9) | 0x40,	},	{		.freq_low	= 1019000,		.freq_high	= 1074999,		.bandselect	= 0x80,		.VCOdivider	= 4,		.VCOnumber	= 8,		.progdata	= (0 << 18) | (0 << 9) | 0x80,	},	{		.freq_low	= 1075000,		.freq_high	= 1227999,		.bandselect	= 0x01,		.VCOdivider	= 2,		.VCOnumber	= 1,		.progdata	= (0 << 18) | (1 << 9) | 0x01,	},	{		.freq_low	= 1228000,		.freq_high	= 1349999,		.bandselect	= 0x02,		.VCOdivider	= 2,		.VCOnumber	= 2,		.progdata	= (0 << 18) | (1 << 9) | 0x02,	},	{		.freq_low	= 1350000,		.freq_high	= 1481999,		.bandselect	= 0x04,		.VCOdivider	= 2,		.VCOnumber	= 3,		.progdata	= (0 << 18) | (1 << 9) | 0x04,	},	{		.freq_low	= 1482000,		.freq_high	= 1595999,		.bandselect	= 0x08,		.VCOdivider	= 2,		.VCOnumber	= 4,		.progdata	= (0 << 18) | (1 << 9) | 0x08,	},	{		.freq_low	= 1596000,		.freq_high	= 1717999,		.bandselect	= 0x10,		.VCOdivider	= 2,		.VCOnumber	= 5,		.progdata	= (0 << 18) | (1 << 9) | 0x10,	},	{		.freq_low	= 1718000,		.freq_high	= 1855999,		.bandselect	= 0x20,		.VCOdivider	= 2,		.VCOnumber	= 6,		.progdata	= (0 << 18) | (1 << 9) | 0x20,	},	{		.freq_low	= 1856000,		.freq_high	= 2035999,		.bandselect	= 0x40,		.VCOdivider	= 2,		.VCOnumber	= 7,		.progdata	= (0 << 18) | (1 << 9) | 0x40,	},	{		.freq_low	= 2036000,		.freq_high	= 2149999,		.bandselect	= 0x80,		.VCOdivider	= 2,		.VCOnumber	= 8,		.progdata	= (0 << 18) | (1 << 9) | 0x80,	},};static struct {	u8 reg;	u8 data;} cx24123_regdata[] ={	{0x00, 0x03}, /* Reset system */	{0x00, 0x00}, /* Clear reset */	{0x01, 0x3b}, /* Apply sensible defaults, from an i2c sniffer */	{0x03, 0x07},	{0x04, 0x10},	{0x05, 0x04},	{0x06, 0x31},	{0x0d, 0x02},	{0x0e, 0x03},	{0x0f, 0xfe},	{0x10, 0x01},	{0x14, 0x01},	{0x15, 0x98},	{0x16, 0x00},	{0x17, 0x01},	{0x1b, 0x05},	{0x1c, 0x80},	{0x1d, 0x00},	{0x1e, 0x00},	{0x20, 0x41},	{0x21, 0x15},	{0x27, 0x14},	{0x28, 0x46},	{0x29, 0x00},	{0x2a, 0xb0},	{0x2b, 0x73},	{0x2c, 0x00},	{0x2d, 0x00},	{0x2e, 0x00},	{0x2f, 0x00},	{0x30, 0x00},	{0x31, 0x00},	{0x32, 0x8c},	{0x33, 0x00},	{0x34, 0x00},	{0x35, 0x03},	{0x36, 0x02},	{0x37, 0x3a},	{0x3a, 0x00},	/* Enable AGC accumulator */	{0x44, 0x00},	{0x45, 0x00},	{0x46, 0x05},	{0x56, 0x41},	{0x57, 0xff},	{0x67, 0x83},};static int cx24123_writereg(struct cx24123_state* state, int reg, int data){	u8 buf[] = { reg, data };	struct i2c_msg msg = { .addr = state->config->demod_address, .flags = 0, .buf = buf, .len = 2 };	int err;	if ((err = i2c_transfer(state->i2c, &msg, 1)) != 1) {		printk("%s: writereg error(err == %i, reg == 0x%02x,"			 " data == 0x%02x)\n", __FUNCTION__, err, reg, data);		return -EREMOTEIO;	}	return 0;}static int cx24123_writelnbreg(struct cx24123_state* state, int reg, int data){	u8 buf[] = { reg, data };	/* fixme: put the intersil addr int the config */	struct i2c_msg msg = { .addr = 0x08, .flags = 0, .buf = buf, .len = 2 };	int err;	if ((err = i2c_transfer(state->i2c, &msg, 1)) != 1) {		printk("%s: writelnbreg error (err == %i, reg == 0x%02x,"			 " data == 0x%02x)\n", __FUNCTION__, err, reg, data);		return -EREMOTEIO;	}	/* cache the write, no way to read back */	state->lnbreg = data;	return 0;}static int cx24123_readreg(struct cx24123_state* state, u8 reg){	int ret;	u8 b0[] = { reg };	u8 b1[] = { 0 };	struct i2c_msg msg[] = {		{ .addr = state->config->demod_address, .flags = 0, .buf = b0, .len = 1 },		{ .addr = state->config->demod_address, .flags = I2C_M_RD, .buf = b1, .len = 1 }	};	ret = i2c_transfer(state->i2c, msg, 2);	if (ret != 2) {		printk("%s: reg=0x%x (error=%d)\n", __FUNCTION__, reg, ret);		return ret;	}	return b1[0];}static int cx24123_readlnbreg(struct cx24123_state* state, u8 reg){	return state->lnbreg;}static int cx24123_set_inversion(struct cx24123_state* state, fe_spectral_inversion_t inversion){	switch (inversion) {	case INVERSION_OFF:		cx24123_writereg(state, 0x0e, cx24123_readreg(state, 0x0e) & 0x7f);		cx24123_writereg(state, 0x10, cx24123_readreg(state, 0x10) | 0x80);		break;	case INVERSION_ON:		cx24123_writereg(state, 0x0e, cx24123_readreg(state, 0x0e) | 0x80);		cx24123_writereg(state, 0x10, cx24123_readreg(state, 0x10) | 0x80);		break;	case INVERSION_AUTO:		cx24123_writereg(state, 0x10, cx24123_readreg(state, 0x10) & 0x7f);		break;	default:		return -EINVAL;	}	return 0;}static int cx24123_get_inversion(struct cx24123_state* state, fe_spectral_inversion_t *inversion){	u8 val;	val = cx24123_readreg(state, 0x1b) >> 7;	if (val == 0)		*inversion = INVERSION_OFF;	else		*inversion = INVERSION_ON;	return 0;}static int cx24123_set_fec(struct cx24123_state* state, fe_code_rate_t fec){	if ( (fec < FEC_NONE) || (fec > FEC_AUTO) )		fec = FEC_AUTO;	/* Hardware has 5/11 and 3/5 but are never unused */	switch (fec) {	case FEC_NONE:		return cx24123_writereg(state, 0x0f, 0x01);	case FEC_1_2:		return cx24123_writereg(state, 0x0f, 0x02);	case FEC_2_3:		return cx24123_writereg(state, 0x0f, 0x04);	case FEC_3_4:		return cx24123_writereg(state, 0x0f, 0x08);	case FEC_5_6:		return cx24123_writereg(state, 0x0f, 0x20);	case FEC_7_8:		return cx24123_writereg(state, 0x0f, 0x80);	case FEC_AUTO:		return cx24123_writereg(state, 0x0f, 0xae);	default:		return -EOPNOTSUPP;	}}static int cx24123_get_fec(struct cx24123_state* state, fe_code_rate_t *fec){	int ret;	u8 val;	ret = cx24123_readreg (state, 0x1b);	if (ret < 0)		return ret;	val = ret & 0x07;	switch (val) {	case 1:		*fec = FEC_1_2;		break;	case 3:		*fec = FEC_2_3;		break;	case 4:		*fec = FEC_3_4;		break;	case 5:		*fec = FEC_4_5;		break;	case 6:		*fec = FEC_5_6;		break;	case 7:		*fec = FEC_7_8;		break;	case 2:	/* *fec = FEC_3_5; break; */	case 0:	/* *fec = FEC_5_11; break; */		*fec = FEC_AUTO;		break;	default:		*fec = FEC_NONE; // can't happen	}	return 0;}/* fixme: Symbol rates < 3MSps may not work because of precision loss */static int cx24123_set_symbolrate(struct cx24123_state* state, u32 srate){	u32 val;	val = (srate / 1185) * 100;	/* Compensate for scaling up, by removing 17 symbols per 1Msps */	val = val - (17 * (srate / 1000000));	cx24123_writereg(state, 0x08, (val >> 16) & 0xff );	cx24123_writereg(state, 0x09, (val >>  8) & 0xff );	cx24123_writereg(state, 0x0a, (val      ) & 0xff );	return 0;}/* * Based on the required frequency and symbolrate, the tuner AGC has to be configured * and the correct band selected. Calculate those values */static int cx24123_pll_calculate(struct dvb_frontend* fe, struct dvb_frontend_parameters *p){	struct cx24123_state *state = fe->demodulator_priv;	u32 ndiv = 0, adiv = 0, vco_div = 0;	int i = 0;	/* Defaults for low freq, low rate */	state->VCAarg = cx24123_AGC_vals[0].VCAprogdata;	state->VGAarg = cx24123_AGC_vals[0].VGAprogdata;	state->bandselectarg = cx24123_bandselect_vals[0].progdata;	vco_div = cx24123_bandselect_vals[0].VCOdivider;

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
国产精品乱码一区二三区小蝌蚪| 欧美日韩aaa| 国产欧美精品一区二区色综合 | 菠萝蜜视频在线观看一区| 精品久久久久久综合日本欧美| 午夜精品久久久久影视| 欧美私模裸体表演在线观看| 国产欧美日韩精品一区| 国产精品18久久久久久久久久久久| 日韩午夜精品电影| 免费看日韩a级影片| 日韩色在线观看| 久久国产精品免费| 日韩av高清在线观看| 欧美日韩在线三区| 日韩精品视频网站| 欧美精品一区二区精品网| 久久精品久久精品| 久久久国际精品| 不卡一区在线观看| 伊人性伊人情综合网| 成人av在线一区二区三区| 亚洲欧洲精品一区二区精品久久久 | 亚洲资源在线观看| 欧美少妇xxx| 欧美aaa在线| 国产日产欧美一区二区三区| 99久久久国产精品| 亚洲视频在线一区二区| 欧美精品一卡两卡| 国产伦精一区二区三区| 亚洲日本va在线观看| 欧美日韩国产一级| 国产 欧美在线| 一区二区欧美精品| 精品久久久久久最新网址| 高清shemale亚洲人妖| 亚洲一区二区三区免费视频| 久久久久88色偷偷免费| 在线这里只有精品| 国模冰冰炮一区二区| 亚洲区小说区图片区qvod| 91精品国产欧美日韩| av一区二区三区四区| 日韩二区三区在线观看| 欧美国产精品中文字幕| 欧美性色aⅴ视频一区日韩精品| 国产一区二区三区电影在线观看 | 欧美熟乱第一页| 免费亚洲电影在线| 亚洲欧美一区二区不卡| 日韩女优av电影在线观看| 99久久99久久久精品齐齐| 一区二区三区精品在线观看| 久久久夜色精品亚洲| 日韩一级视频免费观看在线| 欧美自拍偷拍一区| 99国内精品久久| 国产精品一级黄| 国内精品久久久久影院一蜜桃| 水蜜桃久久夜色精品一区的特点| 中文字幕综合网| 国产香蕉久久精品综合网| 日韩精品一区二区三区在线| 欧美美女视频在线观看| 欧美三级乱人伦电影| 91国产精品成人| 在线亚洲一区二区| 91免费版在线| 日本伦理一区二区| 91在线视频免费观看| 丁香婷婷深情五月亚洲| 粉嫩aⅴ一区二区三区四区| 国产91在线观看丝袜| 国产精品综合二区| 国产成人免费av在线| 国产一二精品视频| 国产在线日韩欧美| 国产美女精品人人做人人爽| 韩日欧美一区二区三区| 国产精品中文欧美| 国产成人精品亚洲777人妖| 国产成人午夜精品影院观看视频 | 99久久婷婷国产| 91老师国产黑色丝袜在线| 91网站在线播放| 欧美色视频在线观看| 欧美精品aⅴ在线视频| 欧美一区三区四区| 久久综合久久鬼色| 国产精品拍天天在线| 亚洲精品成人在线| 天堂蜜桃91精品| 狠狠色2019综合网| eeuss鲁一区二区三区| 色94色欧美sute亚洲13| 正在播放亚洲一区| 2021久久国产精品不只是精品| 国产调教视频一区| 亚洲视频免费看| 日韩中文字幕不卡| 国产又粗又猛又爽又黄91精品| 成人网在线播放| 欧美丝袜丝交足nylons图片| 日韩精品一区二| 中文字幕 久热精品 视频在线 | 91色.com| 91.xcao| 国产日韩精品一区二区浪潮av| 专区另类欧美日韩| 蜜臀av性久久久久蜜臀aⅴ流畅| 国产在线不卡一卡二卡三卡四卡| 99久久精品国产麻豆演员表| 91精品福利在线一区二区三区| 欧美国产禁国产网站cc| 亚洲大片精品永久免费| 国产v综合v亚洲欧| 欧美精品一二三区| 国产精品无码永久免费888| 亚洲成人1区2区| 国产精品夜夜嗨| 6080国产精品一区二区| 中文一区一区三区高中清不卡| 亚洲国产aⅴ天堂久久| 国产精品亚洲一区二区三区妖精 | 欧美日韩一级黄| 久久精品亚洲精品国产欧美| 亚洲成人综合网站| 成人美女视频在线观看| 欧美一区二区三区喷汁尤物| 亚洲欧美一区二区三区极速播放 | 欧美国产精品中文字幕| 日韩精品欧美成人高清一区二区| 不卡的电影网站| 日韩免费视频一区二区| 一区二区三区电影在线播| 国产成人亚洲综合a∨婷婷| 欧美一区二区三区在线观看视频| 日韩美女久久久| 国产伦精品一区二区三区免费迷| 欧美日本精品一区二区三区| 国产精品久久久久久福利一牛影视| 日韩**一区毛片| 欧美怡红院视频| 国产精品久久久久影视| 国产精品一级片在线观看| 日韩片之四级片| 日本中文在线一区| 91福利国产成人精品照片| 亚洲欧洲一区二区三区| 国产aⅴ综合色| 久久色.com| 轻轻草成人在线| 欧美一级在线观看| 亚洲超碰精品一区二区| 欧美天天综合网| 亚洲影院理伦片| 欧美制服丝袜第一页| 亚洲男人的天堂在线aⅴ视频| 成人av在线看| 中文字幕欧美日本乱码一线二线| 国产精品亚洲一区二区三区妖精| 日韩美女视频在线| 久久99国内精品| 精品国产91洋老外米糕| 久久99国产精品久久| 精品处破学生在线二十三| 国内精品自线一区二区三区视频| 日韩视频一区二区在线观看| 美腿丝袜亚洲色图| 精品国产一区二区三区久久影院| 激情成人午夜视频| 久久久精品天堂| 大白屁股一区二区视频| 日本一区二区视频在线| 成人免费av在线| 亚洲女同一区二区| 欧美日韩视频在线观看一区二区三区 | 欧美日韩一区二区三区四区五区| 亚洲综合激情另类小说区| 欧美日韩国产片| 精品一区二区在线视频| 久久综合色综合88| 99久久精品国产一区二区三区| 一区二区欧美国产| 日韩欧美激情四射| 国产凹凸在线观看一区二区| 亚洲精品水蜜桃| 在线不卡免费欧美| 国产成人午夜视频| 一区二区三区中文字幕精品精品| 欧美日本国产一区| 国内久久精品视频| 亚洲美女视频在线| 欧美一级二级三级乱码| 国产91精品入口| 亚洲成人三级小说| 久久色.com| 精品视频色一区| 久久成人免费日本黄色|