Dmitry Torokhov wrote: > On Wed, Dec 02, 2009 at 06:23:51PM -0200, Mauro Carvalho Chehab wrote: >> Dmitry Torokhov wrote: >>> On Wed, Dec 02, 2009 at 03:04:30PM -0500, Jarod Wilson wrote: >>>> On Dec 2, 2009, at 2:56 PM, Dmitry Torokhov wrote: >>>>> Now I understand that if 2 remotes send completely identical signals we >>>>> won't be able to separete them, but in cases when we can I think we >>>>> should. >>>> I don't have a problem with that, if its a truly desired feature. But >>>> for the most part, I don't see the point. Generally, you go from >>>> having multiple remotes, one per device (where "device" is your TV, >>>> amplifier, set top box, htpc, etc), to having a single universal >>>> remote that controls all of those devices. But for each device (IR >>>> receiver), *one* IR command set. The desire to use multiple distinct >>>> remotes with a single IR receiver doesn't make sense to me. Perhaps >>>> I'm just not creative enough in my use of IR. :) >>> Didn't Jon posted his example whith programmable remote pretending to be >>> several separate remotes (depending on the mode of operation) so that >>> several devices/applications can be controlled without interfering with >>> each other? >>> >> From what I understood, he is using the same physical remote, but creating >> different >> IR groups of keys on it, each group meant to be used by a different >> application. >> >> For such usage, some software will need to filter the scancode group and send >> them only for a certain application. This can be done easily by using lirc, >> purely in userspace. >> >> Another alternative (that will also work for multimedia keys on a keyboard) >> is >> to add a filtering subsystem at evdev that will send certain events for just >> certain >> PID's. > > They are the same key events (Lets's say KEY_PLAY) but one is supposed > to affect CD player while another DVD player application. Evdev will not > be able to distinguish them but if we had 2 separate devices then > applications could read from the one thet user assigned to them.
This is clear, but the point is that the two distinguish scancodes can (and, in practice, will) be generated by the same IR. For example, my Satellite IR produces two different sets of codes. if you press <SAT>, all keys you press after that will have the "sat" address. If you press <TV>, they'll get a different address. So, the needed feature is not to really distinguish two different IR's, but to allow to create groups of scancodes that will be directed to a distinct interface. I won't object about such interface, but the default should be to have just one interface and having all conversion applied to that interface. Maybe we can have a separate module for IR evdev filtering to fulfill this need. Basically, such module will get the events from one input interface and create an arbitrary number of evdev devices, and will apply different scancode->keycode tables for each different interfaces. I don't see why to limit the input interface to be IR. It can eventually be any input interface (bluetooth, keyboard, PS/3 control, Wii control, ...). Cheers, Mauro. -- 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