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

? 歡迎來(lái)到蟲(chóng)蟲(chóng)下載站! | ?? 資源下載 ?? 資源專輯 ?? 關(guān)于我們
? 蟲(chóng)蟲(chóng)下載站

?? cx24110.c

?? h內(nèi)核
?? C
?? 第 1 頁(yè) / 共 2 頁(yè)
字號(hào):
/*    cx24110 - Single Chip Satellite Channel Receiver driver module    Copyright (C) 2002 Peter Hettkamp <peter.hettkamp@t-online.de> based on    work    Copyright (C) 1999 Convergence Integrated Media GmbH <ralph@convergence.de>    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 "cx24110.h"struct cx24110_state {	struct i2c_adapter* i2c;	struct dvb_frontend_ops ops;	const struct cx24110_config* config;	struct dvb_frontend frontend;	u32 lastber;	u32 lastbler;	u32 lastesn0;};static int debug;#define dprintk(args...) \	do { \		if (debug) printk(KERN_DEBUG "cx24110: " args); \	} while (0)static struct {u8 reg; u8 data;} cx24110_regdata[]=                      /* Comments beginning with @ denote this value should                         be the default */        {{0x09,0x01}, /* SoftResetAll */         {0x09,0x00}, /* release reset */         {0x01,0xe8}, /* MSB of code rate 27.5MS/s */         {0x02,0x17}, /* middle byte " */         {0x03,0x29}, /* LSB         " */         {0x05,0x03}, /* @ DVB mode, standard code rate 3/4 */         {0x06,0xa5}, /* @ PLL 60MHz */         {0x07,0x01}, /* @ Fclk, i.e. sampling clock, 60MHz */         {0x0a,0x00}, /* @ partial chip disables, do not set */         {0x0b,0x01}, /* set output clock in gapped mode, start signal low                         active for first byte */         {0x0c,0x11}, /* no parity bytes, large hold time, serial data out */         {0x0d,0x6f}, /* @ RS Sync/Unsync thresholds */         {0x10,0x40}, /* chip doc is misleading here: write bit 6 as 1                         to avoid starting the BER counter. Reset the                         CRC test bit. Finite counting selected */         {0x15,0xff}, /* @ size of the limited time window for RS BER                         estimation. It is <value>*256 RS blocks, this                         gives approx. 2.6 sec at 27.5MS/s, rate 3/4 */         {0x16,0x00}, /* @ enable all RS output ports */         {0x17,0x04}, /* @ time window allowed for the RS to sync */         {0x18,0xae}, /* @ allow all standard DVB code rates to be scanned                         for automatically */                      /* leave the current code rate and normalization                         registers as they are after reset... */         {0x21,0x10}, /* @ during AutoAcq, search each viterbi setting                         only once */         {0x23,0x18}, /* @ size of the limited time window for Viterbi BER                         estimation. It is <value>*65536 channel bits, i.e.                         approx. 38ms at 27.5MS/s, rate 3/4 */         {0x24,0x24}, /* do not trigger Viterbi CRC test. Finite count window */                      /* leave front-end AGC parameters at default values */                      /* leave decimation AGC parameters at default values */         {0x35,0x40}, /* disable all interrupts. They are not connected anyway */         {0x36,0xff}, /* clear all interrupt pending flags */         {0x37,0x00}, /* @ fully enable AutoAcqq state machine */         {0x38,0x07}, /* @ enable fade recovery, but not autostart AutoAcq */                      /* leave the equalizer parameters on their default values */                      /* leave the final AGC parameters on their default values */         {0x41,0x00}, /* @ MSB of front-end derotator frequency */         {0x42,0x00}, /* @ middle bytes " */         {0x43,0x00}, /* @ LSB          " */                      /* leave the carrier tracking loop parameters on default */                      /* leave the bit timing loop parameters at gefault */         {0x56,0x4d}, /* set the filtune voltage to 2.7V, as recommended by */                      /* the cx24108 data sheet for symbol rates above 15MS/s */         {0x57,0x00}, /* @ Filter sigma delta enabled, positive */         {0x61,0x95}, /* GPIO pins 1-4 have special function */         {0x62,0x05}, /* GPIO pin 5 has special function, pin 6 is GPIO */         {0x63,0x00}, /* All GPIO pins use CMOS output characteristics */         {0x64,0x20}, /* GPIO 6 is input, all others are outputs */         {0x6d,0x30}, /* tuner auto mode clock freq 62kHz */         {0x70,0x15}, /* use auto mode, tuner word is 21 bits long */         {0x73,0x00}, /* @ disable several demod bypasses */         {0x74,0x00}, /* @  " */         {0x75,0x00}  /* @  " */                      /* the remaining registers are for SEC */	};static int cx24110_writereg (struct cx24110_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) {		dprintk ("%s: writereg error (err == %i, reg == 0x%02x,"			 " data == 0x%02x)\n", __FUNCTION__, err, reg, data);		return -EREMOTEIO;	}        return 0;}static int cx24110_readreg (struct cx24110_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) return ret;	return b1[0];}static int cx24110_set_inversion (struct cx24110_state* state, fe_spectral_inversion_t inversion){/* fixme (low): error handling */	switch (inversion) {	case INVERSION_OFF:                cx24110_writereg(state,0x37,cx24110_readreg(state,0x37)|0x1);                /* AcqSpectrInvDis on. No idea why someone should want this */                cx24110_writereg(state,0x5,cx24110_readreg(state,0x5)&0xf7);                /* Initial value 0 at start of acq */                cx24110_writereg(state,0x22,cx24110_readreg(state,0x22)&0xef);                /* current value 0 */                /* The cx24110 manual tells us this reg is read-only.                   But what the heck... set it ayways */                break;	case INVERSION_ON:                cx24110_writereg(state,0x37,cx24110_readreg(state,0x37)|0x1);                /* AcqSpectrInvDis on. No idea why someone should want this */                cx24110_writereg(state,0x5,cx24110_readreg(state,0x5)|0x08);                /* Initial value 1 at start of acq */                cx24110_writereg(state,0x22,cx24110_readreg(state,0x22)|0x10);                /* current value 1 */                break;	case INVERSION_AUTO:                cx24110_writereg(state,0x37,cx24110_readreg(state,0x37)&0xfe);                /* AcqSpectrInvDis off. Leave initial & current states as is */                break;	default:		return -EINVAL;	}	return 0;}static int cx24110_set_fec (struct cx24110_state* state, fe_code_rate_t fec){/* fixme (low): error handling */        static const int rate[]={-1,1,2,3,5,7,-1};        static const int g1[]={-1,0x01,0x02,0x05,0x15,0x45,-1};        static const int g2[]={-1,0x01,0x03,0x06,0x1a,0x7a,-1};        /* Well, the AutoAcq engine of the cx24106 and 24110 automatically           searches all enabled viterbi rates, and can handle non-standard           rates as well. */        if (fec>FEC_AUTO)                fec=FEC_AUTO;        if (fec==FEC_AUTO) { /* (re-)establish AutoAcq behaviour */		cx24110_writereg(state,0x37,cx24110_readreg(state,0x37)&0xdf);		/* clear AcqVitDis bit */		cx24110_writereg(state,0x18,0xae);		/* allow all DVB standard code rates */		cx24110_writereg(state,0x05,(cx24110_readreg(state,0x05)&0xf0)|0x3);		/* set nominal Viterbi rate 3/4 */		cx24110_writereg(state,0x22,(cx24110_readreg(state,0x22)&0xf0)|0x3);		/* set current Viterbi rate 3/4 */		cx24110_writereg(state,0x1a,0x05); cx24110_writereg(state,0x1b,0x06);		/* set the puncture registers for code rate 3/4 */		return 0;        } else {		cx24110_writereg(state,0x37,cx24110_readreg(state,0x37)|0x20);		/* set AcqVitDis bit */		if(rate[fec]>0) {			cx24110_writereg(state,0x05,(cx24110_readreg(state,0x05)&0xf0)|rate[fec]);			/* set nominal Viterbi rate */			cx24110_writereg(state,0x22,(cx24110_readreg(state,0x22)&0xf0)|rate[fec]);			/* set current Viterbi rate */			cx24110_writereg(state,0x1a,g1[fec]);			cx24110_writereg(state,0x1b,g2[fec]);			/* not sure if this is the right way: I always used AutoAcq mode */           } else		   return -EOPNOTSUPP;/* fixme (low): which is the correct return code? */        };	return 0;}static fe_code_rate_t cx24110_get_fec (struct cx24110_state* state){	int i;	i=cx24110_readreg(state,0x22)&0x0f;	if(!(i&0x08)) {		return FEC_1_2 + i - 1;	} else {/* fixme (low): a special code rate has been selected. In theory, we need to   return a denominator value, a numerator value, and a pair of puncture   maps to correctly describe this mode. But this should never happen in   practice, because it cannot be set by cx24110_get_fec. */	   return FEC_NONE;	}}static int cx24110_set_symbolrate (struct cx24110_state* state, u32 srate){/* fixme (low): add error handling */        u32 ratio;        u32 tmp, fclk, BDRI;        static const u32 bands[]={5000000UL,15000000UL,90999000UL/2};        int i;dprintk("cx24110 debug: entering %s(%d)\n",__FUNCTION__,srate);        if (srate>90999000UL/2)                srate=90999000UL/2;        if (srate<500000)                srate=500000;        for(i=0;(i<sizeof(bands)/sizeof(bands[0]))&&(srate>bands[i]);i++)		;        /* first, check which sample rate is appropriate: 45, 60 80 or 90 MHz,           and set the PLL accordingly (R07[1:0] Fclk, R06[7:4] PLLmult,           R06[3:0] PLLphaseDetGain */        tmp=cx24110_readreg(state,0x07)&0xfc;        if(srate<90999000UL/4) { /* sample rate 45MHz*/		cx24110_writereg(state,0x07,tmp);		cx24110_writereg(state,0x06,0x78);		fclk=90999000UL/2;        } else if(srate<60666000UL/2) { /* sample rate 60MHz */		cx24110_writereg(state,0x07,tmp|0x1);		cx24110_writereg(state,0x06,0xa5);		fclk=60666000UL;        } else if(srate<80888000UL/2) { /* sample rate 80MHz */		cx24110_writereg(state,0x07,tmp|0x2);		cx24110_writereg(state,0x06,0x87);		fclk=80888000UL;        } else { /* sample rate 90MHz */		cx24110_writereg(state,0x07,tmp|0x3);		cx24110_writereg(state,0x06,0x78);		fclk=90999000UL;        };        dprintk("cx24110 debug: fclk %d Hz\n",fclk);        /* we need to divide two integers with approx. 27 bits in 32 bit           arithmetic giving a 25 bit result */        /* the maximum dividend is 90999000/2, 0x02b6446c, this number is           also the most complex divisor. Hence, the dividend has,           assuming 32bit unsigned arithmetic, 6 clear bits on top, the           divisor 2 unused bits at the bottom. Also, the quotient is           always less than 1/2. Borrowed from VES1893.c, of course */        tmp=srate<<6;        BDRI=fclk>>2;        ratio=(tmp/BDRI);        tmp=(tmp%BDRI)<<8;        ratio=(ratio<<8)+(tmp/BDRI);        tmp=(tmp%BDRI)<<8;        ratio=(ratio<<8)+(tmp/BDRI);        tmp=(tmp%BDRI)<<1;        ratio=(ratio<<1)+(tmp/BDRI);        dprintk("srate= %d (range %d, up to %d)\n", srate,i,bands[i]);        dprintk("fclk = %d\n", fclk);        dprintk("ratio= %08x\n", ratio);        cx24110_writereg(state, 0x1, (ratio>>16)&0xff);        cx24110_writereg(state, 0x2, (ratio>>8)&0xff);        cx24110_writereg(state, 0x3, (ratio)&0xff);        return 0;}

?? 快捷鍵說(shuō)明

復(fù)制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號(hào) Ctrl + =
減小字號(hào) Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
在线91免费看| 中文字幕在线播放不卡一区| 日韩一区二区三区视频在线观看| 欧美日韩国产在线观看| 欧美日韩一区二区三区四区| 欧美日韩大陆一区二区| 91精品福利在线一区二区三区 | 久久嫩草精品久久久精品一| 久久夜色精品国产欧美乱极品| 久久久欧美精品sm网站| 国产精品丝袜在线| 亚洲女性喷水在线观看一区| 亚洲伊人伊色伊影伊综合网| 日韩精品三区四区| 香蕉久久夜色精品国产使用方法| 天天亚洲美女在线视频| 国产在线精品免费av| 国产不卡视频在线播放| 色婷婷久久久久swag精品 | 日韩一区日韩二区| 亚洲成人av一区二区| 日本不卡视频在线观看| 国产成人免费视频精品含羞草妖精| 99在线热播精品免费| 在线观看欧美黄色| 精品99一区二区三区| 国产精品久久久久桃色tv| 亚洲小说欧美激情另类| 看国产成人h片视频| 不卡视频一二三| 欧美精品视频www在线观看| 久久久影视传媒| 亚洲精品日韩综合观看成人91| 免费观看在线综合色| va亚洲va日韩不卡在线观看| 欧美日韩高清一区二区三区| 精品国产91亚洲一区二区三区婷婷| 国产精品久久久久影院色老大| 亚洲va国产va欧美va观看| 国内久久婷婷综合| 欧美最猛性xxxxx直播| 精品国产免费一区二区三区四区| 综合婷婷亚洲小说| 免费高清视频精品| 91免费精品国自产拍在线不卡| 7777女厕盗摄久久久| 国产精品短视频| 另类专区欧美蜜桃臀第一页| 99精品国产视频| 精品乱人伦一区二区三区| 亚洲欧美经典视频| 麻豆成人91精品二区三区| 91免费视频网址| 久久精品日产第一区二区三区高清版| 洋洋av久久久久久久一区| 色悠悠亚洲一区二区| 国产欧美久久久精品影院| 五月婷婷欧美视频| 97精品国产97久久久久久久久久久久 | 国产一区不卡在线| 欧美性生活久久| 国产精品视频yy9299一区| 美女脱光内衣内裤视频久久影院| aaa欧美大片| 久久久美女艺术照精彩视频福利播放| 亚洲影院在线观看| 99久免费精品视频在线观看| 久久亚洲精华国产精华液| 日本麻豆一区二区三区视频| 91九色最新地址| 久久久久99精品一区| 日本中文字幕一区二区视频| 成人黄色小视频在线观看| 欧美日韩精品是欧美日韩精品| 国产亚洲一本大道中文在线| 免费观看日韩av| 91精品黄色片免费大全| 亚洲色大成网站www久久九九| 激情久久五月天| 欧美人xxxx| 一区二区三区国产精华| 国产福利一区二区| 2023国产一二三区日本精品2022| 日日噜噜夜夜狠狠视频欧美人| 欧美主播一区二区三区美女| 日本一区二区三区视频视频| 国产麻豆9l精品三级站| 欧美日韩国产另类一区| 亚洲成av人**亚洲成av**| 在线精品亚洲一区二区不卡| 亚洲伦理在线精品| 91在线视频在线| 成人欧美一区二区三区黑人麻豆 | 成人免费看黄yyy456| 精品理论电影在线| 琪琪久久久久日韩精品| 欧美亚洲禁片免费| 亚洲一二三区在线观看| av中文一区二区三区| 久久精品欧美日韩精品| 久久99久久99| 欧美一级片免费看| 麻豆精品在线视频| 欧美福利视频一区| 亚洲成人你懂的| 欧美肥妇毛茸茸| 天天免费综合色| 欧美电影在线免费观看| 视频精品一区二区| 91.xcao| 激情六月婷婷综合| 国产精品看片你懂得| 99riav久久精品riav| 中文字幕在线观看一区| 99在线精品视频| 亚洲一二三四区| 欧美亚洲丝袜传媒另类| 一区二区三区四区蜜桃| 一本高清dvd不卡在线观看| 亚洲视频香蕉人妖| 欧美影院一区二区| 蜜臀99久久精品久久久久久软件| 91精品国产黑色紧身裤美女| 精品一区二区三区香蕉蜜桃| 久久日一线二线三线suv| 成人h动漫精品一区二| 亚洲久本草在线中文字幕| 欧美日韩精品一区二区在线播放| 日韩在线观看一区二区| 欧美精品一区二区蜜臀亚洲| 波多野结衣在线一区| 亚洲自拍偷拍图区| 精品成人免费观看| 99热99精品| 日韩一区欧美二区| 久久精品男人天堂av| 日本久久精品电影| 久久se精品一区精品二区| 最好看的中文字幕久久| 欧美一区二区在线不卡| 国产成人免费xxxxxxxx| 亚洲成人久久影院| 久久精品一区二区三区不卡牛牛| 一本大道久久a久久综合婷婷| 日本怡春院一区二区| 国产免费观看久久| 3d成人动漫网站| av一本久道久久综合久久鬼色| 亚洲欧美激情在线| 欧美一区二区三区播放老司机| 成人做爰69片免费看网站| 亚洲bt欧美bt精品777| 国产日韩av一区| 色婷婷av一区二区三区大白胸| 麻豆成人在线观看| 亚洲日本在线视频观看| 日韩欧美国产一区二区在线播放| 岛国精品在线观看| 午夜精品久久久久久久蜜桃app| 久久一区二区三区四区| 欧美日韩免费观看一区二区三区| 国产精品一区免费在线观看| 午夜一区二区三区在线观看| 国产日韩av一区二区| 欧美色国产精品| 不卡的电视剧免费网站有什么| 日本aⅴ亚洲精品中文乱码| 亚洲欧洲日韩女同| 欧美一区二区观看视频| 成人av高清在线| 国产在线一区观看| 日韩精品成人一区二区在线| 亚洲人成精品久久久久久| 久久久99免费| 欧美va亚洲va香蕉在线| 欧美亚洲禁片免费| 一本一道久久a久久精品综合蜜臀| 国产精品一区在线观看乱码 | 亚洲超碰精品一区二区| 精品88久久久久88久久久| 欧美色精品在线视频| 从欧美一区二区三区| 美女在线一区二区| 日韩毛片在线免费观看| 久久久久久麻豆| 日韩免费在线观看| 欧美日韩午夜在线视频| 99在线精品免费| 丁香一区二区三区| 日本欧美一区二区| 亚洲一区二区av在线| 有码一区二区三区| 国产精品久久久久久亚洲毛片| 日韩一区二区麻豆国产| 91麻豆精品国产自产在线| 精品视频在线看| 欧美日韩精品一区二区三区蜜桃| 一本久久综合亚洲鲁鲁五月天| 91免费观看国产| yourporn久久国产精品|