The patch number 8077 was added via Mauro Carvalho Chehab <[EMAIL PROTECTED]> to http://linuxtv.org/hg/v4l-dvb master development tree.
Kernel patches in this development tree may be modified to be backward compatible with older kernels. Compatibility modifications will be removed before inclusion into the mainstream Kernel If anyone has any objections, please let us know by sending a message to: [EMAIL PROTECTED] ------ From: Mauro Carvalho Chehab <[EMAIL PROTECTED]> merge: http://linuxtv.org/hg/~endriss/v4l-dvb Signed-off-by: Mauro Carvalho Chehab <[EMAIL PROTECTED]> --- linux/drivers/media/dvb/frontends/stv0299.c | 15 ++++++++++---- linux/drivers/media/dvb/frontends/tda10023.c | 20 +++++++++++-------- linux/drivers/media/dvb/ttpci/av7110.c | 1 linux/drivers/media/dvb/ttpci/av7110.h | 1 linux/drivers/media/dvb/ttpci/av7110_hw.c | 5 +--- linux/drivers/media/dvb/ttpci/av7110_hw.h | 3 -- linux/drivers/media/dvb/ttpci/budget-ci.c | 1 7 files changed, 26 insertions(+), 20 deletions(-) diff -r b988afd327fc -r 3e0e7586d6a3 linux/drivers/media/dvb/frontends/stv0299.c --- a/linux/drivers/media/dvb/frontends/stv0299.c Sun Jun 22 06:32:03 2008 -0300 +++ b/linux/drivers/media/dvb/frontends/stv0299.c Sun Jun 22 06:37:10 2008 -0300 @@ -63,6 +63,7 @@ struct stv0299_state { u32 symbol_rate; fe_code_rate_t fec_inner; int errmode; + u32 ucblocks; }; #define STATUS_BER 0 @@ -501,8 +502,10 @@ static int stv0299_read_ber(struct dvb_f { struct stv0299_state* state = fe->demodulator_priv; - if (state->errmode != STATUS_BER) return 0; - *ber = (stv0299_readreg (state, 0x1d) << 8) | stv0299_readreg (state, 0x1e); + if (state->errmode != STATUS_BER) + return -ENOSYS; + + *ber = stv0299_readreg(state, 0x1e) | (stv0299_readreg(state, 0x1d) << 8); return 0; } @@ -540,8 +543,12 @@ static int stv0299_read_ucblocks(struct { struct stv0299_state* state = fe->demodulator_priv; - if (state->errmode != STATUS_UCBLOCKS) *ucblocks = 0; - else *ucblocks = (stv0299_readreg (state, 0x1d) << 8) | stv0299_readreg (state, 0x1e); + if (state->errmode != STATUS_UCBLOCKS) + return -ENOSYS; + + state->ucblocks += stv0299_readreg(state, 0x1e); + state->ucblocks += (stv0299_readreg(state, 0x1d) << 8); + *ucblocks = state->ucblocks; return 0; } diff -r b988afd327fc -r 3e0e7586d6a3 linux/drivers/media/dvb/frontends/tda10023.c --- a/linux/drivers/media/dvb/frontends/tda10023.c Sun Jun 22 06:32:03 2008 -0300 +++ b/linux/drivers/media/dvb/frontends/tda10023.c Sun Jun 22 06:37:10 2008 -0300 @@ -74,9 +74,12 @@ static u8 tda10023_readreg (struct tda10 int ret; ret = i2c_transfer (state->i2c, msg, 2); - if (ret != 2) - printk("DVB: TDA10023: %s: readreg error (ret == %i)\n", - __func__, ret); + if (ret != 2) { + int num = state->frontend.dvb ? state->frontend.dvb->num : -1; + printk(KERN_ERR "DVB: TDA10023(%d): %s: readreg error " + "(reg == 0x%02x, ret == %i)\n", + num, __func__, reg, ret); + } return b1[0]; } @@ -87,11 +90,12 @@ static int tda10023_writereg (struct tda int ret; ret = i2c_transfer (state->i2c, &msg, 1); - if (ret != 1) - printk("DVB: TDA10023(%d): %s, writereg error " + if (ret != 1) { + int num = state->frontend.dvb ? state->frontend.dvb->num : -1; + printk(KERN_ERR "DVB: TDA10023(%d): %s, writereg error " "(reg == 0x%02x, val == 0x%02x, ret == %i)\n", - state->frontend.dvb->num, __func__, reg, data, ret); - + num, __func__, reg, data, ret); + } return (ret != 1) ? -EREMOTEIO : 0; } @@ -485,7 +489,7 @@ struct dvb_frontend *tda10023_attach(con struct tda10023_state* state = NULL; /* allocate memory for the internal state */ - state = kmalloc(sizeof(struct tda10023_state), GFP_KERNEL); + state = kzalloc(sizeof(struct tda10023_state), GFP_KERNEL); if (state == NULL) goto error; /* setup the state */ diff -r b988afd327fc -r 3e0e7586d6a3 linux/drivers/media/dvb/ttpci/av7110.c --- a/linux/drivers/media/dvb/ttpci/av7110.c Sun Jun 22 06:32:03 2008 -0300 +++ b/linux/drivers/media/dvb/ttpci/av7110.c Sun Jun 22 06:37:10 2008 -0300 @@ -1198,7 +1198,6 @@ static int start_ts_capture(struct av711 if (budget->feeding1) return ++budget->feeding1; memset(budget->grabbing, 0x00, TS_HEIGHT * TS_WIDTH); - budget->tsf = 0xff; budget->ttbp = 0; SAA7146_IER_ENABLE(budget->dev, MASK_10); /* VPE */ saa7146_write(budget->dev, MC1, (MASK_04 | MASK_20)); /* DMA3 on */ diff -r b988afd327fc -r 3e0e7586d6a3 linux/drivers/media/dvb/ttpci/av7110.h --- a/linux/drivers/media/dvb/ttpci/av7110.h Sun Jun 22 06:32:03 2008 -0300 +++ b/linux/drivers/media/dvb/ttpci/av7110.h Sun Jun 22 06:37:10 2008 -0300 @@ -200,7 +200,6 @@ struct av7110 { struct dvb_net dvb_net1; spinlock_t feedlock1; int feeding1; - u8 tsf; u32 ttbp; unsigned char *grabbing; struct saa7146_pgtable pt; diff -r b988afd327fc -r 3e0e7586d6a3 linux/drivers/media/dvb/ttpci/av7110_hw.c --- a/linux/drivers/media/dvb/ttpci/av7110_hw.c Sun Jun 22 06:32:03 2008 -0300 +++ b/linux/drivers/media/dvb/ttpci/av7110_hw.c Sun Jun 22 06:37:10 2008 -0300 @@ -427,6 +427,7 @@ static int __av7110_send_fw_cmd(struct a if (err) { printk(KERN_ERR "%s: timeout waiting on busy %s QUEUE\n", __func__, type); + av7110->arm_errors++; return -ETIMEDOUT; } msleep(1); @@ -853,10 +854,8 @@ static osd_raw_window_t bpp2bit[8] = { static inline int WaitUntilBmpLoaded(struct av7110 *av7110) { - int ret = wait_event_interruptible_timeout(av7110->bmpq, + int ret = wait_event_timeout(av7110->bmpq, av7110->bmp_state != BMP_LOADING, 10*HZ); - if (ret == -ERESTARTSYS) - return ret; if (ret == 0) { printk("dvb-ttpci: warning: timeout waiting in LoadBitmap: %d, %d\n", ret, av7110->bmp_state); diff -r b988afd327fc -r 3e0e7586d6a3 linux/drivers/media/dvb/ttpci/av7110_hw.h --- a/linux/drivers/media/dvb/ttpci/av7110_hw.h Sun Jun 22 06:32:03 2008 -0300 +++ b/linux/drivers/media/dvb/ttpci/av7110_hw.h Sun Jun 22 06:37:10 2008 -0300 @@ -305,7 +305,6 @@ enum av7110_command_type { #define IRQ_STATE (DPRAM_BASE + 0x0F4) #define IRQ_STATE_EXT (DPRAM_BASE + 0x0F6) #define MSGSTATE (DPRAM_BASE + 0x0F8) -#define FILT_STATE (DPRAM_BASE + 0x0FA) #define COMMAND (DPRAM_BASE + 0x0FC) #define COM_BUFF (DPRAM_BASE + 0x100) #define COM_BUFF_SIZE 0x20 @@ -332,8 +331,6 @@ enum av7110_command_type { /* firmware status area */ #define STATUS_BASE (DPRAM_BASE + 0x1FC0) -#define STATUS_SCR (STATUS_BASE + 0x00) -#define STATUS_MODES (STATUS_BASE + 0x04) #define STATUS_LOOPS (STATUS_BASE + 0x08) #define STATUS_MPEG_WIDTH (STATUS_BASE + 0x0C) diff -r b988afd327fc -r 3e0e7586d6a3 linux/drivers/media/dvb/ttpci/budget-ci.c --- a/linux/drivers/media/dvb/ttpci/budget-ci.c Sun Jun 22 06:32:03 2008 -0300 +++ b/linux/drivers/media/dvb/ttpci/budget-ci.c Sun Jun 22 06:37:10 2008 -0300 @@ -237,6 +237,7 @@ static int msp430_ir_init(struct budget_ break; case 0x1010: case 0x1017: + case 0x101a: /* for the Technotrend 1500 bundled remote */ ir_input_init(input_dev, &budget_ci->ir.state, IR_TYPE_RC5, ir_codes_tt_1500); --- Patch is available at: http://linuxtv.org/hg/v4l-dvb/rev/3e0e7586d6a31974a7736733ffc7eff5dcb6d534 _______________________________________________ linuxtv-commits mailing list linuxtv-commits@linuxtv.org http://www.linuxtv.org/cgi-bin/mailman/listinfo/linuxtv-commits