Re: ASUS My Cinema-P7131 Hybrid (saa7134) and slow IR
On 29/09/2010 23:03, Mauro Carvalho Chehab wrote: Em 29-09-2010 14:28, Mauro Carvalho Chehab escreveu: Em 29-09-2010 14:06, Giorgio escreveu: Hello, I have an Asus P7131 Hybrid card, and it works like a charm with Ubuntu 8.04 and stock kernel 2.6.24. But, after upgrading my system to Ubuntu 10.04 x86-64, I noticed that the remote control was quite slow to respond. Sometimes the keypresses aren't recognized, and you have to keep pressing the same button two or three times until it works. The remote feels slow, not very responsive. So, to investigate the issue, I loaded the ir-common module with debug=1 and looked at the logs. They report lots of ir-common: spurious timer_end. The funny thing is, I have tried the Ubuntu 10.04 i386 livecd (with the same kernel) and the problem is not present there. Sep 27 15:48:59 holden-desktop kernel: [ 256.770031] ir-common: spurious timer_end Sep 27 15:48:59 holden-desktop kernel: [ 256.880030] ir-common: spurious timer_end It is using the old RC support. This support will be removed soon, so, the better is to convert it to use the new IR core, and fix a bug there, if is there any. Understood. Please apply the attached patch (it is against my -git tree, but it will probably apply fine if you have a new kernel). Applied, and indeed I was able to collect all the scancodes I needed :) You should notice that the RC_MAP_ASUS_PC39 table is not ready for the new IR infrastructure. So, you'll need to enable ir-core debug, and check what scancodes are detected there. Probably, all we need is to add the RC5 address to all codes at the table. Done. Giorgio, Based on the pastebin you posted via IRC, this is likely the patch you need to also change your current keytable to work with the new RC core. Thanks to your help on IRC, I fixed the keytable, new patch below. Everything should work now, here's the log of my test: hol...@holden-desktop:~$ sudo modprobe -v saa7134 insmod /lib/modules/2.6.35.6-dvb1/kernel/drivers/media/video/tveeprom.ko insmod /lib/modules/2.6.35.6-dvb1/kernel/drivers/media/IR/ir-core.ko debug=1 insmod /lib/modules/2.6.35.6-dvb1/kernel/drivers/media/IR/ir-common.ko insmod /lib/modules/2.6.35.6-dvb1/kernel/drivers/media/video/videobuf-core.ko insmod /lib/modules/2.6.35.6-dvb1/kernel/drivers/media/video/videobuf-dma-sg.ko insmod /lib/modules/2.6.35.6-dvb1/kernel/drivers/media/video/v4l2-compat-ioctl32.ko insmod /lib/modules/2.6.35.6-dvb1/kernel/drivers/media/video/v4l1-compat.ko insmod /lib/modules/2.6.35.6-dvb1/kernel/drivers/media/video/videodev.ko insmod /lib/modules/2.6.35.6-dvb1/kernel/drivers/media/video/v4l2-common.ko install /sbin/modprobe --ignore-install saa7134 { /sbin/modprobe --quiet --use-blacklist saa7134-alsa ; : ; } insmod /lib/modules/2.6.35.6-dvb1/kernel/drivers/media/video/saa7134/saa7134.ko ir_debug=1 insmod /lib/modules/2.6.35.6-dvb1/kernel/drivers/media/video/saa7134/saa7134-alsa.ko index=-2 hol...@holden-desktop:~$ sudo modprobe -vr ir_sony_decoder ir_jvc_decoder ir_rc6_decoder ir_nec_decoder rmmod /lib/modules/2.6.35.6-dvb1/kernel/drivers/media/IR/ir-sony-decoder.ko rmmod /lib/modules/2.6.35.6-dvb1/kernel/drivers/media/IR/ir-jvc-decoder.ko rmmod /lib/modules/2.6.35.6-dvb1/kernel/drivers/media/IR/ir-rc6-decoder.ko rmmod /lib/modules/2.6.35.6-dvb1/kernel/drivers/media/IR/ir-nec-decoder.ko Sep 30 12:27:57 holden-desktop kernel: [ 1119.452985] IR NEC protocol handler initialized Sep 30 12:27:57 holden-desktop kernel: [ 1119.475713] IR RC5(x) protocol handler initialized Sep 30 12:27:57 holden-desktop kernel: [ 1119.479107] IR RC6 protocol handler initialized Sep 30 12:27:57 holden-desktop kernel: [ 1119.479344] Linux video capture interface: v2.00 Sep 30 12:27:57 holden-desktop kernel: [ 1119.489334] IR JVC protocol handler initialized Sep 30 12:27:57 holden-desktop kernel: [ 1119.496464] IR Sony protocol handler initialized Sep 30 12:27:57 holden-desktop kernel: [ 1119.521130] saa7130/34: v4l2 driver version 0.2.16 loaded Sep 30 12:27:57 holden-desktop kernel: [ 1119.521227] saa7133[0]: found at :02:07.0, rev: 209, irq: 20, latency: 64, mmio: 0xfbfff800 Sep 30 12:27:57 holden-desktop kernel: [ 1119.521234] saa7133[0]: subsystem: 1043:4876, board: ASUSTeK P7131 Hybrid [card=112,autodetected] Sep 30 12:27:57 holden-desktop kernel: [ 1119.521275] saa7133[0]: board init: gpio is 4 Sep 30 12:27:57 holden-desktop kernel: [ 1119.550016] Registered IR keymap rc-asus-pc39 Sep 30 12:27:57 holden-desktop kernel: [ 1119.550026] __ir_input_register: Allocated space for 64 keycode entries (512 bytes) Sep 30 12:27:57 holden-desktop kernel: [ 1119.550030] ir_do_setkeycode: #0: New scan 0x082a with key 0x000b Sep 30 12:27:57 holden-desktop kernel: [ 1119.550032] ir_do_setkeycode: #0: New scan 0x0816 with key 0x0002 Sep 30 12:27:57 holden-desktop kernel: [ 1119.550035] ir_do_setkeycode: #0: New scan 0x0812 with key 0x0003 Sep 30 12:27:57 holden-desktop kernel: [
ASUS My Cinema-P7131 Hybrid (saa7134) and slow IR
Hello, I have an Asus P7131 Hybrid card, and it works like a charm with Ubuntu 8.04 and stock kernel 2.6.24. But, after upgrading my system to Ubuntu 10.04 x86-64, I noticed that the remote control was quite slow to respond. Sometimes the keypresses aren't recognized, and you have to keep pressing the same button two or three times until it works. The remote feels slow, not very responsive. So, to investigate the issue, I loaded the ir-common module with debug=1 and looked at the logs. They report lots of ir-common: spurious timer_end. The funny thing is, I have tried the Ubuntu 10.04 i386 livecd (with the same kernel) and the problem is not present there. This is what lspci says about my card: hol...@holden-desktop:~$ sudo lspci -vvnn 02:07.0 Multimedia controller [0480]: Philips Semiconductors SAA7131/SAA7133/SAA7135 Video Broadcast Decoder [1131:7133] (rev d1) Subsystem: ASUSTeK Computer Inc. Device [1043:4876] Control: I/O- Mem+ BusMaster+ SpecCycle- MemWINV- VGASnoop- ParErr- Stepping- SERR+ FastB2B- DisINTx- Status: Cap+ 66MHz- UDF- FastB2B+ ParErr- DEVSEL=medium TAbort- TAbort- MAbort- SERR- PERR- INTx- Latency: 64 (21000ns min, 8000ns max) Interrupt: pin A routed to IRQ 20 Region 0: Memory at fbfff800 (32-bit, non-prefetchable) [size=2K] Capabilities: [40] Power Management version 2 Flags: PMEClk- DSI- D1+ D2+ AuxCurrent=0mA PME(D0-,D1-,D2-,D3hot-,D3cold-) Status: D0 PME-Enable- DSel=0 DScale=1 PME- Kernel driver in use: saa7134 Kernel modules: saa7134 And these are my tests so far: 1) First test: Ubuntu 10.04 x86_64, stock 2.6.32 kernel hol...@holden-desktop:~$ uname -a Linux holden-desktop 2.6.32-24-generic #43-Ubuntu SMP Thu Sep 16 14:58:24 UTC 2010 x86_64 GNU/Linux hol...@holden-desktop:~$ lsmod Module Size Used by saa7134_dvb26179 0 videobuf_dvb6203 1 saa7134_dvb dvb_core 102993 1 videobuf_dvb saa7134_alsa 12370 0 saa7134 166706 2 saa7134_dvb,saa7134_alsa videobuf_dma_sg12370 3 saa7134_dvb,saa7134_alsa,saa7134 videobuf_core 19301 3 videobuf_dvb,saa7134,videobuf_dma_sg tveeprom 13882 1 saa7134 ir_common 43415 1 saa7134 binfmt_misc 7960 1 ppdev 6375 0 tda1004x 16962 1 tda827x10532 2 snd_intel8x0 31155 2 snd_ac97_codec125394 1 snd_intel8x0 ac97_bus1450 1 snd_ac97_codec tda829014720 1 snd_pcm_oss41394 0 snd_mixer_oss 16299 1 snd_pcm_oss snd_pcm87882 4 saa7134_alsa,snd_intel8x0,snd_ac97_codec,snd_pcm_oss snd_seq_dummy 1782 0 tuner 23256 1 snd_seq_oss31219 0 snd_seq_midi5829 0 snd_rawmidi23420 1 snd_seq_midi snd_seq_midi_event 7267 2 snd_seq_oss,snd_seq_midi snd_seq57481 6 snd_seq_dummy,snd_seq_oss,snd_seq_midi,snd_seq_midi_event snd_timer 23649 2 snd_pcm,snd_seq nvidia 8096262 24 v4l2_common18357 2 saa7134,tuner videodev 40518 3 saa7134,tuner,v4l2_common v4l1_compat15495 1 videodev v4l2_compat_ioctl3211956 1 videodev fbcon 39270 71 tileblit2487 1 fbcon font8053 1 fbcon bitblit 5811 1 fbcon softcursor 1565 1 bitblit snd_seq_device 6888 5 snd_seq_dummy,snd_seq_oss,snd_seq_midi,snd_rawmidi,snd_seq vga16fb12757 1 edac_core 45423 0 snd71187 15 saa7134_alsa,snd_intel8x0,snd_ac97_codec,snd_pcm_oss,snd_mixer_oss,snd_pcm,snd_seq_oss,snd_rawmidi,snd_seq,snd_timer,snd_seq_device vgastate9857 1 vga16fb soundcore 8052 1 snd psmouse64576 0 edac_mce_amd9278 0 serio_raw 4918 0 shpchp 33711 0 uli526x15646 0 snd_page_alloc 8500 2 snd_intel8x0,snd_pcm i2c_ali15x3 6046 0 i2c_ali1535 5665 0 k8temp 3912 0 i2c_ali1563 6362 0 lp 9336 0 parport37160 2 ppdev,lp floppy 63156 0 pata_ali 10636 2 Sep 27 15:46:41 holden-desktop kernel: [ 118.539638] saa7134 ALSA driver for DMA sound unloaded Sep 27 15:46:56 holden-desktop kernel: [ 133.916688] saa7130/34: v4l2 driver version 0.2.15 loaded Sep 27 15:46:56 holden-desktop kernel: [ 133.916839] saa7133[0]: found at :02:07.0, rev: 209, irq: 20, latency: 64, mmio: 0xfbfff800 Sep 27 15:46:56 holden-desktop kernel: [ 133.916850] saa7133[0]: subsystem: 1043:4876, board: ASUSTeK P7131 Hybrid [card=112,autodetected] Sep 27 15:46:56 holden-desktop kernel: [ 133.916880] saa7133[0]: board init: gpio is 4 Sep 27 15:46:56
Re: ASUS My Cinema-P7131 Hybrid (saa7134) and slow IR
Em 29-09-2010 14:06, Giorgio escreveu: Hello, I have an Asus P7131 Hybrid card, and it works like a charm with Ubuntu 8.04 and stock kernel 2.6.24. But, after upgrading my system to Ubuntu 10.04 x86-64, I noticed that the remote control was quite slow to respond. Sometimes the keypresses aren't recognized, and you have to keep pressing the same button two or three times until it works. The remote feels slow, not very responsive. So, to investigate the issue, I loaded the ir-common module with debug=1 and looked at the logs. They report lots of ir-common: spurious timer_end. The funny thing is, I have tried the Ubuntu 10.04 i386 livecd (with the same kernel) and the problem is not present there. Sep 27 15:48:59 holden-desktop kernel: [ 256.770031] ir-common: spurious timer_end Sep 27 15:48:59 holden-desktop kernel: [ 256.880030] ir-common: spurious timer_end It is using the old RC support. This support will be removed soon, so, the better is to convert it to use the new IR core, and fix a bug there, if is there any. Please apply the attached patch (it is against my -git tree, but it will probably apply fine if you have a new kernel). You should notice that the RC_MAP_ASUS_PC39 table is not ready for the new IR infrastructure. So, you'll need to enable ir-core debug, and check what scancodes are detected there. Probably, all we need is to add the RC5 address to all codes at the table. Cheers, Mauro --- saa7134: port Asus P7131 Hybrid to use the new rc-core Signed-off-by: Mauro Carvalho Chehab mche...@redhat.com diff --git a/drivers/media/video/saa7134/saa7134-input.c b/drivers/media/video/saa7134/saa7134-input.c index 52a1ee5..1bb813e 100644 --- a/drivers/media/video/saa7134/saa7134-input.c +++ b/drivers/media/video/saa7134/saa7134-input.c @@ -772,8 +772,10 @@ int saa7134_input_init1(struct saa7134_dev *dev) case SAA7134_BOARD_ASUSTeK_P7131_HYBRID_LNA: case SAA7134_BOARD_ASUSTeK_P7131_ANALOG: ir_codes = RC_MAP_ASUS_PC39; - mask_keydown = 0x004; - rc5_gpio = 1; + mask_keydown = 0x004; /* Enable GPIO18 line on both edges */ + mask_keyup = 0x004; + mask_keycode = 0x; + raw_decode = 1; break; case SAA7134_BOARD_ENCORE_ENLTV: case SAA7134_BOARD_ENCORE_ENLTV_FM: -- 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: ASUS My Cinema-P7131 Hybrid (saa7134) and slow IR
Em 29-09-2010 14:28, Mauro Carvalho Chehab escreveu: Em 29-09-2010 14:06, Giorgio escreveu: Hello, I have an Asus P7131 Hybrid card, and it works like a charm with Ubuntu 8.04 and stock kernel 2.6.24. But, after upgrading my system to Ubuntu 10.04 x86-64, I noticed that the remote control was quite slow to respond. Sometimes the keypresses aren't recognized, and you have to keep pressing the same button two or three times until it works. The remote feels slow, not very responsive. So, to investigate the issue, I loaded the ir-common module with debug=1 and looked at the logs. They report lots of ir-common: spurious timer_end. The funny thing is, I have tried the Ubuntu 10.04 i386 livecd (with the same kernel) and the problem is not present there. Sep 27 15:48:59 holden-desktop kernel: [ 256.770031] ir-common: spurious timer_end Sep 27 15:48:59 holden-desktop kernel: [ 256.880030] ir-common: spurious timer_end It is using the old RC support. This support will be removed soon, so, the better is to convert it to use the new IR core, and fix a bug there, if is there any. Please apply the attached patch (it is against my -git tree, but it will probably apply fine if you have a new kernel). You should notice that the RC_MAP_ASUS_PC39 table is not ready for the new IR infrastructure. So, you'll need to enable ir-core debug, and check what scancodes are detected there. Probably, all we need is to add the RC5 address to all codes at the table. Giorgio, Based on the pastebin you posted via IRC, this is likely the patch you need to also change your current keytable to work with the new RC core. Cheers, Mauro --- saa7134: port Asus P7131 Hybrid to use the new rc-core The rc map table were corrected thanks to Giorgio input. Thanks-to: Giorgio mywin...@gmail.com Signed-off-by: Mauro Carvalho Chehab mche...@redhat.com diff --git a/drivers/media/IR/keymaps/rc-asus-pc39.c b/drivers/media/IR/keymaps/rc-asus-pc39.c index 2aa068c..c39c892 100644 --- a/drivers/media/IR/keymaps/rc-asus-pc39.c +++ b/drivers/media/IR/keymaps/rc-asus-pc39.c @@ -20,56 +20,56 @@ static struct ir_scancode asus_pc39[] = { /* Keys 0 to 9 */ - { 0x15, KEY_0 }, - { 0x29, KEY_1 }, - { 0x2d, KEY_2 }, - { 0x2b, KEY_3 }, - { 0x09, KEY_4 }, - { 0x0d, KEY_5 }, - { 0x0b, KEY_6 }, - { 0x31, KEY_7 }, - { 0x35, KEY_8 }, - { 0x33, KEY_9 }, + { 0x0815, KEY_0 }, + { 0x0829, KEY_1 }, + { 0x082d, KEY_2 }, + { 0x082b, KEY_3 }, + { 0x0809, KEY_4 }, + { 0x080d, KEY_5 }, + { 0x080b, KEY_6 }, + { 0x0831, KEY_7 }, + { 0x0835, KEY_8 }, + { 0x0833, KEY_9 }, - { 0x3e, KEY_RADIO },/* radio */ - { 0x03, KEY_MENU }, /* dvd/menu */ - { 0x2a, KEY_VOLUMEUP }, - { 0x19, KEY_VOLUMEDOWN }, - { 0x37, KEY_UP }, - { 0x3b, KEY_DOWN }, - { 0x27, KEY_LEFT }, - { 0x2f, KEY_RIGHT }, - { 0x25, KEY_VIDEO },/* video */ - { 0x39, KEY_AUDIO },/* music */ + { 0x083e, KEY_RADIO }, /* radio */ + { 0x0803, KEY_MENU }, /* dvd/menu */ + { 0x082a, KEY_VOLUMEUP }, + { 0x0819, KEY_VOLUMEDOWN }, + { 0x0837, KEY_UP }, + { 0x083b, KEY_DOWN }, + { 0x0827, KEY_LEFT }, + { 0x082f, KEY_RIGHT }, + { 0x0825, KEY_VIDEO }, /* video */ + { 0x0839, KEY_AUDIO }, /* music */ - { 0x21, KEY_TV }, /* tv */ - { 0x1d, KEY_EXIT }, /* back */ - { 0x0a, KEY_CHANNELUP },/* channel / program + */ - { 0x1b, KEY_CHANNELDOWN }, /* channel / program - */ - { 0x1a, KEY_ENTER },/* enter */ + { 0x0821, KEY_TV }, /* tv */ + { 0x081d, KEY_EXIT }, /* back */ + { 0x080a, KEY_CHANNELUP }, /* channel / program + */ + { 0x081b, KEY_CHANNELDOWN },/* channel / program - */ + { 0x081a, KEY_ENTER }, /* enter */ - { 0x06, KEY_PAUSE },/* play/pause */ - { 0x1e, KEY_PREVIOUS }, /* rew */ - { 0x26, KEY_NEXT }, /* forward */ - { 0x0e, KEY_REWIND }, /* backward */ - { 0x3a, KEY_FASTFORWARD }, /* forward */ - { 0x36, KEY_STOP }, - { 0x2e, KEY_RECORD }, /* recording */ - { 0x16, KEY_POWER },/* the button that reads close */ + { 0x0806, KEY_PAUSE }, /* play/pause */ + { 0x081e, KEY_PREVIOUS }, /* rew */ + { 0x0826, KEY_NEXT }, /* forward */ + { 0x080e, KEY_REWIND }, /* backward */ + { 0x083a, KEY_FASTFORWARD },/* forward */ + { 0x0836, KEY_STOP }, + { 0x082e, KEY_RECORD }, /* recording */ + { 0x0816, KEY_POWER }, /* the button that reads close */ - { 0x11, KEY_ZOOM }, /* full screen