View unanswered posts    View active topics

All times are UTC - 6 hours





Post new topic Reply to topic  [ 1 post ] 
Print view Previous topic   Next topic  
Author Message
Search for:
PostPosted: Sun Nov 27, 2005 4:41 pm 
Offline
Joined: Thu Nov 17, 2005 9:23 am
Posts: 18
I have been struggling to get LIRC to work with a PCI serial card/adapter with multiple serial ports (two in my case).

Lirc_serial will recognize the receiver and lircd will start without any problems. However, as soon as I use irw or irrecord it will kill the lircd daemon and issue an IRQ busy error message in dmesg and var/log/messages.

Out of sheer frustration, I decided to take a hammer to lirc_serial and hack away and to my delight something work. I am posting it here for all those who may not have a serial port but want to use Lirc with one of these pci adapters and who may face the same IRQ busy problem.

Download and extract the lirc tarball and enable IRQ sharing in lirc_serial

Edit lirc-0.7.2/drivers/lirc_serial/lirc_serial.c with your favorite editor backup the original file first :D
Change the following lines..
Code:
line 160 -> 
"static int share irq = 0;" to "static int share irq = 0;"static int share_irq = 1;"


Code:
line 860 ->
"SA_INTERRUPT | (share_irq ? SA_SHIRQ:0)," to "SA_INTERRUPT | (share_irq ? SA_SHIRQ:1),"


Then compile lirc as usual selecting custom IRQ settings and filling out the port and irq for your card.

You can find your irq and port settings with

Code:
setserial -g /dev/ttyS*
and

don't forget to use setserial to prepare the port
Code:
setserial /dev/ttySX uart none irq ## io ##

where X is the number of your device and ## are the irq and port parameters

Make, make install and load with modprobe as usual.

Hope this helps someone.

PVR500

Note - I have not tested this extensively and but I have not observed any adverse effect of this hack...[/code]


Top
 Profile  
 

Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 1 post ] 


All times are UTC - 6 hours




Who is online

Users browsing this forum: No registered users and 14 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Jump to:  
Powered by phpBB® Forum Software © phpBB Group

Theme Created By ceyhansuyu