Re: Need testers: cx23885 IR Rx for TeVii S470 and HVR-1250
On Fri, 2010-07-09 at 15:28 -0500, Kenney Phillisjr wrote: I know this is an old thread, however i have an card that meets the requirements to be tested by the patches made by andy, and so far with what i've tried it's been doing really well for input. I pretty much just downloaded and tested Andy's patch set... http://linuxtv.org/hg/~awalls/cx23885-ir2 I'll be porting most of these 32 patches forward to my v4l-dvb.git tree (on the cx-ir branch) later today. I need the I/O pin configuration stuff for the CX23885 and CX23888 IR transmitter pin configuration. Could you please provide a diff for the one change you mentioned on IRC about fixing Rx on the HVR-1250? The tests where done on ubuntu 10.04 with kernel 2.6.32-23-generic (64-bit) and this appears to be working perfectly. (This even properly identifies the card I'm using down to the model) card notes: Hauppauge WinTV-HVR1250 (Model: 79001) I don't have an original HVR-1250 or any other card with a genuine CX23885 chip anymore, so I'll be unable to test. I will likely add a module parameter that end users will be required to set explcitly to enable the IR integrated in the CX23885 chip. Igor's testing with the TeVii S470 resulted in the infinite IR interrupts making his system unusable. Regards, Andy oh and the only change i made to the test is i commented out the 4 lines in the makefile that generate the firedtv module so i could compile the tests -- To unsubscribe from this list: send the line unsubscribe linux-media in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html -- To unsubscribe from this list: send the line unsubscribe linux-media in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: Need testers: cx23885 IR Rx for TeVii S470 and HVR-1250
I know this is an old thread, however i have an card that meets the requirements to be tested by the patches made by andy, and so far with what i've tried it's been doing really well for input. I pretty much just downloaded and tested Andy's patch set... http://linuxtv.org/hg/~awalls/cx23885-ir2 The tests where done on ubuntu 10.04 with kernel 2.6.32-23-generic (64-bit) and this appears to be working perfectly. (This even properly identifies the card I'm using down to the model) card notes: Hauppauge WinTV-HVR1250 (Model: 79001) oh and the only change i made to the test is i commented out the 4 lines in the makefile that generate the firedtv module so i could compile the tests -- To unsubscribe from this list: send the line unsubscribe linux-media in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: Need testers: cx23885 IR Rx for TeVii S470 and HVR-1250
On 19 января 2010 04:10:42 Andy Walls wrote: On Tue, 2010-01-19 at 00:25 +0200, Igor M. Liplianin wrote: On 18 января 2010 07:36:52 Andy Walls wrote: On Sat, 2010-01-16 at 20:26 -0500, Andy Walls wrote: On Sat, 2010-01-16 at 23:56 +0200, Igor M. Liplianin wrote: On 16 января 2010 21:55:52 Andy Walls wrote: I have checked in more changes to http://linuxtv.org/hg/~awalls/cx23885-ir2 Please test again using these module parameters: modprobe cx25840 ir_debug=2 debug=2 modprobe cx23885 ir_input_debug=2 irq_debug=7 debug=7 I have removed the spurious interrupt handling code - it was bogus. The real problems are: 1. performing AV Core i2c transactions from an IRQ context is bad 2. the cx25840 module needs locking to prevent i2c transaction contention during the AV Core register reads and writes. I have implemented and checked in a change for #1. Now the AV_CORE interrupt gets disabled and a work handler is scheduled to deal with the IR controller on the AV core. When the work handler is done, it will re-enable the AV_CORE interrupt. I have not implmented a change for #2 yet. I have not added locking to protect cx25840_read() and cx25840_write() functions. This will take time to get right. I have now fixed the cx25840 module. I also added a log function for v4l2-ctl -d /dev/video0 --log-status to log the status of the IR controller. Now I can not remove modules. Unloading cx25840 module raises exception in cx23885_av_workhandler, unloading cx23885 - in i2c_transfer. You may test these latest changes if you want, but I won't be surprised if things don't work on occasion. It is very same behaviour here. A lot of interrupts without purpose. :( : I have tested IR loopback with my HVR-1250 and things are fine for me, but I have no video interrupts coming in either. I wonder what is the difference. a. I set up the IR transmit pin for the HVR-1250 but not the S470 in cx23885-cards.c:cx23885_ir_init() b. I set the transmitter invert_level for the Tx pin (a no-op for the cx23885 IR controller) at the bottom of cx23885-input.c:cx23885_input_ir_start() for the HVR-1250, but not the S470. c. For testing, I add an analog device video node to the HVR1250 for a debug and test: diff -r 9128ef95c5a7 -r 1ce2344226c1 linux/drivers/media/video/cx23885/cx23885-cards.c --- a/linux/drivers/media/video/cx23885/cx23885-cards.c Sat Jan 09 13:58:18 2010 -0500 +++ b/linux/drivers/media/video/cx23885/cx23885-cards.cSat Jan 09 14:31:30 2010 -0500 @@ -104,6 +104,8 @@ }, [CX23885_BOARD_HAUPPAUGE_HVR1250] = { .name = Hauppauge WinTV-HVR1250, + .tuner_type = TUNER_ABSENT, + .porta = CX23885_ANALOG_VIDEO, .portc = CX23885_MPEG_DVB, .input = {{ .type = CX23885_VMUX_TELEVISION, d. The script of commands I use for testing the HVR-1250 IR Rx with the IR Tx in hardware loopback is: #make unload; make unload #make install #modprobe cx25840 ir_debug=2 debug=2 #modprobe cx23885 ir_input_debug=2 irq_debug=7 debug=7 #v4l2-ctl -d /dev/video0 --log-status # Get pin ctrl setting v4l2-dbg -d /dev/video0 -c 0x44 -g 0x123 # disable tx fifo v4l2-dbg -d /dev/video0 -c 0x44 -s 0x200 0x4c # disable tx fifo svc req v4l2-dbg -d /dev/video0 -c 0x44 -s 0x214 0x20 # disable tx, enable loopback v4l2-dbg -d /dev/video0 -c 0x44 -s 0x201 0x21 #v4l2-ctl -d /dev/video0 --log-status # set tx clk div v4l2-dbg -d /dev/video0 -c 0x44 -s 0x204 1 0 #enable tx fifo v4l2-dbg -d /dev/video0 -c 0x44 -s 0x200 0xcc # store test pulse data v4l2-dbg -d /dev/video0 -c 0x44 -s 0x23c 0xff 0x7f 0x1 0x0 v4l2-dbg -d /dev/video0 -c 0x44 -s 0x23c 0xff 0x5f 0x0 0x0 v4l2-dbg -d /dev/video0 -c 0x44 -s 0x23c 0xff 0x7f 0x1 0x0 v4l2-dbg -d /dev/video0 -c 0x44 -s 0x23c 0xff 0x5f 0x0 0x0 v4l2-dbg -d /dev/video0 -c 0x44 -s 0x23c 0xff 0x7f 0x1 0x0 v4l2-dbg -d /dev/video0 -c 0x44 -s 0x23c 0xff 0x5f 0x0 0x0 v4l2-dbg -d /dev/video0 -c 0x44 -s 0x23c 0xff 0x7f 0x1 0x0 v4l2-dbg -d /dev/video0 -c 0x44 -s 0x23c 0xff 0x5f 0x0 0x0 #v4l2-ctl -d /dev/video0 --log-status #enable tx v4l2-dbg -d /dev/video0 -c 0x44 -s 0x201 0x23 #v4l2-ctl -d /dev/video0 --log-status e. My HVR-1250 doesn't have actual external IR Rx hardware, so I can only test with loopback. If my latest changes don't work, I'll probably have to order a CX23885 card with the hardware for actual IR Rx. Maybe I'll get a TeVii S470 and buy a satellite dish. ;) Thanks again for all your test efforts. Regards, Andy -- Igor M. Liplianin Microsoft Windows Free Zone - Linux used for all Computing Tasks -- To unsubscribe from this list: send the line unsubscribe linux-media in the body of a message to majord...@vger.kernel.org More majordomo info at
Re: Need testers: cx23885 IR Rx for TeVii S470 and HVR-1250
On 18 января 2010 07:36:52 Andy Walls wrote: On Sat, 2010-01-16 at 20:26 -0500, Andy Walls wrote: On Sat, 2010-01-16 at 23:56 +0200, Igor M. Liplianin wrote: On 16 января 2010 21:55:52 Andy Walls wrote: I have checked in more changes to http://linuxtv.org/hg/~awalls/cx23885-ir2 Please test again using these module parameters: modprobe cx25840 ir_debug=2 debug=2 modprobe cx23885 ir_input_debug=2 irq_debug=7 debug=7 I have removed the spurious interrupt handling code - it was bogus. The real problems are: 1. performing AV Core i2c transactions from an IRQ context is bad 2. the cx25840 module needs locking to prevent i2c transaction contention during the AV Core register reads and writes. I have implemented and checked in a change for #1. Now the AV_CORE interrupt gets disabled and a work handler is scheduled to deal with the IR controller on the AV core. When the work handler is done, it will re-enable the AV_CORE interrupt. I have not implmented a change for #2 yet. I have not added locking to protect cx25840_read() and cx25840_write() functions. This will take time to get right. You may test these latest changes if you want, but I won't be surprised if things don't work on occasion. It is very same behaviour here. A lot of interrupts without purpose. I have tested IR loopback with my HVR-1250 and things are fine for me, but I have no video interrupts coming in either. I wonder what is the difference. Regards, Andy OK. I think I finally have guessed what is going on: 1. The cx23885_irq_handler is called for the AV_CORE when something else in the cx23885 or cx25840 module is accessing that I2C bus. 2. The I2C bus adapter mutex in the i2c_subsystem stays locked so the cx23885_irq_handler() and cx25840_irq_handler() cannot read the AV core registers since the I2C subsystem returns -EINVAL and 0 for the data. 3. The interrupt handler keeps getting called because it never clears the interrupt condition in the AV Core. I think I have to do some work in the cx25840 module and the cx23885 module to handle locking of the AV Core I2C client and I2C bus 3. BR Igor -- To unsubscribe from this list: send the line unsubscribe linux-media in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: Need testers: cx23885 IR Rx for TeVii S470 and HVR-1250
On Tue, 2010-01-19 at 00:25 +0200, Igor M. Liplianin wrote: On 18 января 2010 07:36:52 Andy Walls wrote: On Sat, 2010-01-16 at 20:26 -0500, Andy Walls wrote: On Sat, 2010-01-16 at 23:56 +0200, Igor M. Liplianin wrote: On 16 января 2010 21:55:52 Andy Walls wrote: I have checked in more changes to http://linuxtv.org/hg/~awalls/cx23885-ir2 Please test again using these module parameters: modprobe cx25840 ir_debug=2 debug=2 modprobe cx23885 ir_input_debug=2 irq_debug=7 debug=7 I have removed the spurious interrupt handling code - it was bogus. The real problems are: 1. performing AV Core i2c transactions from an IRQ context is bad 2. the cx25840 module needs locking to prevent i2c transaction contention during the AV Core register reads and writes. I have implemented and checked in a change for #1. Now the AV_CORE interrupt gets disabled and a work handler is scheduled to deal with the IR controller on the AV core. When the work handler is done, it will re-enable the AV_CORE interrupt. I have not implmented a change for #2 yet. I have not added locking to protect cx25840_read() and cx25840_write() functions. This will take time to get right. I have now fixed the cx25840 module. I also added a log function for v4l2-ctl -d /dev/video0 --log-status to log the status of the IR controller. You may test these latest changes if you want, but I won't be surprised if things don't work on occasion. It is very same behaviour here. A lot of interrupts without purpose. :( I have tested IR loopback with my HVR-1250 and things are fine for me, but I have no video interrupts coming in either. I wonder what is the difference. a. I set up the IR transmit pin for the HVR-1250 but not the S470 in cx23885-cards.c:cx23885_ir_init() b. I set the transmitter invert_level for the Tx pin (a no-op for the cx23885 IR controller) at the bottom of cx23885-input.c:cx23885_input_ir_start() for the HVR-1250, but not the S470. c. For testing, I add an analog device video node to the HVR1250 for a debug and test: diff -r 9128ef95c5a7 -r 1ce2344226c1 linux/drivers/media/video/cx23885/cx23885-cards.c --- a/linux/drivers/media/video/cx23885/cx23885-cards.c Sat Jan 09 13:58:18 2010 -0500 +++ b/linux/drivers/media/video/cx23885/cx23885-cards.c Sat Jan 09 14:31:30 2010 -0500 @@ -104,6 +104,8 @@ }, [CX23885_BOARD_HAUPPAUGE_HVR1250] = { .name = Hauppauge WinTV-HVR1250, + .tuner_type = TUNER_ABSENT, + .porta = CX23885_ANALOG_VIDEO, .portc = CX23885_MPEG_DVB, .input = {{ .type = CX23885_VMUX_TELEVISION, d. The script of commands I use for testing the HVR-1250 IR Rx with the IR Tx in hardware loopback is: #make unload; make unload #make install #modprobe cx25840 ir_debug=2 debug=2 #modprobe cx23885 ir_input_debug=2 irq_debug=7 debug=7 #v4l2-ctl -d /dev/video0 --log-status # Get pin ctrl setting v4l2-dbg -d /dev/video0 -c 0x44 -g 0x123 # disable tx fifo v4l2-dbg -d /dev/video0 -c 0x44 -s 0x200 0x4c # disable tx fifo svc req v4l2-dbg -d /dev/video0 -c 0x44 -s 0x214 0x20 # disable tx, enable loopback v4l2-dbg -d /dev/video0 -c 0x44 -s 0x201 0x21 #v4l2-ctl -d /dev/video0 --log-status # set tx clk div v4l2-dbg -d /dev/video0 -c 0x44 -s 0x204 1 0 #enable tx fifo v4l2-dbg -d /dev/video0 -c 0x44 -s 0x200 0xcc # store test pulse data v4l2-dbg -d /dev/video0 -c 0x44 -s 0x23c 0xff 0x7f 0x1 0x0 v4l2-dbg -d /dev/video0 -c 0x44 -s 0x23c 0xff 0x5f 0x0 0x0 v4l2-dbg -d /dev/video0 -c 0x44 -s 0x23c 0xff 0x7f 0x1 0x0 v4l2-dbg -d /dev/video0 -c 0x44 -s 0x23c 0xff 0x5f 0x0 0x0 v4l2-dbg -d /dev/video0 -c 0x44 -s 0x23c 0xff 0x7f 0x1 0x0 v4l2-dbg -d /dev/video0 -c 0x44 -s 0x23c 0xff 0x5f 0x0 0x0 v4l2-dbg -d /dev/video0 -c 0x44 -s 0x23c 0xff 0x7f 0x1 0x0 v4l2-dbg -d /dev/video0 -c 0x44 -s 0x23c 0xff 0x5f 0x0 0x0 #v4l2-ctl -d /dev/video0 --log-status #enable tx v4l2-dbg -d /dev/video0 -c 0x44 -s 0x201 0x23 #v4l2-ctl -d /dev/video0 --log-status e. My HVR-1250 doesn't have actual external IR Rx hardware, so I can only test with loopback. If my latest changes don't work, I'll probably have to order a CX23885 card with the hardware for actual IR Rx. Maybe I'll get a TeVii S470 and buy a satellite dish. ;) Thanks again for all your test efforts. Regards, Andy -- To unsubscribe from this list: send the line unsubscribe linux-media in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: Need testers: cx23885 IR Rx for TeVii S470 and HVR-1250
On Sat, 2010-01-16 at 20:26 -0500, Andy Walls wrote: On Sat, 2010-01-16 at 23:56 +0200, Igor M. Liplianin wrote: On 16 января 2010 21:55:52 Andy Walls wrote: I have checked in more changes to http://linuxtv.org/hg/~awalls/cx23885-ir2 Please test again using these module parameters: modprobe cx25840 ir_debug=2 debug=2 modprobe cx23885 ir_input_debug=2 irq_debug=7 debug=7 I have removed the spurious interrupt handling code - it was bogus. The real problems are: 1. performing AV Core i2c transactions from an IRQ context is bad 2. the cx25840 module needs locking to prevent i2c transaction contention during the AV Core register reads and writes. I have implemented and checked in a change for #1. Now the AV_CORE interrupt gets disabled and a work handler is scheduled to deal with the IR controller on the AV core. When the work handler is done, it will re-enable the AV_CORE interrupt. I have not implmented a change for #2 yet. I have not added locking to protect cx25840_read() and cx25840_write() functions. This will take time to get right. You may test these latest changes if you want, but I won't be surprised if things don't work on occasion. I have tested IR loopback with my HVR-1250 and things are fine for me, but I have no video interrupts coming in either. Regards, Andy OK. I think I finally have guessed what is going on: 1. The cx23885_irq_handler is called for the AV_CORE when something else in the cx23885 or cx25840 module is accessing that I2C bus. 2. The I2C bus adapter mutex in the i2c_subsystem stays locked so the cx23885_irq_handler() and cx25840_irq_handler() cannot read the AV core registers since the I2C subsystem returns -EINVAL and 0 for the data. 3. The interrupt handler keeps getting called because it never clears the interrupt condition in the AV Core. I think I have to do some work in the cx25840 module and the cx23885 module to handle locking of the AV Core I2C client and I2C bus 3. -- To unsubscribe from this list: send the line unsubscribe linux-media in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: Need testers: cx23885 IR Rx for TeVii S470 and HVR-1250
On 16 января 2010 06:02:41 Andy Walls wrote: Hi, I've got reworked changes for the IR for the TeVii S470 and the HVR-1250 at http://linuxtv.org/hg/~awalls/cx23885-ir2 Thanks to loaner HVR-1250 hardware from Devin Heitmueller, I've solved the infinite interrupt problem with the CX23885 AV core and have reworked the change set against the latest v4l-dvb. Please test. Note 1. the parameters for the IR controller setup in linux/drivers/video/cx23885-input.c may need to be tweaked to set the proper params.modulation and params.invert_level before you get keypresses decoded. 2. I guessed at a reasonable set of remote keycodes for the TeVii S470, so don't be surprised if the button mapping isn't quite right. 3. These module settings may be helpful for debug and test: # modprobe cx25840 debug=2 ir_debug=2 # modprobe cx23885 debug=7 Also directing kern.* messages to /var/log/messages in /etc/rsyslogd.conf and giving rsyslod a SIGHUP may be helpful for capturing the messages. 4. In case I didn't fix the infinite interrupts problem for the TeVii S470: Before testing, blacklist the cx23885 module in /etc/modprobe.d/blacklist, so that when you reboot, the module doesn't automatically load. If your system seems to be very busy with inifinite interrupts upon cx23885 module load, stop testing (and let me know). Regards, Andy Hi modprobe cx23885 gives nobody cared : Creating IR device irrcv0 irq 16: nobody cared (try booting with the irqpoll option) Pid: 0, comm: swapper Not tainted 2.6.33-rc4 #3 Call Trace: [c1054700] ? __report_bad_irq+0x24/0x69 [c1054707] ? __report_bad_irq+0x2b/0x69 [c105482c] ? note_interrupt+0xe7/0x13f [c1054d66] ? handle_fasteoi_irq+0x7a/0x97 [c1003e80] ? handle_irq+0x38/0x40 [c10036d8] ? do_IRQ+0x38/0x8e [c1002ca9] ? common_interrupt+0x29/0x30 [c100796e] ? mwait_idle+0x7a/0x7f [c1001ab3] ? cpu_idle+0x37/0x4c [c1648774] ? start_kernel+0x29a/0x29d handlers: [c1332132] (usb_hcd_irq+0x0/0x59) [f87cdd88] (cx23885_irq+0x0/0x4e0 [cx23885]) Disabling IRQ #16 Igor -- To unsubscribe from this list: send the line unsubscribe linux-media in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: Need testers: cx23885 IR Rx for TeVii S470 and HVR-1250
On 16 января 2010 06:02:41 Andy Walls wrote: Hi, I've got reworked changes for the IR for the TeVii S470 and the HVR-1250 at http://linuxtv.org/hg/~awalls/cx23885-ir2 Thanks to loaner HVR-1250 hardware from Devin Heitmueller, I've solved the infinite interrupt problem with the CX23885 AV core and have reworked the change set against the latest v4l-dvb. Please test. Note 1. the parameters for the IR controller setup in linux/drivers/video/cx23885-input.c may need to be tweaked to set the proper params.modulation and params.invert_level before you get keypresses decoded. 2. I guessed at a reasonable set of remote keycodes for the TeVii S470, so don't be surprised if the button mapping isn't quite right. 3. These module settings may be helpful for debug and test: # modprobe cx25840 debug=2 ir_debug=2 # modprobe cx23885 debug=7 Also directing kern.* messages to /var/log/messages in /etc/rsyslogd.conf and giving rsyslod a SIGHUP may be helpful for capturing the messages. 4. In case I didn't fix the infinite interrupts problem for the TeVii S470: Before testing, blacklist the cx23885 module in /etc/modprobe.d/blacklist, so that when you reboot, the module doesn't automatically load. If your system seems to be very busy with inifinite interrupts upon cx23885 module load, stop testing (and let me know). Regards, Andy However, modprobe cx23885 card=3 and RC5 remote gives some events. cx25840 3-0044: IRQ Status: tsr rsr ror rby cx25840 3-0044: IRQ Enables: rse rte roe cx25840 3-0044: IR receiver hardware FIFO overrun cx25840 3-0044: AV Core IRQ status (exit): cx25840 3-0044: AV Core IRQ status (entry): ir cx25840 3-0044: IRQ Status: tsr rsr ror rby cx25840 3-0044: IRQ Enables: rse rte roe cx25840 3-0044: IR receiver hardware FIFO overrun cx25840 3-0044: AV Core IRQ status (exit): cx25840 3-0044: AV Core IRQ status (entry): ir cx25840 3-0044: IRQ Status: tsr rsr rby cx25840 3-0044: IRQ Enables: rse rte roe cx25840 3-0044: AV Core IRQ status (exit): cx25840 3-0044: AV Core IRQ status (entry): ir cx25840 3-0044: IRQ Status: tsr rsr ror rby cx25840 3-0044: IRQ Enables: rse rte roe cx25840 3-0044: IR receiver hardware FIFO overrun cx25840 3-0044: AV Core IRQ status (exit): cx25840 3-0044: AV Core IRQ status (entry): ir cx25840 3-0044: IRQ Status: tsr rsr rto cx25840 3-0044: IRQ Enables: rse rte roe cx25840 3-0044: AV Core IRQ status (exit): cx25840 3-0044: rx read:1605444 ns space cx25840 3-0044: rx read:1748852 ns mark cx25840 3-0044: rx read:1618778 ns space cx25840 3-0044: rx read:1713000 ns mark cx25840 3-0044: rx read: end of rx cx25840 3-0044: AV Core IRQ status (entry): ir cx25840 3-0044: IRQ Status: tsr rsr rto ror cx25840 3-0044: IRQ Enables: rse rte roe cx25840 3-0044: IR receiver hardware FIFO overrun cx25840 3-0044: AV Core IRQ status (exit): cx25840 3-0044: rx read: 779667 ns space cx25840 3-0044: rx read:1737741 ns mark cx25840 3-0044: rx read:1618630 ns space cx25840 3-0044: rx read:1737593 ns mark cx25840 3-0044: rx read:1618630 ns space cx25840 3-0044: rx read:1738481 ns mark cx25840 3-0044: rx read:1617889 ns space cx25840 3-0044: rx read:1738926 ns mark cx25840 3-0044: AV Core IRQ status (entry): ir cx25840 3-0044: IRQ Status: tsr rsr rto ror cx25840 3-0044: IRQ Enables: rse rte roe cx25840 3-0044: IR receiver hardware FIFO overrun -- Igor M. Liplianin Microsoft Windows Free Zone - Linux used for all Computing Tasks -- To unsubscribe from this list: send the line unsubscribe linux-media in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: Need testers: cx23885 IR Rx for TeVii S470 and HVR-1250
On 16 января 2010 06:02:41 Andy Walls wrote: Hi, I've got reworked changes for the IR for the TeVii S470 and the HVR-1250 at http://linuxtv.org/hg/~awalls/cx23885-ir2 Thanks to loaner HVR-1250 hardware from Devin Heitmueller, I've solved the infinite interrupt problem with the CX23885 AV core and have reworked the change set against the latest v4l-dvb. Please test. Note 1. the parameters for the IR controller setup in linux/drivers/video/cx23885-input.c may need to be tweaked to set the proper params.modulation and params.invert_level before you get keypresses decoded. It works properly with settings params.modulation = false; params.invert_level = true; But after couple seconds :( cx25840 3-0044: IRQ Status: tsr rsr rto cx25840 3-0044: IRQ Enables: rse rte roe cx25840 3-0044: rx read:9046778 ns mark cx25840 3-0044: rx read:2206333 ns space cx25840 3-0044: rx read: 606926 ns mark cx25840 3-0044: rx read: end of rx cx25840 3-0044: IRQ Status: tsr rsr rto cx25840 3-0044: IRQ Enables: rse rte roe cx25840 3-0044: rx read:9055815 ns mark cx25840 3-0044: rx read:2203519 ns space cx25840 3-0044: rx read: 582481 ns mark cx25840 3-0044: rx read: end of rx irq 16: nobody cared (try booting with the irqpoll option) Pid: 2971, comm: X Not tainted 2.6.33-rc4 #3 Call Trace: [c1054700] ? __report_bad_irq+0x24/0x69 [c1054707] ? __report_bad_irq+0x2b/0x69 [c105482c] ? note_interrupt+0xe7/0x13f [c1054d66] ? handle_fasteoi_irq+0x7a/0x97 [c1003e80] ? handle_irq+0x38/0x40 [c10036d8] ? do_IRQ+0x38/0x8e [c1002ca9] ? common_interrupt+0x29/0x30 [c109cb00] ? __pollwait+0x76/0xa5 [c13d4000] ? unix_poll+0x14/0x89 [c137c496] ? sock_poll+0xc/0xe [c109c4ff] ? do_select+0x2a1/0x42d [c109ca8a] ? __pollwait+0x0/0xa5 [c109cb2f] ? pollwake+0x0/0x65 [c109cb2f] ? pollwake+0x0/0x65 [c109cb2f] ? pollwake+0x0/0x65 [c109cb2f] ? pollwake+0x0/0x65 [c109cb2f] ? pollwake+0x0/0x65 [c109cb2f] ? pollwake+0x0/0x65 [c109cb2f] ? pollwake+0x0/0x65 [c109cb2f] ? pollwake+0x0/0x65 [c109cb2f] ? pollwake+0x0/0x65 [c109cb2f] ? pollwake+0x0/0x65 [c109cb2f] ? pollwake+0x0/0x65 [c109cb2f] ? pollwake+0x0/0x65 [c109cb2f] ? pollwake+0x0/0x65 [c109cb2f] ? pollwake+0x0/0x65 [c109cb2f] ? pollwake+0x0/0x65 [c109cb2f] ? pollwake+0x0/0x65 [c109cb2f] ? pollwake+0x0/0x65 [c109cb2f] ? pollwake+0x0/0x65 [c109c7f0] ? core_sys_select+0x165/0x21b [f8cb0318] ? i915_gem_object_set_to_cpu_domain+0x2b/0xdb [i915] [f878535a] ? drm_ioctl+0x0/0x2a4 [drm] [c109ab89] ? vfs_ioctl+0x1c/0x7d [c109b13b] ? do_vfs_ioctl+0x4aa/0x4e5 [c1047341] ? ktime_get_ts+0xd3/0xdb [c109ca69] ? sys_select+0x6e/0x8f [c1425105] ? syscall_call+0x7/0xb handlers: [c1332132] (usb_hcd_irq+0x0/0x59) [f8aafd88] (cx23885_irq+0x0/0x4e0 [cx23885]) 2. I guessed at a reasonable set of remote keycodes for the TeVii S470, so don't be surprised if the button mapping isn't quite right. 3. These module settings may be helpful for debug and test: # modprobe cx25840 debug=2 ir_debug=2 # modprobe cx23885 debug=7 Also directing kern.* messages to /var/log/messages in /etc/rsyslogd.conf and giving rsyslod a SIGHUP may be helpful for capturing the messages. 4. In case I didn't fix the infinite interrupts problem for the TeVii S470: Before testing, blacklist the cx23885 module in /etc/modprobe.d/blacklist, so that when you reboot, the module doesn't automatically load. If your system seems to be very busy with inifinite interrupts upon cx23885 module load, stop testing (and let me know). Regards, Andy -- Igor M. Liplianin Microsoft Windows Free Zone - Linux used for all Computing Tasks -- To unsubscribe from this list: send the line unsubscribe linux-media in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: Need testers: cx23885 IR Rx for TeVii S470 and HVR-1250
On Sat, 2010-01-16 at 16:00 +0200, Igor M. Liplianin wrote: On 16 января 2010 06:02:41 Andy Walls wrote: Hi, I've got reworked changes for the IR for the TeVii S470 and the HVR-1250 at http://linuxtv.org/hg/~awalls/cx23885-ir2 Thanks to loaner HVR-1250 hardware from Devin Heitmueller, I've solved the infinite interrupt problem with the CX23885 AV core and have reworked the change set against the latest v4l-dvb. Please test. Note 1. the parameters for the IR controller setup in linux/drivers/video/cx23885-input.c may need to be tweaked to set the proper params.modulation and params.invert_level before you get keypresses decoded. It works properly with settings params.modulation = false; params.invert_level = true; Thanks. I have checked in a change the code for this. But after couple seconds :( cx25840 3-0044: IRQ Status: tsr rsr rto cx25840 3-0044: IRQ Enables: rse rte roe cx25840 3-0044: rx read:9046778 ns mark cx25840 3-0044: rx read:2206333 ns space cx25840 3-0044: rx read: 606926 ns mark cx25840 3-0044: rx read: end of rx cx25840 3-0044: IRQ Status: tsr rsr rto cx25840 3-0044: IRQ Enables: rse rte roe cx25840 3-0044: rx read:9055815 ns mark cx25840 3-0044: rx read:2203519 ns space cx25840 3-0044: rx read: 582481 ns mark cx25840 3-0044: rx read: end of rx This is still good. :) Those are NEC repeat sequences, but you probably know that already. irq 16: nobody cared (try booting with the irqpoll option) Pid: 2971, comm: X Not tainted 2.6.33-rc4 #3 Call Trace: [c1054700] ? __report_bad_irq+0x24/0x69 [...] [c1425105] ? syscall_call+0x7/0xb handlers: [c1332132] (usb_hcd_irq+0x0/0x59) [f8aafd88] (cx23885_irq+0x0/0x4e0 [cx23885]) I have checked in more changes to http://linuxtv.org/hg/~awalls/cx23885-ir2 Please test again using these module parameters: modprobe cx25840 ir_debug=2 debug=2 modprobe cx23885 ir_input_debug=2 irq_debug=7 debug=7 I am looking for logging of the interrupt statuses and enables. They should look something like this: kernel: cx23885[0]/0: pci_status: 0x0800 pci_mask: 0x0801 [...] kernel: cx23885[0]/0: (PCI_MSK_AV_CORE 0x0800) kernel: cx25840 6-0044: AV Core IRQ status (entry): ir kernel: cx25840 6-0044: AV Core ir IRQ status: 0x31 disables: 0x20 kernel: cx25840 6-0044: IR IRQ Status: tsr rsr rto kernel: cx25840 6-0044: IR IRQ Enables: rse rte roe kernel: cx25840 6-0044: AV Core audio IRQ status: 0x80 disables: 0xff kernel: cx25840 6-0044: AV Core audio MC IRQ status: 0x2000 enables: 0x kernel: cx25840 6-0044: AV Core video IRQ status: 0x01a7 disables: 0x kernel: cx25840 6-0044: AV Core IRQ status (exit): But I was able to reproduce something like this when changing enable the TSR interrupt enables using v4l2-dbg to change the register manually: kernel: cx23885[0]/0: pci_status: 0x0830 pci_mask: 0x0801 [...] kernel: cx23885[0]/0: (PCI_MSK_AV_CORE 0x0800) kernel: cx25840 6-0044: AV Core IRQ status (entry): no irq flags (all 0's) kernel: cx25840 6-0044: AV Core ir IRQ status: 0x00 disables: 0x00 all 0's kernel: cx25840 6-0044: AV Core audio IRQ status: 0x00 disables: 0x00 all 0's kernel: cx25840 6-0044: AV Core audio MC IRQ status: 0x enables: 0x all 0's kernel: cx25840 6-0044: AV Core video IRQ status: 0x disables: 0x all 0's kernel: cx25840 6-0044: AV Core IRQ status (exit): So there are some conditions where the AV Core can signal an interrupt, but not be ready to be read over the I2C bus. I have added code to count when these happen and handle them as spurious interrupts. However, if the code gets too many (20) consecutive spurious interrupts without at least one real one, it disables the AV Core interrupt. Regards, Andy -- To unsubscribe from this list: send the line unsubscribe linux-media in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: Need testers: cx23885 IR Rx for TeVii S470 and HVR-1250
On 16 января 2010 21:55:52 Andy Walls wrote: cx25840 3-0044: IRQ Status: tsr rsr rto cx25840 3-0044: IRQ Enables: rse rte roe cx25840 3-0044: rx read:9046778 ns mark cx25840 3-0044: rx read:2206333 ns space cx25840 3-0044: rx read: 606926 ns mark cx25840 3-0044: rx read: end of rx cx25840 3-0044: IRQ Status: tsr rsr rto cx25840 3-0044: IRQ Enables: rse rte roe cx25840 3-0044: rx read:9055815 ns mark cx25840 3-0044: rx read:2203519 ns space cx25840 3-0044: rx read: 582481 ns mark cx25840 3-0044: rx read: end of rx This is still good. :) Those are NEC repeat sequences, but you probably know that already. Remote works until that point irq 16: nobody cared (try booting with the irqpoll option) Pid: 2971, comm: X Not tainted 2.6.33-rc4 #3 Call Trace: [c1054700] ? __report_bad_irq+0x24/0x69 [...] [c1425105] ? syscall_call+0x7/0xb handlers: [c1332132] (usb_hcd_irq+0x0/0x59) [f8aafd88] (cx23885_irq+0x0/0x4e0 [cx23885]) I have checked in more changes to http://linuxtv.org/hg/~awalls/cx23885-ir2 Please test again using these module parameters: modprobe cx25840 ir_debug=2 debug=2 modprobe cx23885 ir_input_debug=2 irq_debug=7 debug=7 I am looking for logging of the interrupt statuses and enables. They should look something like this: kernel: cx23885[0]/0: pci_status: 0x0800 pci_mask: 0x0801 [...] kernel: cx23885[0]/0: (PCI_MSK_AV_CORE 0x0800) kernel: cx25840 6-0044: AV Core IRQ status (entry): ir kernel: cx25840 6-0044: AV Core ir IRQ status: 0x31 disables: 0x20 kernel: cx25840 6-0044: IR IRQ Status: tsr rsr rto kernel: cx25840 6-0044: IR IRQ Enables: rse rte roe kernel: cx25840 6-0044: AV Core audio IRQ status: 0x80 disables: 0xff kernel: cx25840 6-0044: AV Core audio MC IRQ status: 0x2000 enables: 0x kernel: cx25840 6-0044: AV Core video IRQ status: 0x01a7 disables: 0x kernel: cx25840 6-0044: AV Core IRQ status (exit): But I was able to reproduce something like this when changing enable the TSR interrupt enables using v4l2-dbg to change the register manually: kernel: cx23885[0]/0: pci_status: 0x0830 pci_mask: 0x0801 [...] kernel: cx23885[0]/0: (PCI_MSK_AV_CORE 0x0800) kernel: cx25840 6-0044: AV Core IRQ status (entry): no irq flags (all 0's) kernel: cx25840 6-0044: AV Core ir IRQ status: 0x00 disables: 0x00 all 0's kernel: cx25840 6-0044: AV Core audio IRQ status: 0x00 disables: 0x00 all 0's kernel: cx25840 6-0044: AV Core audio MC IRQ status: 0x enables: 0x all 0's kernel: cx25840 6-0044: AV Core video IRQ status: 0x disables: 0x all 0's kernel: cx25840 6-0044: AV Core IRQ status (exit): So there are some conditions where the AV Core can signal an interrupt, but not be ready to be read over the I2C bus. I have added code to count when these happen and handle them as spurious interrupts. However, if the code gets too many (20) consecutive spurious interrupts without at least one real one, it disables the AV Core interrupt. Regards, Andy Spurious interrupts counter reaches #20 almost immediately after modprobe. There is no time to press a key. DVB: registering adapter 0 frontend 0 (Montage Technology DS3000/TS2020)... cx23885_dev_checkrevision() Hardware revision = 0xb0 cx23885[0]/0: found at :01:00.0, rev: 2, irq: 16, latency: 0, mmio: 0xfe80 cx23885 :01:00.0: setting latency timer to 64 IRQ 16/cx23885[0]: IRQF_DISABLED is not guaranteed on shared IRQs cx23885[0]/0: pci_status: 0x083f4000 pci_mask: 0x0800 cx23885[0]/0: vida_status: 0x vida_mask: 0x count: 0x0 cx23885[0]/0: ts1_status: 0x ts1_mask: 0x count: 0x0 cx23885[0]/0: ts2_status: 0x ts2_mask: 0x count: 0xc7381f2a cx23885[0]/0: (PCI_MSK_AV_CORE 0x0800) cx25840 3-0044: AV Core IRQ status (entry): cx25840 3-0044: AV Core ir IRQ status: 0x00 disables: 0x00 cx25840 3-0044: AV Core audio IRQ status: 0x00 disables: 0x00 cx25840 3-0044: AV Core audio MC IRQ status: 0x enables: 0x cx25840 3-0044: AV Core video IRQ status: 0x disables: 0x cx25840 3-0044: AV Core IRQ status (exit): cx23885[0]/0: consecutive spurious AV Core interrupt #1 [...] cx23885[0]/0: pci_status: 0x08004000 pci_mask: 0x0800 cx23885[0]/0: vida_status: 0x vida_mask: 0x count: 0x0 cx23885[0]/0: ts1_status: 0x ts1_mask: 0x count: 0x0 cx23885[0]/0: ts2_status: 0x ts2_mask: 0x count: 0xc7381f2a cx23885[0]/0: (PCI_MSK_AV_CORE 0x0800) cx25840 3-0044: AV Core IRQ status (entry): cx25840 3-0044: AV Core ir IRQ status: 0x00 disables: 0x00 cx25840 3-0044: AV Core audio IRQ status: 0x00 disables: 0x00 cx25840 3-0044: AV Core audio MC IRQ status: 0x enables: 0x cx25840 3-0044: AV Core video IRQ status: 0x
Re: Need testers: cx23885 IR Rx for TeVii S470 and HVR-1250
On Sat, 2010-01-16 at 23:56 +0200, Igor M. Liplianin wrote: On 16 января 2010 21:55:52 Andy Walls wrote: cx25840 3-0044: IRQ Status: tsr rsr rto cx25840 3-0044: IRQ Enables: rse rte roe cx25840 3-0044: rx read:9046778 ns mark cx25840 3-0044: rx read:2206333 ns space cx25840 3-0044: rx read: 606926 ns mark cx25840 3-0044: rx read: end of rx cx25840 3-0044: IRQ Status: tsr rsr rto cx25840 3-0044: IRQ Enables: rse rte roe cx25840 3-0044: rx read:9055815 ns mark cx25840 3-0044: rx read:2203519 ns space cx25840 3-0044: rx read: 582481 ns mark cx25840 3-0044: rx read: end of rx This is still good. :) Those are NEC repeat sequences, but you probably know that already. Remote works until that point irq 16: nobody cared (try booting with the irqpoll option) Pid: 2971, comm: X Not tainted 2.6.33-rc4 #3 Call Trace: [c1054700] ? __report_bad_irq+0x24/0x69 [...] [c1425105] ? syscall_call+0x7/0xb handlers: [c1332132] (usb_hcd_irq+0x0/0x59) [f8aafd88] (cx23885_irq+0x0/0x4e0 [cx23885]) I have checked in more changes to http://linuxtv.org/hg/~awalls/cx23885-ir2 Please test again using these module parameters: modprobe cx25840 ir_debug=2 debug=2 modprobe cx23885 ir_input_debug=2 irq_debug=7 debug=7 I am looking for logging of the interrupt statuses and enables. They should look something like this: kernel: cx23885[0]/0: pci_status: 0x0800 pci_mask: 0x0801 [...] kernel: cx23885[0]/0: (PCI_MSK_AV_CORE 0x0800) kernel: cx25840 6-0044: AV Core IRQ status (entry): ir kernel: cx25840 6-0044: AV Core ir IRQ status: 0x31 disables: 0x20 kernel: cx25840 6-0044: IR IRQ Status: tsr rsr rto kernel: cx25840 6-0044: IR IRQ Enables: rse rte roe kernel: cx25840 6-0044: AV Core audio IRQ status: 0x80 disables: 0xff kernel: cx25840 6-0044: AV Core audio MC IRQ status: 0x2000 enables: 0x kernel: cx25840 6-0044: AV Core video IRQ status: 0x01a7 disables: 0x kernel: cx25840 6-0044: AV Core IRQ status (exit): But I was able to reproduce something like this when changing enable the TSR interrupt enables using v4l2-dbg to change the register manually: kernel: cx23885[0]/0: pci_status: 0x0830 pci_mask: 0x0801 [...] kernel: cx23885[0]/0: (PCI_MSK_AV_CORE 0x0800) kernel: cx25840 6-0044: AV Core IRQ status (entry): no irq flags (all 0's) kernel: cx25840 6-0044: AV Core ir IRQ status: 0x00 disables: 0x00 all 0's kernel: cx25840 6-0044: AV Core audio IRQ status: 0x00 disables: 0x00 all 0's kernel: cx25840 6-0044: AV Core audio MC IRQ status: 0x enables: 0x all 0's kernel: cx25840 6-0044: AV Core video IRQ status: 0x disables: 0x all 0's kernel: cx25840 6-0044: AV Core IRQ status (exit): So there are some conditions where the AV Core can signal an interrupt, but not be ready to be read over the I2C bus. I have added code to count when these happen and handle them as spurious interrupts. However, if the code gets too many (20) consecutive spurious interrupts without at least one real one, it disables the AV Core interrupt. Regards, Andy Spurious interrupts counter reaches #20 almost immediately after modprobe. There is no time to press a key. DVB: registering adapter 0 frontend 0 (Montage Technology DS3000/TS2020)... cx23885_dev_checkrevision() Hardware revision = 0xb0 cx23885[0]/0: found at :01:00.0, rev: 2, irq: 16, latency: 0, mmio: 0xfe80 cx23885 :01:00.0: setting latency timer to 64 IRQ 16/cx23885[0]: IRQF_DISABLED is not guaranteed on shared IRQs cx23885[0]/0: pci_status: 0x083f4000 pci_mask: 0x0800 cx23885[0]/0: vida_status: 0x vida_mask: 0x count: 0x0 cx23885[0]/0: ts1_status: 0x ts1_mask: 0x count: 0x0 cx23885[0]/0: ts2_status: 0x ts2_mask: 0x count: 0xc7381f2a cx23885[0]/0: (PCI_MSK_AV_CORE 0x0800) cx25840 3-0044: AV Core IRQ status (entry): cx25840 3-0044: AV Core ir IRQ status: 0x00 disables: 0x00 cx25840 3-0044: AV Core audio IRQ status: 0x00 disables: 0x00 cx25840 3-0044: AV Core audio MC IRQ status: 0x enables: 0x cx25840 3-0044: AV Core video IRQ status: 0x disables: 0x cx25840 3-0044: AV Core IRQ status (exit): cx23885[0]/0: consecutive spurious AV Core interrupt #1 [...] cx23885[0]/0: pci_status: 0x08004000 pci_mask: 0x0800 cx23885[0]/0: vida_status: 0x vida_mask: 0x count: 0x0 cx23885[0]/0: ts1_status: 0x ts1_mask: 0x count: 0x0 cx23885[0]/0: ts2_status: 0x ts2_mask: 0x count: 0xc7381f2a cx23885[0]/0: (PCI_MSK_AV_CORE 0x0800) cx25840 3-0044: AV Core IRQ status (entry): cx25840 3-0044: AV Core ir IRQ status: 0x00 disables: 0x00 cx25840
Need testers: cx23885 IR Rx for TeVii S470 and HVR-1250
Hi, I've got reworked changes for the IR for the TeVii S470 and the HVR-1250 at http://linuxtv.org/hg/~awalls/cx23885-ir2 Thanks to loaner HVR-1250 hardware from Devin Heitmueller, I've solved the infinite interrupt problem with the CX23885 AV core and have reworked the change set against the latest v4l-dvb. Please test. Note 1. the parameters for the IR controller setup in linux/drivers/video/cx23885-input.c may need to be tweaked to set the proper params.modulation and params.invert_level before you get keypresses decoded. 2. I guessed at a reasonable set of remote keycodes for the TeVii S470, so don't be surprised if the button mapping isn't quite right. 3. These module settings may be helpful for debug and test: # modprobe cx25840 debug=2 ir_debug=2 # modprobe cx23885 debug=7 Also directing kern.* messages to /var/log/messages in /etc/rsyslogd.conf and giving rsyslod a SIGHUP may be helpful for capturing the messages. 4. In case I didn't fix the infinite interrupts problem for the TeVii S470: Before testing, blacklist the cx23885 module in /etc/modprobe.d/blacklist, so that when you reboot, the module doesn't automatically load. If your system seems to be very busy with inifinite interrupts upon cx23885 module load, stop testing (and let me know). Regards, Andy -- To unsubscribe from this list: send the line unsubscribe linux-media in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html