亚洲欧美第一页_禁久久精品乱码_粉嫩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一区二区三区免费野_久草精品视频
久久免费美女视频| 欧美电视剧免费全集观看 | 久久综合成人精品亚洲另类欧美 | 一区精品在线播放| 日韩国产精品久久久| 成人开心网精品视频| 日韩视频免费观看高清完整版| 中文字幕精品一区| 日日摸夜夜添夜夜添亚洲女人| 成人国产免费视频| 国产亚洲欧美一区在线观看| 日日骚欧美日韩| 精品久久久影院| 亚洲线精品一区二区三区八戒| 国产精品996| 日韩三级av在线播放| 亚洲一区二区三区不卡国产欧美| 国产精品77777竹菊影视小说| 在线成人免费视频| 亚洲一区二区三区四区在线免费观看 | 亚洲国产美女搞黄色| 国内国产精品久久| 欧美一区二区三区电影| 亚洲一区二三区| 在线精品亚洲一区二区不卡| 1024成人网色www| 9久草视频在线视频精品| 欧美极品aⅴ影院| 国产精品1区2区3区| 国产午夜精品一区二区| 国产精品一区二区久久精品爱涩| 日韩欧美中文字幕精品| 免费人成黄页网站在线一区二区| 欧美精品第1页| 一区二区三区日韩欧美精品| 亚洲韩国一区二区三区| 久久人人97超碰com| 免费人成黄页网站在线一区二区| 欧美在线啊v一区| 亚洲国产精品天堂| 欧美人妖巨大在线| 青青草国产成人99久久| 国产精品久久久久久久久免费樱桃 | 久久网站最新地址| 国产成人在线视频网址| 中文字幕av一区 二区| 色综合色综合色综合色综合色综合| 亚洲欧洲精品一区二区精品久久久| 92精品国产成人观看免费| 亚洲国产欧美日韩另类综合| 这里只有精品99re| 国产精品99久久久久久宅男| 亚洲欧洲av在线| 欧美日韩久久不卡| 国产一区福利在线| 亚洲女同ⅹxx女同tv| 欧美精选在线播放| 国产老肥熟一区二区三区| 亚洲女同一区二区| 69堂成人精品免费视频| 国产精品一二三区| 亚洲综合免费观看高清完整版 | 91九色02白丝porn| 免费av网站大全久久| 国产免费成人在线视频| 91福利视频网站| 激情五月婷婷综合| 有坂深雪av一区二区精品| 日韩欧美在线1卡| 精品一区二区三区免费播放| 日韩精品中文字幕一区二区三区 | 国产麻豆9l精品三级站| 毛片一区二区三区| 国产精品卡一卡二| 678五月天丁香亚洲综合网| 成人福利视频网站| 日本不卡视频一二三区| 中文字幕亚洲区| 日韩一区二区三区视频在线| 成人av午夜电影| 久久国产视频网| 亚洲123区在线观看| 国产精品美女久久久久久久久| 91精品啪在线观看国产60岁| 91视频国产观看| 国产精品系列在线观看| 日本在线不卡视频| 亚洲一区二区3| 中文字幕一区二| 国产欧美一区二区三区网站| 91精品啪在线观看国产60岁| 色偷偷88欧美精品久久久| 国产精品系列在线播放| 精品亚洲免费视频| 香蕉成人伊视频在线观看| 亚洲欧洲一区二区在线播放| 国产色一区二区| 欧美大胆人体bbbb| 国产成人综合亚洲网站| 国产成人在线影院| 欧美国产日韩精品免费观看| 欧美sm极限捆绑bd| 欧美一区二区福利视频| 国产精品国产精品国产专区不片| 精品少妇一区二区三区在线播放 | 蜜臀av性久久久久蜜臀aⅴ| 一区二区成人在线观看| 亚洲免费在线电影| 综合激情成人伊人| 亚洲猫色日本管| 自拍偷拍国产精品| 亚洲人亚洲人成电影网站色| 国产精品色在线| 国产欧美综合在线| 中文字幕精品一区二区精品绿巨人| 精品久久人人做人人爰| 日韩欧美不卡在线观看视频| 欧美一级一级性生活免费录像| 91.成人天堂一区| 欧美一区二区三区公司| 日韩一级片网址| 久久综合久久综合九色| 欧美精品亚洲一区二区在线播放| 亚洲一区二区综合| 日本久久电影网| 欧美96一区二区免费视频| 中文字幕亚洲精品在线观看| 日韩一区二区免费视频| 在线视频一区二区三区| 国产成人精品免费在线| 日本三级亚洲精品| 亚洲成人免费视| 亚洲日本va在线观看| 欧美激情综合在线| 欧美精品一区二区在线播放| 制服丝袜亚洲色图| 欧美午夜精品一区| 91在线精品一区二区| 成人av集中营| 成人免费毛片片v| 成人一区二区三区在线观看| 国产一区二区在线免费观看| 免费看日韩a级影片| 日本麻豆一区二区三区视频| 欧美男生操女生| 欧美成人精品1314www| 欧美日韩一区二区三区在线 | 国产成人综合亚洲网站| 蜜臀av一区二区| 蜜桃视频一区二区三区在线观看| 亚洲大尺度视频在线观看| 亚洲午夜免费视频| 亚洲第一综合色| 天天色天天操综合| 久久99精品国产麻豆婷婷 | 国产精品影视天天线| 91极品美女在线| 精品国产污污免费网站入口| 欧美国产精品一区二区三区| 五月激情综合婷婷| 粉嫩绯色av一区二区在线观看| 欧美三级欧美一级| 国产精品电影一区二区| 精品一区二区三区在线播放视频| 99精品视频免费在线观看| 秋霞影院一区二区| 欧美日韩精品一区二区在线播放| 国产欧美一区二区精品性色| 午夜伊人狠狠久久| 欧美日韩精品三区| 精品亚洲porn| 精品一区二区三区久久| 欧美在线小视频| 中国av一区二区三区| 久久成人免费电影| 欧美揉bbbbb揉bbbbb| 国产精品久久毛片| 国产乱国产乱300精品| 欧美一区二区三区在线观看| 亚洲一区二区美女| 91在线视频在线| 国产精品福利电影一区二区三区四区| 麻豆精品在线观看| 91精品国产欧美一区二区18| 亚洲国产中文字幕在线视频综合| 93久久精品日日躁夜夜躁欧美| 久久九九99视频| 国产一区欧美二区| 精品国产凹凸成av人网站| 蜜桃久久精品一区二区| 666欧美在线视频| 天堂成人国产精品一区| 久久综合九色综合欧美亚洲| 欧美性猛交xxxx黑人交| 国产精品久久网站| 99久久99久久免费精品蜜臀| 国产精品久久久久久久久动漫| 成人少妇影院yyyy| 中文字幕欧美国产| 99re这里只有精品首页|