Re: LIRC patch for SAA7134 almost working with Cinergy 400 board, need a little help

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]



Hi,

Ole Andre Schistad wrote:
I've got this working to the point where irrecord is able to recognize my remote and record button presses from it, but unfortunately it seems to be reading the wrong register when it does the recording. I did a tail /var/log/messages while recording button presses, and this is the output I got (interlaced with output from irrecord):

<CODE>
Jun 24 16:27:09 phun saa7134[0]/irq[0,993954]: r=0x8000 s=0x00 GPIO18
Jun 24 16:27:09 phun lirc_saa7134 (0): gpio_val is 5000a
Jun 24 16:27:09 phun lirc_saa7134 (0): extracted code is 0

Found gap length: 433508
Now enter the names for the buttons.

Please enter the name for the next button (press <ENTER> to finish recording)
POWER

Now hold down button "POWER".
Jun 24 16:28:01 phun saa7134[0]/irq[0,1004455]: r=0x8000 s=0x00 GPIO18
Jun 24 16:28:01 phun lirc_saa7134 (0): gpio_val is 5000a
Jun 24 16:28:01 phun lirc_saa7134 (0): extracted code is 0
Jun 24 16:28:02 phun saa7134[0]/irq[0,1004522]: r=0x8000 s=0x00 GPIO18
Jun 24 16:28:02 phun lirc_saa7134 (0): gpio_val is 5000a
Jun 24 16:28:02 phun lirc_saa7134 (0): extracted code is 0

Please enter the name for the next button (press <ENTER> to finish recording)
APP

Now hold down button "APP".
Jun 24 16:33:36 phun saa7134[0]/irq[0,1071417]: r=0x8000 s=0x00 GPIO18
Jun 24 16:33:36 phun lirc_saa7134 (0): gpio_val is 5000b
Jun 24 16:33:36 phun lirc_saa7134 (0): extracted code is 0
Jun 24 16:33:37 phun saa7134[0]/irq[0,1071484]: r=0x8000 s=0x00 GPIO18
Jun 24 16:33:37 phun lirc_saa7134 (0): gpio_val is 5000b
Jun 24 16:33:37 phun lirc_saa7134 (0): extracted code is 0

</CODE>

It is reading the raw GPIO value fine, but it is not extracting the remote control code properly. It looks like the gpio_mask could be wrong for your card (in rcv_infos[] in lirc_saa7134.c). I worked it out as being 0x3F.

If you get it to work, email it to me, as I wasn't able to get irqs to work for that card.

- David.


The resulting lircd.conf looks like this:


begin remote

 name  /tmp/cinergy.lirc
 bits            0
 eps            30
 aeps          100

 one             0     0
 zero            0     0
 pre_data_bits   42
 pre_data       0x1A1F2F00FF
 gap          433508
 toggle_bit      0


     begin codes
         POWER                    0x0000000000000000
         APP                      0x0000000000000000
     end codes

end remote



Now, as you can see, the lirc driver itself is able to distinguish between the two keys I tried to program, ie one has a GPIO_VAL of 5000a and the other gets 5000b, but it winds up being interpreted as the same key on all counts. After loading this config into lircd, all keys are recognized as POWER, ie the first in the list with an id of 0x0000000000000000.

Clearly there's very little to keep this from being a working driver for my card, but I am not enough of a C coder to fix it myself so I am hoping that the author (David Atkinson) or someone on this list will be able to help fix this.


The patch I'm using can be found on at http://users.tpg.com.au/atko/gpf/ir/ , called irfiles-20030610.tar.gz <http://users.tpg.com.au/atko/gpf/ir/files/irfiles-20030610.tar.gz> - Trial support for Cinergy 400.

This patch did not work when I downloaded the newest snapshot of the saa7134 driver (ie 0.2.8) but on reverting to 0.2.7 it went quite smoothly and gave the results as described.

In advance thanks,

Ole Andre


--
video4linux-list mailing list
Unsubscribe mailto:video4linux-list-request@xxxxxxxxxx?subject=unsubscribe
https://www.redhat.com/mailman/listinfo/video4linux-list

.







[Index of Archives]     [Linux DVB]     [Video Disk Recorder]     [Asterisk]     [Photo]     [DCCP]     [Netdev]     [Xorg]     [Util Linux NG]     [Xfree86]     [Free Photo Albums]     [Fedora Users]     [Fedora Women]     [ALSA Users]     [ALSA Devel]     [Linux USB]

Powered by Linux