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
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]