Re: USB IR receivers and evdev

Vojtech Pavlik <[email protected]>
Newsgroups gmane.linux.usb.devel
Message-ID <[email protected]>
On Tue, Feb 13, 2007 at 11:44:35PM +0200, Ville Syrjälä wrote:

> > I poked around in what meager uinput doc I could find. It is not clear
> > if events fed into uinput appear on their own evdev device or if they
> > get merged into another stream.

uinput is designed to allow for creation of virtual input devices
controlled from userspace, indistinguishable from the real thing by
applications.

> A quick look at the code suggests that using write() + UI_DEV_CREATE 
> ioctl you can register an input device (which should appear as 
> /dev/input/eventX via udev). However it looks like you need a daemon 
> process per device since there is no 'add new device' ioctl and it uses 
> struct file to identify the device.

You need a new open() for each new device, not a separate process.

> > For sure there are two different styles of doing this:
> > 1) ir driver sends raw ir codes to user space, user space maps, sends
> > back via uinput
> > 2) load mapping table into driver and have driver directly generate evdev events
> 
> Maybe this could use the firmware loader.

Yes, both can work. 1) Generates more latency 2) Requires processing
done in the kernel

Latency probably isn't a big issue with IR (which is slow anyway), and I
don't know how complex the processing of the IR signals is.

> > Most IR units function as a blaster too, so the events have to go back
> > the other way too.

You currently can't send EV_KEY events in the other than usual direction
through the input core. But if there is a need, a way can be found to
implement that functionality.

-- 
Vojtech Pavlik
Director SuSE Labs

-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier.
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
[email protected]
To unsubscribe, use the last form field at:
https://lists.sourceforge.net/lists/listinfo/linux-usb-devel
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.