Em 02-12-2010 02:41, Dmitri Belimov escreveu: > Hi Stefan > >>>> Am 29.11.2010 09:44, schrieb Dmitri Belimov: >>>>> Hi >>>>> >>>>> I try add IR for our TV cards. >>>>> After my some changes IR is working. But when I remove USB stick >>>>> from USB port >>>> What has you change? >>> 1. Add vendor-specific init code for IR. >>> 2. Add vendor-specific key filter for IR. >>> 3. Add some code for show IR activity via power led >>> 4. Move TV card defines to header file. >>> >> work it also with TM6010_REQ07_RD8_IR_WAKEUP_SEL = 0xff and >> TM6010_REQ07_RD8_IR_WAKEUP_ADD = 0xff? > > It works > >> I think, this both values are >> setting the remote control address mask and so. And it is not good if >> we set individual remote controls (better one setting for all). > > The TV card must be controled only from own IR remotes not from other. > One for all may be with additional setting like other ir_table. Too much IR remotes usually in one home > much devices can do some tasks without key filter when you pressed a key. Yes, but users should be allowed to replace the IR tables, in order to do some advance usage. Hardcoding the IR address at the driver is a bad practice. I never tried to play with IR on tm5600/6000, but is there a way for it to output the command+address code? If not, then we'll probably need to add some logic to allow users to change the address. > >>>> Has it received keys? >>> Yes. I received keys, and can control any programm via lirc >>> >>>> Which protocol you it? >>> Our remotes has NEC protocol. >> Damn, has you values for rc5 protocols, any idea? > > IR_LEADER_CNT1 set 'b0xxxxxxx for RC5 > IR_LEADER_CNT0 'bxxxxxxxx > > This value depend from clock frequency and pulse period. > I found this value for RC5 and IR_PULSE_CNT > clock frequency 12MHz, pulse period 1.78ms > 1.78 * 12000 = 16'h21360 > clock frequency 30MHz, pulse period 1.78ms > 1.78 * 30000 = 16'h53400 > clock frequency 12MHz, pulse period 1.72ms > 1.72 * 12000 = 16'h20640 > > Try this value. > >>>> As >>>> I wrote that I haven't the right value for rc5 protocol, and nec >>>> protocol works, that I have tested. >>> IR over int works well. But I found two main problems: >>> 1. crash after remove >> has you test it with lastest git branch (for_v2.6.38)? > > I used > git checkout -b media-master linuxtv/staging/v.2.6.37 > but when kernel builded I get linux-image-2.6.35 Wrong branch. The latest development branch is staging/for_v2.6.38. > >>> 2. disable IR after start video/radio. Try solve this problem right >>> now. >> sorry, I don't understand that. > > See dmesg with my comments > > after modprobe tm6000 > [ 150.009123] usb 1-1: link qh0-00ff/f4fa0b00 start 0 [1/0 us] > [ 150.070012] Registered IR keymap rc-behold-columbus > [ 150.070160] input: tm5600/60x0 IR (tm6000 #0) as /class/input/input5 > [ 150.070217] rc0: tm5600/60x0 IR (tm6000 #0) as /class/rc/rc0 > [ 150.227066] usbcore: registered new interface driver tm6000 > [ 151.063914] tm6000: open called (dev=video0) > > press some keys > [ 168.703849] tm6000_ir_urb_received start > [ 168.703855] int_in ir urb received 08 86 08 86 > [ 169.586424] tm6000_ir_urb_received start > [ 169.586431] int_in ir urb received 04 86 04 86 > [ 170.009832] tm6000_ir_urb_received start > [ 170.009838] int_in ir urb received 04 86 04 86 > [ 170.344236] tm6000_ir_urb_received start > [ 170.344242] int_in ir urb received 01 86 01 86 > [ 170.711642] tm6000_ir_urb_received start > [ 170.711649] int_in ir urb received 02 86 02 86 > [ 171.082425] tm6000_ir_urb_received start > [ 171.082429] int_in ir urb received 00 86 00 86 > > start watch a TV > [ 214.446038] tm6000: open called (dev=video0) > [ 216.265019] xc5000: waiting for firmware upload (dvb-fe-xc5000-1.6.114.fw)... > [ 216.267055] xc5000: firmware read 12401 bytes. > [ 216.267057] xc5000: firmware uploading... > [ 222.942009] xc5000: firmware upload complete... > > try press a key > [ 224.137976] tm6000_ir_urb_received start > [ 224.137981] not ready > [ 224.138014] usb 1-1: unlink qh0-00ff/f4fa0b00 start 0 [1/0 us] > [ 224.138177] usb 1-1: link qh0-00ff/f4fa0b00 start 0 [1/0 us] > [ 224.138458] usb 1-1: unlink qh0-00ff/f4fa0b00 start 0 [1/0 us] > [ 224.139225] tm6000_ir_urb_received start > [ 224.139225] not ready > > IR over int die here > [ 224.139225] ehci_hcd 0000:00:1d.7: shutdown urb f4ee58c0 ep3in-intr > [ 224.155239] tm6000 tm6000_irq_callback :urb resubmit failed (error=-1) > [ 224.160990] tm6000 tm6000_irq_callback :urb resubmit failed (error=-1) > > With my best regards, Dmitry. > >>> I attched my diffs. >>> This file has some debug junk. >>> With my best regards, Dmitry. >>> >> Stefan Ringel -- To unsubscribe from this list: send the line "unsubscribe linux-media" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html