Commit 9101e622 authored by Mauro Carvalho Chehab's avatar Mauro Carvalho Chehab Committed by Linus Torvalds

[PATCH] V4L/DVB: (3086a) Whitespaces cleanups part 1

Clean up whitespaces at v4l/dvb files
Signed-off-by: default avatarMauro Carvalho Chehab <mchehab@brturbo.com.br>
Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
parent 68352e6e
...@@ -132,7 +132,7 @@ int flexcop_eeprom_check_mac_addr(struct flexcop_device *fc, int extended); ...@@ -132,7 +132,7 @@ int flexcop_eeprom_check_mac_addr(struct flexcop_device *fc, int extended);
* I2C-channel of the flexcop. * I2C-channel of the flexcop.
*/ */
int flexcop_i2c_request(struct flexcop_device*, flexcop_access_op_t, int flexcop_i2c_request(struct flexcop_device*, flexcop_access_op_t,
flexcop_i2c_port_t, u8 chipaddr, u8 addr, u8 *buf, u16 len); flexcop_i2c_port_t, u8 chipaddr, u8 addr, u8 *buf, u16 len);
/* from flexcop-sram.c */ /* from flexcop-sram.c */
int flexcop_sram_set_dest(struct flexcop_device *fc, flexcop_sram_dest_t dest, flexcop_sram_dest_target_t target); int flexcop_sram_set_dest(struct flexcop_device *fc, flexcop_sram_dest_t dest, flexcop_sram_dest_target_t target);
......
...@@ -298,7 +298,7 @@ static int flexcop_fe_request_firmware(struct dvb_frontend* fe, const struct fir ...@@ -298,7 +298,7 @@ static int flexcop_fe_request_firmware(struct dvb_frontend* fe, const struct fir
} }
static int lgdt3303_pll_set(struct dvb_frontend* fe, static int lgdt3303_pll_set(struct dvb_frontend* fe,
struct dvb_frontend_parameters* params) struct dvb_frontend_parameters* params)
{ {
struct flexcop_device *fc = fe->dvb->priv; struct flexcop_device *fc = fe->dvb->priv;
u8 buf[4]; u8 buf[4];
...@@ -332,7 +332,7 @@ static int lgdt3303_pll_set(struct dvb_frontend* fe, ...@@ -332,7 +332,7 @@ static int lgdt3303_pll_set(struct dvb_frontend* fe,
return -EREMOTEIO; return -EREMOTEIO;
} }
return 0; return 0;
} }
static struct lgdt330x_config air2pc_atsc_hd5000_config = { static struct lgdt330x_config air2pc_atsc_hd5000_config = {
......
...@@ -556,9 +556,9 @@ static int tdvs_tua6034_pll_set(struct dvb_frontend* fe, struct dvb_frontend_par ...@@ -556,9 +556,9 @@ static int tdvs_tua6034_pll_set(struct dvb_frontend* fe, struct dvb_frontend_par
dprintk("%s: tuner at 0x%02x bytes: 0x%02x 0x%02x 0x%02x 0x%02x\n", dprintk("%s: tuner at 0x%02x bytes: 0x%02x 0x%02x 0x%02x 0x%02x\n",
__FUNCTION__, msg.addr, buf[0],buf[1],buf[2],buf[3]); __FUNCTION__, msg.addr, buf[0],buf[1],buf[2],buf[3]);
if ((err = i2c_transfer(card->i2c_adapter, &msg, 1)) != 1) { if ((err = i2c_transfer(card->i2c_adapter, &msg, 1)) != 1) {
printk(KERN_WARNING "dvb-bt8xx: %s error " printk(KERN_WARNING "dvb-bt8xx: %s error "
"(addr %02x <- %02x, err = %i)\n", "(addr %02x <- %02x, err = %i)\n",
__FUNCTION__, buf[0], buf[1], err); __FUNCTION__, buf[0], buf[1], err);
if (err < 0) if (err < 0)
return err; return err;
else else
......
...@@ -190,7 +190,7 @@ static int vp702x_fe_get_frontend(struct dvb_frontend* fe, ...@@ -190,7 +190,7 @@ static int vp702x_fe_get_frontend(struct dvb_frontend* fe,
} }
static int vp702x_fe_send_diseqc_msg (struct dvb_frontend* fe, static int vp702x_fe_send_diseqc_msg (struct dvb_frontend* fe,
struct dvb_diseqc_master_cmd *m) struct dvb_diseqc_master_cmd *m)
{ {
struct vp702x_fe_state *st = fe->demodulator_priv; struct vp702x_fe_state *st = fe->demodulator_priv;
u8 cmd[8],ibuf[10]; u8 cmd[8],ibuf[10];
......
...@@ -58,7 +58,7 @@ static int vp7045_fe_read_ber(struct dvb_frontend* fe, u32 *ber) ...@@ -58,7 +58,7 @@ static int vp7045_fe_read_ber(struct dvb_frontend* fe, u32 *ber)
struct vp7045_fe_state *state = fe->demodulator_priv; struct vp7045_fe_state *state = fe->demodulator_priv;
*ber = (vp7045_read_reg(state->d, 0x0D) << 16) | *ber = (vp7045_read_reg(state->d, 0x0D) << 16) |
(vp7045_read_reg(state->d, 0x0E) << 8) | (vp7045_read_reg(state->d, 0x0E) << 8) |
vp7045_read_reg(state->d, 0x0F); vp7045_read_reg(state->d, 0x0F);
return 0; return 0;
} }
......
...@@ -361,9 +361,9 @@ static int at76c651_read_ucblocks(struct dvb_frontend* fe, u32* ucblocks) ...@@ -361,9 +361,9 @@ static int at76c651_read_ucblocks(struct dvb_frontend* fe, u32* ucblocks)
static int at76c651_get_tune_settings(struct dvb_frontend* fe, struct dvb_frontend_tune_settings *fesettings) static int at76c651_get_tune_settings(struct dvb_frontend* fe, struct dvb_frontend_tune_settings *fesettings)
{ {
fesettings->min_delay_ms = 50; fesettings->min_delay_ms = 50;
fesettings->step_size = 0; fesettings->step_size = 0;
fesettings->max_drift = 0; fesettings->max_drift = 0;
return 0; return 0;
} }
......
...@@ -69,7 +69,7 @@ MODULE_PARM_DESC(debug, "set debugging level (1=info,2=i2c (|-able))."); ...@@ -69,7 +69,7 @@ MODULE_PARM_DESC(debug, "set debugging level (1=info,2=i2c (|-able)).");
#define dbufout(b,l,m) {\ #define dbufout(b,l,m) {\
int i; \ int i; \
for (i = 0; i < l; i++) \ for (i = 0; i < l; i++) \
m("%02x ",b[i]); \ m("%02x ",b[i]); \
} }
#define deb_info(args...) dprintk(0x01,args) #define deb_info(args...) dprintk(0x01,args)
#define deb_i2c(args...) dprintk(0x02,args) #define deb_i2c(args...) dprintk(0x02,args)
...@@ -827,7 +827,7 @@ static struct dvb_frontend_ops bcm3510_ops = { ...@@ -827,7 +827,7 @@ static struct dvb_frontend_ops bcm3510_ops = {
.type = FE_ATSC, .type = FE_ATSC,
.frequency_min = 54000000, .frequency_min = 54000000,
.frequency_max = 803000000, .frequency_max = 803000000,
/* stepsize is just a guess */ /* stepsize is just a guess */
.frequency_stepsize = 0, .frequency_stepsize = 0,
.caps = .caps =
FE_CAN_FEC_1_2 | FE_CAN_FEC_2_3 | FE_CAN_FEC_3_4 | FE_CAN_FEC_1_2 | FE_CAN_FEC_2_3 | FE_CAN_FEC_3_4 |
......
...@@ -355,10 +355,10 @@ static int cx22700_get_frontend(struct dvb_frontend* fe, struct dvb_frontend_par ...@@ -355,10 +355,10 @@ static int cx22700_get_frontend(struct dvb_frontend* fe, struct dvb_frontend_par
static int cx22700_get_tune_settings(struct dvb_frontend* fe, struct dvb_frontend_tune_settings* fesettings) static int cx22700_get_tune_settings(struct dvb_frontend* fe, struct dvb_frontend_tune_settings* fesettings)
{ {
fesettings->min_delay_ms = 150; fesettings->min_delay_ms = 150;
fesettings->step_size = 166667; fesettings->step_size = 166667;
fesettings->max_drift = 166667*2; fesettings->max_drift = 166667*2;
return 0; return 0;
} }
static void cx22700_release(struct dvb_frontend* fe) static void cx22700_release(struct dvb_frontend* fe)
...@@ -407,7 +407,7 @@ static struct dvb_frontend_ops cx22700_ops = { ...@@ -407,7 +407,7 @@ static struct dvb_frontend_ops cx22700_ops = {
.caps = FE_CAN_FEC_1_2 | FE_CAN_FEC_2_3 | FE_CAN_FEC_3_4 | .caps = FE_CAN_FEC_1_2 | FE_CAN_FEC_2_3 | FE_CAN_FEC_3_4 |
FE_CAN_FEC_5_6 | FE_CAN_FEC_7_8 | FE_CAN_FEC_AUTO | FE_CAN_FEC_5_6 | FE_CAN_FEC_7_8 | FE_CAN_FEC_AUTO |
FE_CAN_QPSK | FE_CAN_QAM_16 | FE_CAN_QAM_64 | FE_CAN_QPSK | FE_CAN_QAM_16 | FE_CAN_QAM_64 |
FE_CAN_RECOVER FE_CAN_RECOVER
}, },
.release = cx22700_release, .release = cx22700_release,
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
Conexant 22702 DVB OFDM demodulator driver Conexant 22702 DVB OFDM demodulator driver
based on: based on:
Alps TDMB7 DVB OFDM demodulator driver Alps TDMB7 DVB OFDM demodulator driver
Copyright (C) 2001-2002 Convergence Integrated Media GmbH Copyright (C) 2001-2002 Convergence Integrated Media GmbH
Holger Waechtler <holger@convergence.de> Holger Waechtler <holger@convergence.de>
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
Conexant 22702 DVB OFDM demodulator driver Conexant 22702 DVB OFDM demodulator driver
based on: based on:
Alps TDMB7 DVB OFDM demodulator driver Alps TDMB7 DVB OFDM demodulator driver
Copyright (C) 2001-2002 Convergence Integrated Media GmbH Copyright (C) 2001-2002 Convergence Integrated Media GmbH
Holger Waechtler <holger@convergence.de> Holger Waechtler <holger@convergence.de>
......
This diff is collapsed.
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
driver for LSI L64781 COFDM demodulator driver for LSI L64781 COFDM demodulator
Copyright (C) 2001 Holger Waechtler for Convergence Integrated Media GmbH Copyright (C) 2001 Holger Waechtler for Convergence Integrated Media GmbH
Marko Kohtala <marko.kohtala@luukku.com> Marko Kohtala <marko.kohtala@luukku.com>
This program is free software; you can redistribute it and/or modify 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 it under the terms of the GNU General Public License as published by
...@@ -433,7 +433,7 @@ static int l64781_init(struct dvb_frontend* fe) ...@@ -433,7 +433,7 @@ static int l64781_init(struct dvb_frontend* fe)
{ {
struct l64781_state* state = fe->demodulator_priv; struct l64781_state* state = fe->demodulator_priv;
reset_and_configure (state); reset_and_configure (state);
/* Power up */ /* Power up */
l64781_writereg (state, 0x3e, 0xa5); l64781_writereg (state, 0x3e, 0xa5);
...@@ -456,9 +456,9 @@ static int l64781_init(struct dvb_frontend* fe) ...@@ -456,9 +456,9 @@ static int l64781_init(struct dvb_frontend* fe)
l64781_writereg (state, 0x0d, 0x8c); l64781_writereg (state, 0x0d, 0x8c);
/* With ppm=8000, it seems the DTR_SENSITIVITY will result in /* With ppm=8000, it seems the DTR_SENSITIVITY will result in
value of 2 with all possible bandwidths and guard value of 2 with all possible bandwidths and guard
intervals, which is the initial value anyway. */ intervals, which is the initial value anyway. */
/*l64781_writereg (state, 0x19, 0x92);*/ /*l64781_writereg (state, 0x19, 0x92);*/
/* Everything is two's complement, soft bit and CSI_OUT too */ /* Everything is two's complement, soft bit and CSI_OUT too */
l64781_writereg (state, 0x1e, 0x09); l64781_writereg (state, 0x1e, 0x09);
...@@ -477,10 +477,10 @@ static int l64781_init(struct dvb_frontend* fe) ...@@ -477,10 +477,10 @@ static int l64781_init(struct dvb_frontend* fe)
static int l64781_get_tune_settings(struct dvb_frontend* fe, static int l64781_get_tune_settings(struct dvb_frontend* fe,
struct dvb_frontend_tune_settings* fesettings) struct dvb_frontend_tune_settings* fesettings)
{ {
fesettings->min_delay_ms = 4000; fesettings->min_delay_ms = 4000;
fesettings->step_size = 0; fesettings->step_size = 0;
fesettings->max_drift = 0; fesettings->max_drift = 0;
return 0; return 0;
} }
static void l64781_release(struct dvb_frontend* fe) static void l64781_release(struct dvb_frontend* fe)
...@@ -522,7 +522,7 @@ struct dvb_frontend* l64781_attach(const struct l64781_config* config, ...@@ -522,7 +522,7 @@ struct dvb_frontend* l64781_attach(const struct l64781_config* config,
/* The chip always responds to reads */ /* The chip always responds to reads */
if (i2c_transfer(state->i2c, msg, 2) != 2) { if (i2c_transfer(state->i2c, msg, 2) != 2) {
dprintk("No response to read on I2C bus\n"); dprintk("No response to read on I2C bus\n");
goto error; goto error;
} }
...@@ -531,7 +531,7 @@ struct dvb_frontend* l64781_attach(const struct l64781_config* config, ...@@ -531,7 +531,7 @@ struct dvb_frontend* l64781_attach(const struct l64781_config* config,
/* Reading the POWER_DOWN register always returns 0 */ /* Reading the POWER_DOWN register always returns 0 */
if (reg0x3e != 0) { if (reg0x3e != 0) {
dprintk("Device doesn't look like L64781\n"); dprintk("Device doesn't look like L64781\n");
goto error; goto error;
} }
...@@ -540,7 +540,7 @@ struct dvb_frontend* l64781_attach(const struct l64781_config* config, ...@@ -540,7 +540,7 @@ struct dvb_frontend* l64781_attach(const struct l64781_config* config,
/* Responds to all reads with 0 */ /* Responds to all reads with 0 */
if (l64781_readreg(state, 0x1a) != 0) { if (l64781_readreg(state, 0x1a) != 0) {
dprintk("Read 1 returned unexpcted value\n"); dprintk("Read 1 returned unexpcted value\n");
goto error; goto error;
} }
...@@ -549,7 +549,7 @@ struct dvb_frontend* l64781_attach(const struct l64781_config* config, ...@@ -549,7 +549,7 @@ struct dvb_frontend* l64781_attach(const struct l64781_config* config,
/* Responds with register default value */ /* Responds with register default value */
if (l64781_readreg(state, 0x1a) != 0xa1) { if (l64781_readreg(state, 0x1a) != 0xa1) {
dprintk("Read 2 returned unexpcted value\n"); dprintk("Read 2 returned unexpcted value\n");
goto error; goto error;
} }
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
driver for LSI L64781 COFDM demodulator driver for LSI L64781 COFDM demodulator
Copyright (C) 2001 Holger Waechtler for Convergence Integrated Media GmbH Copyright (C) 2001 Holger Waechtler for Convergence Integrated Media GmbH
Marko Kohtala <marko.kohtala@luukku.com> Marko Kohtala <marko.kohtala@luukku.com>
This program is free software; you can redistribute it and/or modify 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 it under the terms of the GNU General Public License as published by
......
...@@ -301,10 +301,10 @@ static int lgdt330x_set_parameters(struct dvb_frontend* fe, ...@@ -301,10 +301,10 @@ static int lgdt330x_set_parameters(struct dvb_frontend* fe,
static u8 lgdt3303_8vsb_44_data[] = { static u8 lgdt3303_8vsb_44_data[] = {
0x04, 0x00, 0x04, 0x00,
0x0d, 0x40, 0x0d, 0x40,
0x0e, 0x87, 0x0e, 0x87,
0x0f, 0x8e, 0x0f, 0x8e,
0x10, 0x01, 0x10, 0x01,
0x47, 0x8b }; 0x47, 0x8b };
/* /*
* Array of byte pairs <address, value> * Array of byte pairs <address, value>
......
...@@ -554,7 +554,7 @@ static int mt312_set_frontend(struct dvb_frontend* fe, ...@@ -554,7 +554,7 @@ static int mt312_set_frontend(struct dvb_frontend* fe,
if ((ret = mt312_write(state, SYM_RATE_H, buf, sizeof(buf))) < 0) if ((ret = mt312_write(state, SYM_RATE_H, buf, sizeof(buf))) < 0)
return ret; return ret;
mt312_reset(state, 0); mt312_reset(state, 0);
return 0; return 0;
} }
...@@ -695,7 +695,7 @@ static struct dvb_frontend_ops vp310_mt312_ops = { ...@@ -695,7 +695,7 @@ static struct dvb_frontend_ops vp310_mt312_ops = {
FE_CAN_FEC_1_2 | FE_CAN_FEC_2_3 | FE_CAN_FEC_1_2 | FE_CAN_FEC_2_3 |
FE_CAN_FEC_3_4 | FE_CAN_FEC_5_6 | FE_CAN_FEC_7_8 | FE_CAN_FEC_3_4 | FE_CAN_FEC_5_6 | FE_CAN_FEC_7_8 |
FE_CAN_FEC_AUTO | FE_CAN_QPSK | FE_CAN_MUTE_TS | FE_CAN_FEC_AUTO | FE_CAN_QPSK | FE_CAN_MUTE_TS |
FE_CAN_RECOVER FE_CAN_RECOVER
}, },
.release = mt312_release, .release = mt312_release,
......
...@@ -527,7 +527,7 @@ static int nxt2002_read_snr(struct dvb_frontend* fe, u16* snr) ...@@ -527,7 +527,7 @@ static int nxt2002_read_snr(struct dvb_frontend* fe, u16* snr)
else else
snrdb = 1000*0 + ( 1000*(12-0) * ( temp2 - 0 ) / ( 0x7C00 - 0 ) ); snrdb = 1000*0 + ( 1000*(12-0) * ( temp2 - 0 ) / ( 0x7C00 - 0 ) );
/* the value reported back from the frontend will be FFFF=32db 0000=0db */ /* the value reported back from the frontend will be FFFF=32db 0000=0db */
*snr = snrdb * (0xFFFF/32000); *snr = snrdb * (0xFFFF/32000);
...@@ -646,7 +646,7 @@ struct dvb_frontend* nxt2002_attach(const struct nxt2002_config* config, ...@@ -646,7 +646,7 @@ struct dvb_frontend* nxt2002_attach(const struct nxt2002_config* config,
memcpy(&state->ops, &nxt2002_ops, sizeof(struct dvb_frontend_ops)); memcpy(&state->ops, &nxt2002_ops, sizeof(struct dvb_frontend_ops));
state->initialised = 0; state->initialised = 0;
/* Check the first 5 registers to ensure this a revision we can handle */ /* Check the first 5 registers to ensure this a revision we can handle */
i2c_readbytes(state, 0x00, buf, 5); i2c_readbytes(state, 0x00, buf, 5);
if (buf[0] != 0x04) goto error; /* device id */ if (buf[0] != 0x04) goto error; /* device id */
...@@ -672,7 +672,7 @@ static struct dvb_frontend_ops nxt2002_ops = { ...@@ -672,7 +672,7 @@ static struct dvb_frontend_ops nxt2002_ops = {
.type = FE_ATSC, .type = FE_ATSC,
.frequency_min = 54000000, .frequency_min = 54000000,
.frequency_max = 860000000, .frequency_max = 860000000,
/* stepsize is just a guess */ /* stepsize is just a guess */
.frequency_stepsize = 166666, .frequency_stepsize = 166666,
.caps = FE_CAN_FEC_1_2 | FE_CAN_FEC_2_3 | FE_CAN_FEC_3_4 | .caps = FE_CAN_FEC_1_2 | FE_CAN_FEC_2_3 | FE_CAN_FEC_3_4 |
FE_CAN_FEC_5_6 | FE_CAN_FEC_7_8 | FE_CAN_FEC_AUTO | FE_CAN_FEC_5_6 | FE_CAN_FEC_7_8 | FE_CAN_FEC_AUTO |
......
...@@ -339,7 +339,7 @@ static int nxt200x_writetuner (struct nxt200x_state* state, u8* data) ...@@ -339,7 +339,7 @@ static int nxt200x_writetuner (struct nxt200x_state* state, u8* data)
switch (state->demod_chip) { switch (state->demod_chip) {
case NXT2004: case NXT2004:
if (i2c_writebytes(state, state->config->pll_address, data, 4)) if (i2c_writebytes(state, state->config->pll_address, data, 4))
printk(KERN_WARNING "nxt200x: error writing to tuner\n"); printk(KERN_WARNING "nxt200x: error writing to tuner\n");
/* wait until we have a lock */ /* wait until we have a lock */
while (count < 20) { while (count < 20) {
i2c_readbytes(state, state->config->pll_address, &buf, 1); i2c_readbytes(state, state->config->pll_address, &buf, 1);
...@@ -497,7 +497,7 @@ static int nxt2004_load_firmware (struct dvb_frontend* fe, const struct firmware ...@@ -497,7 +497,7 @@ static int nxt2004_load_firmware (struct dvb_frontend* fe, const struct firmware
/* calculate firmware CRC */ /* calculate firmware CRC */
for (position = 0; position < fw->size; position++) { for (position = 0; position < fw->size; position++) {
crc = nxt200x_crc(crc, fw->data[position]); crc = nxt200x_crc(crc, fw->data[position]);
} }
buf[0] = rambase >> 8; buf[0] = rambase >> 8;
......
...@@ -574,11 +574,11 @@ static struct dvb_frontend_ops nxt6000_ops = { ...@@ -574,11 +574,11 @@ static struct dvb_frontend_ops nxt6000_ops = {
.symbol_rate_max = 9360000, /* FIXME */ .symbol_rate_max = 9360000, /* FIXME */
.symbol_rate_tolerance = 4000, .symbol_rate_tolerance = 4000,
.caps = FE_CAN_FEC_1_2 | FE_CAN_FEC_2_3 | FE_CAN_FEC_3_4 | .caps = FE_CAN_FEC_1_2 | FE_CAN_FEC_2_3 | FE_CAN_FEC_3_4 |
FE_CAN_FEC_4_5 | FE_CAN_FEC_5_6 | FE_CAN_FEC_6_7 | FE_CAN_FEC_4_5 | FE_CAN_FEC_5_6 | FE_CAN_FEC_6_7 |
FE_CAN_FEC_7_8 | FE_CAN_FEC_8_9 | FE_CAN_FEC_AUTO | FE_CAN_FEC_7_8 | FE_CAN_FEC_8_9 | FE_CAN_FEC_AUTO |
FE_CAN_QAM_16 | FE_CAN_QAM_64 | FE_CAN_QAM_AUTO | FE_CAN_QAM_16 | FE_CAN_QAM_64 | FE_CAN_QAM_AUTO |
FE_CAN_TRANSMISSION_MODE_AUTO | FE_CAN_GUARD_INTERVAL_AUTO | FE_CAN_TRANSMISSION_MODE_AUTO | FE_CAN_GUARD_INTERVAL_AUTO |
FE_CAN_HIERARCHY_AUTO, FE_CAN_HIERARCHY_AUTO,
}, },
.release = nxt6000_release, .release = nxt6000_release,
......
...@@ -503,7 +503,7 @@ static int or51132_read_signal_strength(struct dvb_frontend* fe, u16* strength) ...@@ -503,7 +503,7 @@ static int or51132_read_signal_strength(struct dvb_frontend* fe, u16* strength)
rcvr_stat = rec_buf[1]; rcvr_stat = rec_buf[1];
usK = (rcvr_stat & 0x10) ? 3 : 0; usK = (rcvr_stat & 0x10) ? 3 : 0;
/* The value reported back from the frontend will be FFFF=100% 0000=0% */ /* The value reported back from the frontend will be FFFF=100% 0000=0% */
signal_strength = (((8952 - i20Log10(snr_equ) - usK*100)/3+5)*65535)/1000; signal_strength = (((8952 - i20Log10(snr_equ) - usK*100)/3+5)*65535)/1000;
if (signal_strength > 0xffff) if (signal_strength > 0xffff)
*strength = 0xffff; *strength = 0xffff;
......
...@@ -494,7 +494,7 @@ static int s5h1420_getfreqoffset(struct s5h1420_state* state) ...@@ -494,7 +494,7 @@ static int s5h1420_getfreqoffset(struct s5h1420_state* state)
} }
static void s5h1420_setfec_inversion(struct s5h1420_state* state, static void s5h1420_setfec_inversion(struct s5h1420_state* state,
struct dvb_frontend_parameters *p) struct dvb_frontend_parameters *p)
{ {
u8 inversion = 0; u8 inversion = 0;
...@@ -521,8 +521,8 @@ static void s5h1420_setfec_inversion(struct s5h1420_state* state, ...@@ -521,8 +521,8 @@ static void s5h1420_setfec_inversion(struct s5h1420_state* state,
case FEC_3_4: case FEC_3_4:
s5h1420_writereg(state, 0x30, 0x04); s5h1420_writereg(state, 0x30, 0x04);
s5h1420_writereg(state, 0x31, 0x12 | inversion); s5h1420_writereg(state, 0x31, 0x12 | inversion);
break; break;
case FEC_5_6: case FEC_5_6:
s5h1420_writereg(state, 0x30, 0x08); s5h1420_writereg(state, 0x30, 0x08);
......
...@@ -39,6 +39,6 @@ struct s5h1420_config ...@@ -39,6 +39,6 @@ struct s5h1420_config
}; };
extern struct dvb_frontend* s5h1420_attach(const struct s5h1420_config* config, extern struct dvb_frontend* s5h1420_attach(const struct s5h1420_config* config,
struct i2c_adapter* i2c); struct i2c_adapter* i2c);
#endif // S5H1420_H #endif // S5H1420_H
...@@ -67,16 +67,16 @@ static int debug; ...@@ -67,16 +67,16 @@ static int debug;
static int sp8870_writereg (struct sp8870_state* state, u16 reg, u16 data) static int sp8870_writereg (struct sp8870_state* state, u16 reg, u16 data)
{ {
u8 buf [] = { reg >> 8, reg & 0xff, data >> 8, data & 0xff }; u8 buf [] = { reg >> 8, reg & 0xff, data >> 8, data & 0xff };
struct i2c_msg msg = { .addr = state->config->demod_address, .flags = 0, .buf = buf, .len = 4 }; struct i2c_msg msg = { .addr = state->config->demod_address, .flags = 0, .buf = buf, .len = 4 };
int err; int err;
if ((err = i2c_transfer (state->i2c, &msg, 1)) != 1) { 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); dprintk ("%s: writereg error (err == %i, reg == 0x%02x, data == 0x%02x)\n", __FUNCTION__, err, reg, data);
return -EREMOTEIO; return -EREMOTEIO;
} }
return 0; return 0;
} }
static int sp8870_readreg (struct sp8870_state* state, u16 reg) static int sp8870_readreg (struct sp8870_state* state, u16 reg)
...@@ -305,7 +305,7 @@ static int sp8870_set_frontend_parameters (struct dvb_frontend* fe, ...@@ -305,7 +305,7 @@ static int sp8870_set_frontend_parameters (struct dvb_frontend* fe,
static int sp8870_init (struct dvb_frontend* fe) static int sp8870_init (struct dvb_frontend* fe)
{ {
struct sp8870_state* state = fe->demodulator_priv; struct sp8870_state* state = fe->demodulator_priv;
const struct firmware *fw = NULL; const struct firmware *fw = NULL;
sp8870_wake_up(state); sp8870_wake_up(state);
if (state->initialised) return 0; if (state->initialised) return 0;
...@@ -534,10 +534,10 @@ static int sp8870_sleep(struct dvb_frontend* fe) ...@@ -534,10 +534,10 @@ static int sp8870_sleep(struct dvb_frontend* fe)
static int sp8870_get_tune_settings(struct dvb_frontend* fe, struct dvb_frontend_tune_settings* fesettings) static int sp8870_get_tune_settings(struct dvb_frontend* fe, struct dvb_frontend_tune_settings* fesettings)
{ {
fesettings->min_delay_ms = 350; fesettings->min_delay_ms = 350;
fesettings->step_size = 0; fesettings->step_size = 0;
fesettings->max_drift = 0; fesettings->max_drift = 0;
return 0; return 0;
} }
static void sp8870_release(struct dvb_frontend* fe) static void sp8870_release(struct dvb_frontend* fe)
......
...@@ -80,7 +80,7 @@ static int sp887x_readreg (struct sp887x_state* state, u16 reg) ...@@ -80,7 +80,7 @@ static int sp887x_readreg (struct sp887x_state* state, u16 reg)
u8 b1 [2]; u8 b1 [2];
int ret; int ret;
struct i2c_msg msg[] = {{ .addr = state->config->demod_address, .flags = 0, .buf = b0, .len = 2 }, struct i2c_msg msg[] = {{ .addr = state->config->demod_address, .flags = 0, .buf = b0, .len = 2 },
{ .addr = state->config->demod_address, .flags = I2C_M_RD, .buf = b1, .len = 2 }}; { .addr = state->config->demod_address, .flags = I2C_M_RD, .buf = b1, .len = 2 }};
if ((ret = i2c_transfer(state->i2c, msg, 2)) != 2) { if ((ret = i2c_transfer(state->i2c, msg, 2)) != 2) {
printk("%s: readreg error (ret == %i)\n", __FUNCTION__, ret); printk("%s: readreg error (ret == %i)\n", __FUNCTION__, ret);
...@@ -498,7 +498,7 @@ static int sp887x_sleep(struct dvb_frontend* fe) ...@@ -498,7 +498,7 @@ static int sp887x_sleep(struct dvb_frontend* fe)
static int sp887x_init(struct dvb_frontend* fe) static int sp887x_init(struct dvb_frontend* fe)
{ {
struct sp887x_state* state = fe->demodulator_priv; struct sp887x_state* state = fe->demodulator_priv;
const struct firmware *fw = NULL; const struct firmware *fw = NULL;
int ret; int ret;
if (!state->initialised) { if (!state->initialised) {
...@@ -528,10 +528,10 @@ static int sp887x_init(struct dvb_frontend* fe) ...@@ -528,10 +528,10 @@ static int sp887x_init(struct dvb_frontend* fe)
static int sp887x_get_tune_settings(struct dvb_frontend* fe, struct dvb_frontend_tune_settings* fesettings) static int sp887x_get_tune_settings(struct dvb_frontend* fe, struct dvb_frontend_tune_settings* fesettings)
{ {
fesettings->min_delay_ms = 350; fesettings->min_delay_ms = 350;
fesettings->step_size = 166666*2; fesettings->step_size = 166666*2;
fesettings->max_drift = (166666*2)+1; fesettings->max_drift = (166666*2)+1;
return 0; return 0;
} }
static void sp887x_release(struct dvb_frontend* fe) static void sp887x_release(struct dvb_frontend* fe)
...@@ -581,7 +581,7 @@ static struct dvb_frontend_ops sp887x_ops = { ...@@ -581,7 +581,7 @@ static struct dvb_frontend_ops sp887x_ops = {
.caps = FE_CAN_FEC_1_2 | FE_CAN_FEC_2_3 | FE_CAN_FEC_3_4 | .caps = FE_CAN_FEC_1_2 | FE_CAN_FEC_2_3 | FE_CAN_FEC_3_4 |
FE_CAN_FEC_5_6 | FE_CAN_FEC_7_8 | FE_CAN_FEC_AUTO | FE_CAN_FEC_5_6 | FE_CAN_FEC_7_8 | FE_CAN_FEC_AUTO |
FE_CAN_QPSK | FE_CAN_QAM_16 | FE_CAN_QAM_64 | FE_CAN_QPSK | FE_CAN_QAM_16 | FE_CAN_QAM_64 |
FE_CAN_RECOVER FE_CAN_RECOVER
}, },
.release = sp887x_release, .release = sp887x_release,
......
...@@ -95,7 +95,7 @@ static int stv0299_writeregI (struct stv0299_state* state, u8 reg, u8 data) ...@@ -95,7 +95,7 @@ static int stv0299_writeregI (struct stv0299_state* state, u8 reg, u8 data)
int stv0299_writereg (struct dvb_frontend* fe, u8 reg, u8 data) int stv0299_writereg (struct dvb_frontend* fe, u8 reg, u8 data)
{ {
struct stv0299_state* state = fe->demodulator_priv; struct stv0299_state* state = fe->demodulator_priv;
return stv0299_writeregI(state, reg, data); return stv0299_writeregI(state, reg, data);
} }
...@@ -220,7 +220,7 @@ static int stv0299_wait_diseqc_idle (struct stv0299_state* state, int timeout) ...@@ -220,7 +220,7 @@ static int stv0299_wait_diseqc_idle (struct stv0299_state* state, int timeout)
static int stv0299_set_symbolrate (struct dvb_frontend* fe, u32 srate) static int stv0299_set_symbolrate (struct dvb_frontend* fe, u32 srate)
{ {
struct stv0299_state* state = fe->demodulator_priv; struct stv0299_state* state = fe->demodulator_priv;
u64 big = srate; u64 big = srate;
u32 ratio; u32 ratio;
...@@ -271,7 +271,7 @@ static int stv0299_get_symbolrate (struct stv0299_state* state) ...@@ -271,7 +271,7 @@ static int stv0299_get_symbolrate (struct stv0299_state* state)
static int stv0299_send_diseqc_msg (struct dvb_frontend* fe, static int stv0299_send_diseqc_msg (struct dvb_frontend* fe,
struct dvb_diseqc_master_cmd *m) struct dvb_diseqc_master_cmd *m)
{ {
struct stv0299_state* state = fe->demodulator_priv; struct stv0299_state* state = fe->demodulator_priv;
u8 val; u8 val;
int i; int i;
...@@ -301,7 +301,7 @@ static int stv0299_send_diseqc_msg (struct dvb_frontend* fe, ...@@ -301,7 +301,7 @@ static int stv0299_send_diseqc_msg (struct dvb_frontend* fe,
static int stv0299_send_diseqc_burst (struct dvb_frontend* fe, fe_sec_mini_cmd_t burst) static int stv0299_send_diseqc_burst (struct dvb_frontend* fe, fe_sec_mini_cmd_t burst)
{ {
struct stv0299_state* state = fe->demodulator_priv; struct stv0299_state* state = fe->demodulator_priv;
u8 val; u8 val;
dprintk ("%s\n", __FUNCTION__); dprintk ("%s\n", __FUNCTION__);
...@@ -328,7 +328,7 @@ static int stv0299_send_diseqc_burst (struct dvb_frontend* fe, fe_sec_mini_cmd_t ...@@ -328,7 +328,7 @@ static int stv0299_send_diseqc_burst (struct dvb_frontend* fe, fe_sec_mini_cmd_t
static int stv0299_set_tone (struct dvb_frontend* fe, fe_sec_tone_mode_t tone) static int stv0299_set_tone (struct dvb_frontend* fe, fe_sec_tone_mode_t tone)
{ {
struct stv0299_state* state = fe->demodulator_priv; struct stv0299_state* state = fe->demodulator_priv;
u8 val; u8 val;
if (stv0299_wait_diseqc_idle (state, 100) < 0) if (stv0299_wait_diseqc_idle (state, 100) < 0)
...@@ -350,7 +350,7 @@ static int stv0299_set_tone (struct dvb_frontend* fe, fe_sec_tone_mode_t tone) ...@@ -350,7 +350,7 @@ static int stv0299_set_tone (struct dvb_frontend* fe, fe_sec_tone_mode_t tone)
static int stv0299_set_voltage (struct dvb_frontend* fe, fe_sec_voltage_t voltage) static int stv0299_set_voltage (struct dvb_frontend* fe, fe_sec_voltage_t voltage)
{ {
struct stv0299_state* state = fe->demodulator_priv; struct stv0299_state* state = fe->demodulator_priv;
u8 reg0x08; u8 reg0x08;
u8 reg0x0c; u8 reg0x0c;
...@@ -442,7 +442,7 @@ static int stv0299_send_legacy_dish_cmd (struct dvb_frontend* fe, u32 cmd) ...@@ -442,7 +442,7 @@ static int stv0299_send_legacy_dish_cmd (struct dvb_frontend* fe, u32 cmd)
static int stv0299_init (struct dvb_frontend* fe) static int stv0299_init (struct dvb_frontend* fe)
{ {
struct stv0299_state* state = fe->demodulator_priv; struct stv0299_state* state = fe->demodulator_priv;
int i; int i;
dprintk("stv0299: init chip\n"); dprintk("stv0299: init chip\n");
...@@ -461,7 +461,7 @@ static int stv0299_init (struct dvb_frontend* fe) ...@@ -461,7 +461,7 @@ static int stv0299_init (struct dvb_frontend* fe)
static int stv0299_read_status(struct dvb_frontend* fe, fe_status_t* status) static int stv0299_read_status(struct dvb_frontend* fe, fe_status_t* status)
{ {
struct stv0299_state* state = fe->demodulator_priv; struct stv0299_state* state = fe->demodulator_priv;
u8 signal = 0xff - stv0299_readreg (state, 0x18); u8 signal = 0xff - stv0299_readreg (state, 0x18);
u8 sync = stv0299_readreg (state, 0x1b); u8 sync = stv0299_readreg (state, 0x1b);
...@@ -489,7 +489,7 @@ static int stv0299_read_status(struct dvb_frontend* fe, fe_status_t* status) ...@@ -489,7 +489,7 @@ static int stv0299_read_status(struct dvb_frontend* fe, fe_status_t* status)
static int stv0299_read_ber(struct dvb_frontend* fe, u32* ber) static int stv0299_read_ber(struct dvb_frontend* fe, u32* ber)
{ {
struct stv0299_state* state = fe->demodulator_priv; struct stv0299_state* state = fe->demodulator_priv;
if (state->errmode != STATUS_BER) return 0; if (state->errmode != STATUS_BER) return 0;
*ber = (stv0299_readreg (state, 0x1d) << 8) | stv0299_readreg (state, 0x1e); *ber = (stv0299_readreg (state, 0x1d) << 8) | stv0299_readreg (state, 0x1e);
...@@ -499,7 +499,7 @@ static int stv0299_read_ber(struct dvb_frontend* fe, u32* ber) ...@@ -499,7 +499,7 @@ static int stv0299_read_ber(struct dvb_frontend* fe, u32* ber)
static int stv0299_read_signal_strength(struct dvb_frontend* fe, u16* strength) static int stv0299_read_signal_strength(struct dvb_frontend* fe, u16* strength)
{ {
struct stv0299_state* state = fe->demodulator_priv; struct stv0299_state* state = fe->demodulator_priv;
s32 signal = 0xffff - ((stv0299_readreg (state, 0x18) << 8) s32 signal = 0xffff - ((stv0299_readreg (state, 0x18) << 8)
| stv0299_readreg (state, 0x19)); | stv0299_readreg (state, 0x19));
...@@ -516,7 +516,7 @@ static int stv0299_read_signal_strength(struct dvb_frontend* fe, u16* strength) ...@@ -516,7 +516,7 @@ static int stv0299_read_signal_strength(struct dvb_frontend* fe, u16* strength)
static int stv0299_read_snr(struct dvb_frontend* fe, u16* snr) static int stv0299_read_snr(struct dvb_frontend* fe, u16* snr)
{ {
struct stv0299_state* state = fe->demodulator_priv; struct stv0299_state* state = fe->demodulator_priv;
s32 xsnr = 0xffff - ((stv0299_readreg (state, 0x24) << 8) s32 xsnr = 0xffff - ((stv0299_readreg (state, 0x24) << 8)
| stv0299_readreg (state, 0x25)); | stv0299_readreg (state, 0x25));
...@@ -528,7 +528,7 @@ static int stv0299_read_snr(struct dvb_frontend* fe, u16* snr) ...@@ -528,7 +528,7 @@ static int stv0299_read_snr(struct dvb_frontend* fe, u16* snr)
static int stv0299_read_ucblocks(struct dvb_frontend* fe, u32* ucblocks) static int stv0299_read_ucblocks(struct dvb_frontend* fe, u32* ucblocks)
{ {
struct stv0299_state* state = fe->demodulator_priv; struct stv0299_state* state = fe->demodulator_priv;
if (state->errmode != STATUS_UCBLOCKS) *ucblocks = 0; if (state->errmode != STATUS_UCBLOCKS) *ucblocks = 0;
else *ucblocks = (stv0299_readreg (state, 0x1d) << 8) | stv0299_readreg (state, 0x1e); else *ucblocks = (stv0299_readreg (state, 0x1d) << 8) | stv0299_readreg (state, 0x1e);
...@@ -538,7 +538,7 @@ static int stv0299_read_ucblocks(struct dvb_frontend* fe, u32* ucblocks) ...@@ -538,7 +538,7 @@ static int stv0299_read_ucblocks(struct dvb_frontend* fe, u32* ucblocks)
static int stv0299_set_frontend(struct dvb_frontend* fe, struct dvb_frontend_parameters * p) static int stv0299_set_frontend(struct dvb_frontend* fe, struct dvb_frontend_parameters * p)
{ {
struct stv0299_state* state = fe->demodulator_priv; struct stv0299_state* state = fe->demodulator_priv;
int invval = 0; int invval = 0;
dprintk ("%s : FE_SET_FRONTEND\n", __FUNCTION__); dprintk ("%s : FE_SET_FRONTEND\n", __FUNCTION__);
...@@ -571,7 +571,7 @@ static int stv0299_set_frontend(struct dvb_frontend* fe, struct dvb_frontend_par ...@@ -571,7 +571,7 @@ static int stv0299_set_frontend(struct dvb_frontend* fe, struct dvb_frontend_par
static int stv0299_get_frontend(struct dvb_frontend* fe, struct dvb_frontend_parameters * p) static int stv0299_get_frontend(struct dvb_frontend* fe, struct dvb_frontend_parameters * p)
{ {
struct stv0299_state* state = fe->demodulator_priv; struct stv0299_state* state = fe->demodulator_priv;
s32 derot_freq; s32 derot_freq;
int invval; int invval;
...@@ -596,7 +596,7 @@ static int stv0299_get_frontend(struct dvb_frontend* fe, struct dvb_frontend_par ...@@ -596,7 +596,7 @@ static int stv0299_get_frontend(struct dvb_frontend* fe, struct dvb_frontend_par
static int stv0299_sleep(struct dvb_frontend* fe) static int stv0299_sleep(struct dvb_frontend* fe)
{ {
struct stv0299_state* state = fe->demodulator_priv; struct stv0299_state* state = fe->demodulator_priv;
stv0299_writeregI(state, 0x02, 0x80); stv0299_writeregI(state, 0x02, 0x80);
state->initialised = 0; state->initialised = 0;
...@@ -606,7 +606,7 @@ static int stv0299_sleep(struct dvb_frontend* fe) ...@@ -606,7 +606,7 @@ static int stv0299_sleep(struct dvb_frontend* fe)
static int stv0299_get_tune_settings(struct dvb_frontend* fe, struct dvb_frontend_tune_settings* fesettings) static int stv0299_get_tune_settings(struct dvb_frontend* fe, struct dvb_frontend_tune_settings* fesettings)
{ {
struct stv0299_state* state = fe->demodulator_priv; struct stv0299_state* state = fe->demodulator_priv;
fesettings->min_delay_ms = state->config->min_delay_ms; fesettings->min_delay_ms = state->config->min_delay_ms;
if (fesettings->parameters.u.qpsk.symbol_rate < 10000000) { if (fesettings->parameters.u.qpsk.symbol_rate < 10000000) {
...@@ -658,7 +658,7 @@ struct dvb_frontend* stv0299_attach(const struct stv0299_config* config, ...@@ -658,7 +658,7 @@ struct dvb_frontend* stv0299_attach(const struct stv0299_config* config,
/* create dvb_frontend */ /* create dvb_frontend */
state->frontend.ops = &state->ops; state->frontend.ops = &state->ops;
state->frontend.demodulator_priv = state; state->frontend.demodulator_priv = state;
return &state->frontend; return &state->frontend;
error: error:
...@@ -714,7 +714,7 @@ MODULE_PARM_DESC(debug, "Turn on/off frontend debugging (default:off)."); ...@@ -714,7 +714,7 @@ MODULE_PARM_DESC(debug, "Turn on/off frontend debugging (default:off).");
MODULE_DESCRIPTION("ST STV0299 DVB Demodulator driver"); MODULE_DESCRIPTION("ST STV0299 DVB Demodulator driver");
MODULE_AUTHOR("Ralph Metzler, Holger Waechtler, Peter Schildmann, Felix Domke, " MODULE_AUTHOR("Ralph Metzler, Holger Waechtler, Peter Schildmann, Felix Domke, "
"Andreas Oberritter, Andrew de Quincey, Kenneth Aafly"); "Andreas Oberritter, Andrew de Quincey, Kenneth Aafly");
MODULE_LICENSE("GPL"); MODULE_LICENSE("GPL");
EXPORT_SYMBOL(stv0299_writereg); EXPORT_SYMBOL(stv0299_writereg);
......
/* /*
TDA10021 - Single Chip Cable Channel Receiver driver module TDA10021 - Single Chip Cable Channel Receiver driver module
used on the the Siemens DVB-C cards used on the the Siemens DVB-C cards
Copyright (C) 1999 Convergence Integrated Media GmbH <ralph@convergence.de> Copyright (C) 1999 Convergence Integrated Media GmbH <ralph@convergence.de>
Copyright (C) 2004 Markus Schulz <msc@antzsystem.de> Copyright (C) 2004 Markus Schulz <msc@antzsystem.de>
Support for TDA10021 Support for TDA10021
This program is free software; you can redistribute it and/or modify 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 it under the terms of the GNU General Public License as published by
...@@ -76,9 +76,9 @@ static u8 tda10021_inittab[0x40]= ...@@ -76,9 +76,9 @@ static u8 tda10021_inittab[0x40]=
static int tda10021_writereg (struct tda10021_state* state, u8 reg, u8 data) static int tda10021_writereg (struct tda10021_state* state, u8 reg, u8 data)
{ {
u8 buf[] = { reg, data }; u8 buf[] = { reg, data };
struct i2c_msg msg = { .addr = state->config->demod_address, .flags = 0, .buf = buf, .len = 2 }; struct i2c_msg msg = { .addr = state->config->demod_address, .flags = 0, .buf = buf, .len = 2 };
int ret; int ret;
ret = i2c_transfer (state->i2c, &msg, 1); ret = i2c_transfer (state->i2c, &msg, 1);
if (ret != 1) if (ret != 1)
...@@ -95,7 +95,7 @@ static u8 tda10021_readreg (struct tda10021_state* state, u8 reg) ...@@ -95,7 +95,7 @@ static u8 tda10021_readreg (struct tda10021_state* state, u8 reg)
u8 b0 [] = { reg }; u8 b0 [] = { reg };
u8 b1 [] = { 0 }; u8 b1 [] = { 0 };
struct i2c_msg msg [] = { { .addr = state->config->demod_address, .flags = 0, .buf = b0, .len = 1 }, 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 } }; { .addr = state->config->demod_address, .flags = I2C_M_RD, .buf = b1, .len = 1 } };
int ret; int ret;
ret = i2c_transfer (state->i2c, msg, 2); ret = i2c_transfer (state->i2c, msg, 2);
......
/* /*
TDA10021 - Single Chip Cable Channel Receiver driver module TDA10021 - Single Chip Cable Channel Receiver driver module
used on the the Siemens DVB-C cards used on the the Siemens DVB-C cards
Copyright (C) 1999 Convergence Integrated Media GmbH <ralph@convergence.de> Copyright (C) 1999 Convergence Integrated Media GmbH <ralph@convergence.de>
Copyright (C) 2004 Markus Schulz <msc@antzsystem.de> Copyright (C) 2004 Markus Schulz <msc@antzsystem.de>
Support for TDA10021 Support for TDA10021
This program is free software; you can redistribute it and/or modify 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 it under the terms of the GNU General Public License as published by
......
...@@ -475,7 +475,7 @@ static int tda10046_fwupload(struct dvb_frontend* fe) ...@@ -475,7 +475,7 @@ static int tda10046_fwupload(struct dvb_frontend* fe)
ret = state->config->request_firmware(fe, &fw, TDA10046_DEFAULT_FIRMWARE); ret = state->config->request_firmware(fe, &fw, TDA10046_DEFAULT_FIRMWARE);
if (ret) { if (ret) {
printk(KERN_ERR "tda1004x: no firmware upload (timeout or file not found?)\n"); printk(KERN_ERR "tda1004x: no firmware upload (timeout or file not found?)\n");
return ret; return ret;
} }
tda1004x_write_mask(state, TDA1004X_CONFC4, 8, 8); // going to boot from HOST tda1004x_write_mask(state, TDA1004X_CONFC4, 8, 8); // going to boot from HOST
ret = tda1004x_do_upload(state, fw->data, fw->size, TDA10046H_CODE_CPT, TDA10046H_CODE_IN); ret = tda1004x_do_upload(state, fw->data, fw->size, TDA10046H_CODE_CPT, TDA10046H_CODE_IN);
......
...@@ -66,13 +66,13 @@ static int tda8083_writereg (struct tda8083_state* state, u8 reg, u8 data) ...@@ -66,13 +66,13 @@ static int tda8083_writereg (struct tda8083_state* state, u8 reg, u8 data)
u8 buf [] = { reg, data }; u8 buf [] = { reg, data };
struct i2c_msg msg = { .addr = state->config->demod_address, .flags = 0, .buf = buf, .len = 2 }; struct i2c_msg msg = { .addr = state->config->demod_address, .flags = 0, .buf = buf, .len = 2 };
ret = i2c_transfer(state->i2c, &msg, 1); ret = i2c_transfer(state->i2c, &msg, 1);
if (ret != 1) if (ret != 1)
dprintk ("%s: writereg error (reg %02x, ret == %i)\n", dprintk ("%s: writereg error (reg %02x, ret == %i)\n",
__FUNCTION__, reg, ret); __FUNCTION__, reg, ret);
return (ret != 1) ? -1 : 0; return (ret != 1) ? -1 : 0;
} }
static int tda8083_readregs (struct tda8083_state* state, u8 reg1, u8 *b, u8 len) static int tda8083_readregs (struct tda8083_state* state, u8 reg1, u8 *b, u8 len)
...@@ -87,7 +87,7 @@ static int tda8083_readregs (struct tda8083_state* state, u8 reg1, u8 *b, u8 len ...@@ -87,7 +87,7 @@ static int tda8083_readregs (struct tda8083_state* state, u8 reg1, u8 *b, u8 len
dprintk ("%s: readreg error (reg %02x, ret == %i)\n", dprintk ("%s: readreg error (reg %02x, ret == %i)\n",
__FUNCTION__, reg1, ret); __FUNCTION__, reg1, ret);
return ret == 2 ? 0 : -1; return ret == 2 ? 0 : -1;
} }
static inline u8 tda8083_readreg (struct tda8083_state* state, u8 reg) static inline u8 tda8083_readreg (struct tda8083_state* state, u8 reg)
...@@ -132,14 +132,14 @@ static fe_code_rate_t tda8083_get_fec (struct tda8083_state* state) ...@@ -132,14 +132,14 @@ static fe_code_rate_t tda8083_get_fec (struct tda8083_state* state)
static int tda8083_set_symbolrate (struct tda8083_state* state, u32 srate) static int tda8083_set_symbolrate (struct tda8083_state* state, u32 srate)
{ {
u32 ratio; u32 ratio;
u32 tmp; u32 tmp;
u8 filter; u8 filter;
if (srate > 32000000) if (srate > 32000000)
srate = 32000000; srate = 32000000;
if (srate < 500000) if (srate < 500000)
srate = 500000; srate = 500000;
filter = 0; filter = 0;
if (srate < 24000000) if (srate < 24000000)
...@@ -174,7 +174,7 @@ static void tda8083_wait_diseqc_fifo (struct tda8083_state* state, int timeout) ...@@ -174,7 +174,7 @@ static void tda8083_wait_diseqc_fifo (struct tda8083_state* state, int timeout)
unsigned long start = jiffies; unsigned long start = jiffies;
while (jiffies - start < timeout && while (jiffies - start < timeout &&
!(tda8083_readreg(state, 0x02) & 0x80)) !(tda8083_readreg(state, 0x02) & 0x80))
{ {
msleep(50); msleep(50);
}; };
......
...@@ -217,10 +217,10 @@ static int arm_thread(void *data) ...@@ -217,10 +217,10 @@ static int arm_thread(void *data)
dprintk(4, "%p\n",av7110); dprintk(4, "%p\n",av7110);
lock_kernel(); lock_kernel();
daemonize("arm_mon"); daemonize("arm_mon");
sigfillset(&current->blocked); sigfillset(&current->blocked);
unlock_kernel(); unlock_kernel();
av7110->arm_thread = current; av7110->arm_thread = current;
...@@ -1535,7 +1535,7 @@ static int alps_bsrv2_pll_set(struct dvb_frontend* fe, struct dvb_frontend_param ...@@ -1535,7 +1535,7 @@ static int alps_bsrv2_pll_set(struct dvb_frontend* fe, struct dvb_frontend_param
buf[2] = ((div & 0x18000) >> 10) | 0x95; buf[2] = ((div & 0x18000) >> 10) | 0x95;
buf[3] = (pwr << 6) | 0x30; buf[3] = (pwr << 6) | 0x30;
// NOTE: since we're using a prescaler of 2, we set the // NOTE: since we're using a prescaler of 2, we set the
// divisor frequency to 62.5kHz and divide by 125 above // divisor frequency to 62.5kHz and divide by 125 above
if (i2c_transfer (&av7110->i2c_adap, &msg, 1) != 1) if (i2c_transfer (&av7110->i2c_adap, &msg, 1) != 1)
...@@ -1811,7 +1811,7 @@ static struct tda8083_config grundig_29504_451_config = { ...@@ -1811,7 +1811,7 @@ static struct tda8083_config grundig_29504_451_config = {
static int philips_cd1516_pll_set(struct dvb_frontend* fe, static int philips_cd1516_pll_set(struct dvb_frontend* fe,
struct dvb_frontend_parameters* params) struct dvb_frontend_parameters* params)
{ {
struct av7110* av7110 = fe->dvb->priv; struct av7110* av7110 = fe->dvb->priv;
u32 div; u32 div;
u32 f = params->frequency; u32 f = params->frequency;
u8 data[4]; u8 data[4];
...@@ -2202,7 +2202,7 @@ static u8 read_pwm(struct av7110* av7110) ...@@ -2202,7 +2202,7 @@ static u8 read_pwm(struct av7110* av7110)
struct i2c_msg msg[] = { { .addr = 0x50,.flags = 0,.buf = &b,.len = 1 }, struct i2c_msg msg[] = { { .addr = 0x50,.flags = 0,.buf = &b,.len = 1 },
{ .addr = 0x50,.flags = I2C_M_RD,.buf = &pwm,.len = 1} }; { .addr = 0x50,.flags = I2C_M_RD,.buf = &pwm,.len = 1} };
if ((i2c_transfer(&av7110->i2c_adap, msg, 2) != 2) || (pwm == 0xff)) if ((i2c_transfer(&av7110->i2c_adap, msg, 2) != 2) || (pwm == 0xff))
pwm = 0x48; pwm = 0x48;
return pwm; return pwm;
...@@ -2245,7 +2245,7 @@ static int frontend_init(struct av7110 *av7110) ...@@ -2245,7 +2245,7 @@ static int frontend_init(struct av7110 *av7110)
} }
// Try the grundig 29504-451 // Try the grundig 29504-451
av7110->fe = tda8083_attach(&grundig_29504_451_config, &av7110->i2c_adap); av7110->fe = tda8083_attach(&grundig_29504_451_config, &av7110->i2c_adap);
if (av7110->fe) { if (av7110->fe) {
av7110->fe->ops->diseqc_send_master_cmd = av7110_diseqc_send_master_cmd; av7110->fe->ops->diseqc_send_master_cmd = av7110_diseqc_send_master_cmd;
av7110->fe->ops->diseqc_send_burst = av7110_diseqc_send_burst; av7110->fe->ops->diseqc_send_burst = av7110_diseqc_send_burst;
...@@ -2271,12 +2271,12 @@ static int frontend_init(struct av7110 *av7110) ...@@ -2271,12 +2271,12 @@ static int frontend_init(struct av7110 *av7110)
case 0x0001: // Hauppauge/TT Nexus-T premium rev1.X case 0x0001: // Hauppauge/TT Nexus-T premium rev1.X
// ALPS TDLB7 // ALPS TDLB7
av7110->fe = sp8870_attach(&alps_tdlb7_config, &av7110->i2c_adap); av7110->fe = sp8870_attach(&alps_tdlb7_config, &av7110->i2c_adap);
break; break;
case 0x0002: // Hauppauge/TT DVB-C premium rev2.X case 0x0002: // Hauppauge/TT DVB-C premium rev2.X
av7110->fe = ves1820_attach(&alps_tdbe2_config, &av7110->i2c_adap, read_pwm(av7110)); av7110->fe = ves1820_attach(&alps_tdbe2_config, &av7110->i2c_adap, read_pwm(av7110));
break; break;
case 0x0006: /* Fujitsu-Siemens DVB-S rev 1.6 */ case 0x0006: /* Fujitsu-Siemens DVB-S rev 1.6 */
...@@ -2421,9 +2421,9 @@ static int av7110_attach(struct saa7146_dev* dev, struct saa7146_pci_extension_d ...@@ -2421,9 +2421,9 @@ static int av7110_attach(struct saa7146_dev* dev, struct saa7146_pci_extension_d
dprintk(4, "dev: %p\n", dev); dprintk(4, "dev: %p\n", dev);
/* Set RPS_IRQ to 1 to track rps1 activity. /* Set RPS_IRQ to 1 to track rps1 activity.
* Enabling this won't send any interrupt to PC CPU. * Enabling this won't send any interrupt to PC CPU.
*/ */
#define RPS_IRQ 0 #define RPS_IRQ 0
if (budgetpatch == 1) { if (budgetpatch == 1) {
......
...@@ -1203,15 +1203,15 @@ int av7110_osd_cmd(struct av7110 *av7110, osd_cmd_t *dc) ...@@ -1203,15 +1203,15 @@ int av7110_osd_cmd(struct av7110 *av7110, osd_cmd_t *dc)
int av7110_osd_capability(struct av7110 *av7110, osd_cap_t *cap) int av7110_osd_capability(struct av7110 *av7110, osd_cap_t *cap)
{ {
switch (cap->cmd) { switch (cap->cmd) {
case OSD_CAP_MEMSIZE: case OSD_CAP_MEMSIZE:
if (FW_4M_SDRAM(av7110->arm_app)) if (FW_4M_SDRAM(av7110->arm_app))
cap->val = 1000000; cap->val = 1000000;
else else
cap->val = 92000; cap->val = 92000;
return 0; return 0;
default: default:
return -EINVAL; return -EINVAL;
} }
} }
#endif /* CONFIG_DVB_AV7110_OSD */ #endif /* CONFIG_DVB_AV7110_OSD */
...@@ -120,8 +120,8 @@ static int ves1820_writereg(struct saa7146_dev *dev, u8 addr, u8 reg, u8 data) ...@@ -120,8 +120,8 @@ static int ves1820_writereg(struct saa7146_dev *dev, u8 addr, u8 reg, u8 data)
static int stv0297_writereg(struct saa7146_dev *dev, u8 addr, u8 reg, u8 data) static int stv0297_writereg(struct saa7146_dev *dev, u8 addr, u8 reg, u8 data)
{ {
u8 buf [] = { reg, data }; u8 buf [] = { reg, data };
struct i2c_msg msg = { .addr = addr, .flags = 0, .buf = buf, .len = 2 }; struct i2c_msg msg = { .addr = addr, .flags = 0, .buf = buf, .len = 2 };
if (1 != saa7146_i2c_transfer(dev, &msg, 1, 1)) if (1 != saa7146_i2c_transfer(dev, &msg, 1, 1))
return -1; return -1;
......
...@@ -87,7 +87,7 @@ static int start_ts_capture(struct budget *budget) ...@@ -87,7 +87,7 @@ static int start_ts_capture(struct budget *budget)
* Pitch: 188, NumBytes3: 188, NumLines3: 1024 * Pitch: 188, NumBytes3: 188, NumLines3: 1024
*/ */
switch(budget->card->type) { switch(budget->card->type) {
case BUDGET_FS_ACTIVY: case BUDGET_FS_ACTIVY:
saa7146_write(dev, DD1_INIT, 0x04000000); saa7146_write(dev, DD1_INIT, 0x04000000);
saa7146_write(dev, MC2, (MASK_09 | MASK_25)); saa7146_write(dev, MC2, (MASK_09 | MASK_25));
......
This diff is collapsed.
...@@ -256,7 +256,7 @@ static int alps_bsrv2_pll_set(struct dvb_frontend* fe, struct dvb_frontend_param ...@@ -256,7 +256,7 @@ static int alps_bsrv2_pll_set(struct dvb_frontend* fe, struct dvb_frontend_param
buf[2] = ((div & 0x18000) >> 10) | 0x95; buf[2] = ((div & 0x18000) >> 10) | 0x95;
buf[3] = (pwr << 6) | 0x30; buf[3] = (pwr << 6) | 0x30;
// NOTE: since we're using a prescaler of 2, we set the // NOTE: since we're using a prescaler of 2, we set the
// divisor frequency to 62.5kHz and divide by 125 above // divisor frequency to 62.5kHz and divide by 125 above
if (i2c_transfer (&budget->i2c_adap, &msg, 1) != 1) return -EIO; if (i2c_transfer (&budget->i2c_adap, &msg, 1) != 1) return -EIO;
...@@ -565,7 +565,7 @@ static u8 read_pwm(struct budget* budget) ...@@ -565,7 +565,7 @@ static u8 read_pwm(struct budget* budget)
struct i2c_msg msg[] = { { .addr = 0x50,.flags = 0,.buf = &b,.len = 1 }, struct i2c_msg msg[] = { { .addr = 0x50,.flags = 0,.buf = &b,.len = 1 },
{ .addr = 0x50,.flags = I2C_M_RD,.buf = &pwm,.len = 1} }; { .addr = 0x50,.flags = I2C_M_RD,.buf = &pwm,.len = 1} };
if ((i2c_transfer(&budget->i2c_adap, msg, 2) != 2) || (pwm == 0xff)) if ((i2c_transfer(&budget->i2c_adap, msg, 2) != 2) || (pwm == 0xff))
pwm = 0x48; pwm = 0x48;
return pwm; return pwm;
...@@ -593,7 +593,7 @@ static void frontend_init(struct budget *budget) ...@@ -593,7 +593,7 @@ static void frontend_init(struct budget *budget)
budget->dvb_frontend = ves1x93_attach(&alps_bsrv2_config, &budget->i2c_adap); budget->dvb_frontend = ves1x93_attach(&alps_bsrv2_config, &budget->i2c_adap);
if (budget->dvb_frontend) { if (budget->dvb_frontend) {
budget->dvb_frontend->ops->diseqc_send_master_cmd = budget_diseqc_send_master_cmd; budget->dvb_frontend->ops->diseqc_send_master_cmd = budget_diseqc_send_master_cmd;
budget->dvb_frontend->ops->diseqc_send_burst = budget_diseqc_send_burst; budget->dvb_frontend->ops->diseqc_send_burst = budget_diseqc_send_burst;
budget->dvb_frontend->ops->set_tone = budget_set_tone; budget->dvb_frontend->ops->set_tone = budget_set_tone;
break; break;
} }
......
...@@ -19,7 +19,7 @@ extern int budget_debug; ...@@ -19,7 +19,7 @@ extern int budget_debug;
#endif #endif
#define dprintk(level,args...) \ #define dprintk(level,args...) \
do { if ((budget_debug & level)) { printk("%s: %s(): ",__stringify(KBUILD_MODNAME), __FUNCTION__); printk(args); } } while (0) do { if ((budget_debug & level)) { printk("%s: %s(): ",__stringify(KBUILD_MODNAME), __FUNCTION__); printk(args); } } while (0)
struct budget_info { struct budget_info {
char *name; char *name;
......
...@@ -36,7 +36,7 @@ int main(int argc, char **argv) ...@@ -36,7 +36,7 @@ int main(int argc, char **argv)
} }
fprintf(fd_out, "\n};\n\n"); fprintf(fd_out, "\n};\n\n");
fclose(fd_in); fclose(fd_in);
fclose(fd_out); fclose(fd_out);
......
...@@ -13,7 +13,7 @@ ...@@ -13,7 +13,7 @@
Holger Waechtler Convergence Holger Waechtler Convergence
Copyright (C) 2002-2003 Ralph Metzler <rjkm@metzlerbros.de> Copyright (C) 2002-2003 Ralph Metzler <rjkm@metzlerbros.de>
Metzler Brothers Systementwicklung GbR Metzler Brothers Systementwicklung GbR
This program is free software; you can redistribute it and/or modify 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 it under the terms of the GNU General Public License as published by
...@@ -48,41 +48,41 @@ ...@@ -48,41 +48,41 @@
static int check_mac_tt(u8 *buf) static int check_mac_tt(u8 *buf)
{ {
int i; int i;
u16 tmp = 0xffff; u16 tmp = 0xffff;
for (i = 0; i < 8; i++) { for (i = 0; i < 8; i++) {
tmp = (tmp << 8) | ((tmp >> 8) ^ buf[i]); tmp = (tmp << 8) | ((tmp >> 8) ^ buf[i]);
tmp ^= (tmp >> 4) & 0x0f; tmp ^= (tmp >> 4) & 0x0f;
tmp ^= (tmp << 12) ^ ((tmp & 0xff) << 5); tmp ^= (tmp << 12) ^ ((tmp & 0xff) << 5);
} }
tmp ^= 0xffff; tmp ^= 0xffff;
return (((tmp >> 8) ^ buf[8]) | ((tmp & 0xff) ^ buf[9])); return (((tmp >> 8) ^ buf[8]) | ((tmp & 0xff) ^ buf[9]));
} }
static int getmac_tt(u8 * decodedMAC, u8 * encodedMAC) static int getmac_tt(u8 * decodedMAC, u8 * encodedMAC)
{ {
u8 xor[20] = { 0x72, 0x23, 0x68, 0x19, 0x5c, 0xa8, 0x71, 0x2c, u8 xor[20] = { 0x72, 0x23, 0x68, 0x19, 0x5c, 0xa8, 0x71, 0x2c,
0x54, 0xd3, 0x7b, 0xf1, 0x9E, 0x23, 0x16, 0xf6, 0x54, 0xd3, 0x7b, 0xf1, 0x9E, 0x23, 0x16, 0xf6,
0x1d, 0x36, 0x64, 0x78}; 0x1d, 0x36, 0x64, 0x78};
u8 data[20]; u8 data[20];
int i; int i;
/* In case there is a sig check failure have the orig contents available */ /* In case there is a sig check failure have the orig contents available */
memcpy(data, encodedMAC, 20); memcpy(data, encodedMAC, 20);
for (i = 0; i < 20; i++) for (i = 0; i < 20; i++)
data[i] ^= xor[i]; data[i] ^= xor[i];
for (i = 0; i < 10; i++) for (i = 0; i < 10; i++)
data[i] = ((data[2 * i + 1] << 8) | data[2 * i]) data[i] = ((data[2 * i + 1] << 8) | data[2 * i])
>> ((data[2 * i + 1] >> 6) & 3); >> ((data[2 * i + 1] >> 6) & 3);
if (check_mac_tt(data)) if (check_mac_tt(data))
return -ENODEV; return -ENODEV;
decodedMAC[0] = data[2]; decodedMAC[1] = data[1]; decodedMAC[2] = data[0]; decodedMAC[0] = data[2]; decodedMAC[1] = data[1]; decodedMAC[2] = data[0];
decodedMAC[3] = data[6]; decodedMAC[4] = data[5]; decodedMAC[5] = data[4]; decodedMAC[3] = data[6]; decodedMAC[4] = data[5]; decodedMAC[5] = data[4];
return 0; return 0;
} }
static int ttpci_eeprom_read_encodedMAC(struct i2c_adapter *adapter, u8 * encodedMAC) static int ttpci_eeprom_read_encodedMAC(struct i2c_adapter *adapter, u8 * encodedMAC)
......
...@@ -225,8 +225,8 @@ static int ttusb_i2c_msg(struct ttusb *ttusb, ...@@ -225,8 +225,8 @@ static int ttusb_i2c_msg(struct ttusb *ttusb,
err = ttusb_result(ttusb, b, 0x20); err = ttusb_result(ttusb, b, 0x20);
/* check if the i2c transaction was successful */ /* check if the i2c transaction was successful */
if ((snd_len != b[5]) || (rcv_len != b[6])) return -EREMOTEIO; if ((snd_len != b[5]) || (rcv_len != b[6])) return -EREMOTEIO;
if (rcv_len > 0) { if (rcv_len > 0) {
...@@ -489,27 +489,27 @@ static int ttusb_send_diseqc(struct dvb_frontend* fe, ...@@ -489,27 +489,27 @@ static int ttusb_send_diseqc(struct dvb_frontend* fe,
static int lnbp21_set_voltage(struct dvb_frontend* fe, fe_sec_voltage_t voltage) static int lnbp21_set_voltage(struct dvb_frontend* fe, fe_sec_voltage_t voltage)
{ {
struct ttusb* ttusb = (struct ttusb*) fe->dvb->priv; struct ttusb* ttusb = (struct ttusb*) fe->dvb->priv;
int ret; int ret;
u8 data[1]; u8 data[1];
struct i2c_msg msg = { .addr = 0x08, .flags = 0, .buf = data, .len = sizeof(data) }; struct i2c_msg msg = { .addr = 0x08, .flags = 0, .buf = data, .len = sizeof(data) };
switch(voltage) { switch(voltage) {
case SEC_VOLTAGE_OFF: case SEC_VOLTAGE_OFF:
data[0] = 0x00; data[0] = 0x00;
break; break;
case SEC_VOLTAGE_13: case SEC_VOLTAGE_13:
data[0] = 0x44; data[0] = 0x44;
break; break;
case SEC_VOLTAGE_18: case SEC_VOLTAGE_18:
data[0] = 0x4c; data[0] = 0x4c;
break; break;
default: default:
return -EINVAL; return -EINVAL;
}; };
ret = i2c_transfer(&ttusb->i2c_adap, &msg, 1); ret = i2c_transfer(&ttusb->i2c_adap, &msg, 1);
return (ret != 1) ? -EIO : 0; return (ret != 1) ? -EIO : 0;
} }
static int ttusb_update_lnb(struct ttusb *ttusb) static int ttusb_update_lnb(struct ttusb *ttusb)
...@@ -1184,45 +1184,45 @@ static struct tda1004x_config philips_tdm1316l_config = { ...@@ -1184,45 +1184,45 @@ static struct tda1004x_config philips_tdm1316l_config = {
}; };
static u8 alps_bsbe1_inittab[] = { static u8 alps_bsbe1_inittab[] = {
0x01, 0x15, 0x01, 0x15,
0x02, 0x30, 0x02, 0x30,
0x03, 0x00, 0x03, 0x00,
0x04, 0x7d, /* F22FR = 0x7d, F22 = f_VCO / 128 / 0x7d = 22 kHz */ 0x04, 0x7d, /* F22FR = 0x7d, F22 = f_VCO / 128 / 0x7d = 22 kHz */
0x05, 0x35, /* I2CT = 0, SCLT = 1, SDAT = 1 */ 0x05, 0x35, /* I2CT = 0, SCLT = 1, SDAT = 1 */
0x06, 0x40, /* DAC not used, set to high impendance mode */ 0x06, 0x40, /* DAC not used, set to high impendance mode */
0x07, 0x00, /* DAC LSB */ 0x07, 0x00, /* DAC LSB */
0x08, 0x40, /* DiSEqC off, LNB power on OP2/LOCK pin on */ 0x08, 0x40, /* DiSEqC off, LNB power on OP2/LOCK pin on */
0x09, 0x00, /* FIFO */ 0x09, 0x00, /* FIFO */
0x0c, 0x51, /* OP1 ctl = Normal, OP1 val = 1 (LNB Power ON) */ 0x0c, 0x51, /* OP1 ctl = Normal, OP1 val = 1 (LNB Power ON) */
0x0d, 0x82, /* DC offset compensation = ON, beta_agc1 = 2 */ 0x0d, 0x82, /* DC offset compensation = ON, beta_agc1 = 2 */
0x0e, 0x23, /* alpha_tmg = 2, beta_tmg = 3 */ 0x0e, 0x23, /* alpha_tmg = 2, beta_tmg = 3 */
0x10, 0x3f, // AGC2 0x3d 0x10, 0x3f, // AGC2 0x3d
0x11, 0x84, 0x11, 0x84,
0x12, 0xb9, 0x12, 0xb9,
0x15, 0xc9, // lock detector threshold 0x15, 0xc9, // lock detector threshold
0x16, 0x00, 0x16, 0x00,
0x17, 0x00, 0x17, 0x00,
0x18, 0x00, 0x18, 0x00,
0x19, 0x00, 0x19, 0x00,
0x1a, 0x00, 0x1a, 0x00,
0x1f, 0x50, 0x1f, 0x50,
0x20, 0x00, 0x20, 0x00,
0x21, 0x00, 0x21, 0x00,
0x22, 0x00, 0x22, 0x00,
0x23, 0x00, 0x23, 0x00,
0x28, 0x00, // out imp: normal out type: parallel FEC mode:0 0x28, 0x00, // out imp: normal out type: parallel FEC mode:0
0x29, 0x1e, // 1/2 threshold 0x29, 0x1e, // 1/2 threshold
0x2a, 0x14, // 2/3 threshold 0x2a, 0x14, // 2/3 threshold
0x2b, 0x0f, // 3/4 threshold 0x2b, 0x0f, // 3/4 threshold
0x2c, 0x09, // 5/6 threshold 0x2c, 0x09, // 5/6 threshold
0x2d, 0x05, // 7/8 threshold 0x2d, 0x05, // 7/8 threshold
0x2e, 0x01, 0x2e, 0x01,
0x31, 0x1f, // test all FECs 0x31, 0x1f, // test all FECs
0x32, 0x19, // viterbi and synchro search 0x32, 0x19, // viterbi and synchro search
0x33, 0xfc, // rs control 0x33, 0xfc, // rs control
0x34, 0x93, // error control 0x34, 0x93, // error control
0x0f, 0x92, 0x0f, 0x92,
0xff, 0xff 0xff, 0xff
}; };
static u8 alps_bsru6_inittab[] = { static u8 alps_bsru6_inittab[] = {
...@@ -1350,7 +1350,7 @@ static int ttusb_novas_grundig_29504_491_pll_set(struct dvb_frontend *fe, struct ...@@ -1350,7 +1350,7 @@ static int ttusb_novas_grundig_29504_491_pll_set(struct dvb_frontend *fe, struct
u32 div; u32 div;
struct i2c_msg msg = {.addr = 0x61,.flags = 0,.buf = buf,.len = sizeof(buf) }; struct i2c_msg msg = {.addr = 0x61,.flags = 0,.buf = buf,.len = sizeof(buf) };
div = params->frequency / 125; div = params->frequency / 125;
buf[0] = (div >> 8) & 0x7f; buf[0] = (div >> 8) & 0x7f;
buf[1] = div & 0xff; buf[1] = div & 0xff;
...@@ -1487,7 +1487,7 @@ static int ttusb_probe(struct usb_interface *intf, const struct usb_device_id *i ...@@ -1487,7 +1487,7 @@ static int ttusb_probe(struct usb_interface *intf, const struct usb_device_id *i
udev = interface_to_usbdev(intf); udev = interface_to_usbdev(intf);
if (intf->altsetting->desc.bInterfaceNumber != 1) return -ENODEV; if (intf->altsetting->desc.bInterfaceNumber != 1) return -ENODEV;
if (!(ttusb = kmalloc(sizeof(struct ttusb), GFP_KERNEL))) if (!(ttusb = kmalloc(sizeof(struct ttusb), GFP_KERNEL)))
return -ENOMEM; return -ENOMEM;
......
...@@ -1203,7 +1203,7 @@ static int ttusb_init_rc(struct ttusb_dec *dec) ...@@ -1203,7 +1203,7 @@ static int ttusb_init_rc(struct ttusb_dec *dec)
input_dev->keycode = rc_keys; input_dev->keycode = rc_keys;
for (i = 0; i < ARRAY_SIZE(rc_keys); i++) for (i = 0; i < ARRAY_SIZE(rc_keys); i++)
set_bit(rc_keys[i], input_dev->keybit); set_bit(rc_keys[i], input_dev->keybit);
input_register_device(input_dev); input_register_device(input_dev);
...@@ -1529,7 +1529,7 @@ static void ttusb_dec_exit_rc(struct ttusb_dec *dec) ...@@ -1529,7 +1529,7 @@ static void ttusb_dec_exit_rc(struct ttusb_dec *dec)
usb_free_urb(dec->irq_urb); usb_free_urb(dec->irq_urb);
usb_buffer_free(dec->udev,IRQ_PACKET_SIZE, usb_buffer_free(dec->udev,IRQ_PACKET_SIZE,
dec->irq_buffer, dec->irq_dma_handle); dec->irq_buffer, dec->irq_dma_handle);
if (dec->rc_input_dev) { if (dec->rc_input_dev) {
input_unregister_device(dec->rc_input_dev); input_unregister_device(dec->rc_input_dev);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment