From: Andy Walls on 2 Dec 2009 20:10 On Wed, 2009-12-02 at 14:55 -0500, Jarod Wilson wrote: > On Dec 2, 2009, at 2:33 PM, Mauro Carvalho Chehab wrote: > > > Dmitry Torokhov wrote: > >> > ... > >>>> (for each remote/substream that they can recognize). > >>> I'm assuming that, by remote, you're referring to a remote receiver (and not to > >>> the remote itself), right? > >> > >> If we could separate by remote transmitter that would be the best I > >> think, but I understand that it is rarely possible? > > > > IMHO, the better is to use a separate interface for the IR transmitters, > > on the devices that support this feature. There are only a few devices > > I'm aware of that are able to transmit IR codes. > > If I'm thinking clearly, there are only three lirc kernel drivers that > support transmit, lirc_mceusb, lirc_zilog and lirc_serial. The mceusb > driver was posted, so I won't rehash what it is here. The zilog driver > binds to a Zilog z80 microprocessor thingy (iirc) exposed via i2c, > found on many Hauppauge v4l/dvb devices (PVR-150, HVR-1600, HD-PVR, > etc). The serial driver is fairly self-explanatory as well. > > There are also a few userspace-driven devices that do transmit, but > I'm assuming they're (currently) irrelevant to this discussion. I've got the CX23888 integrated IR Rx done and Tx nearly done. I was waiting to see how kfifo and lirc_dev panned out before making the interface to userspace. The CX23885, CX23418, and CX2584x integrated IR is essentially the same. I hope to have CX23885 IR done by Christmas. Both of those IR devices are/will be encapsulated in a v4l2_subdevice object internally. I was going to write lirc_v4l glue between the v4l2_device/v4l2_subdev_ir_ops and lirc_dev. As for the the I2C chips, I was going to go back and encapsulate those in the v4l2_subdevice object as well, so then my notional lirc_v4l could pick those up too. The I2C subsystem only allows one binding to an I2C client address/name on a bus. So without some new glue like a notional lirc_v4l, it *may* be hard to share between ir-kbd-i2c and lirc_i2c and lirc_zilog. Regards, Andy -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo(a)vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
From: Andy Walls on 2 Dec 2009 20:30 On Wed, 2009-12-02 at 12:14 -0800, Dmitry Torokhov wrote: > On Wed, Dec 02, 2009 at 03:04:30PM -0500, Jarod Wilson wrote: > 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? There are a few features that can be used to distinguish remotes: 1. Carrier freq 2. Protocol (NEC, Sony, JVC, RC-5...) 3. Protocol variant (NEC original, NEC with extended addresses, RC-5, RC-5 with exteneded commands, RC-6 Mode 0, RC-6 Mode 6B, ...) 4. System # or Address sent by the remote (16 bits max, I think) 5. Set of possible Commands or Information words sent from the remote. 6. Pulse width deviation from standard (mean, variance) 1, 5, and 6 are really a sort of "fingerprint" and likely not worth the effort, even if you have hardware that can measure things with some accuracy. Regards, Andy -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo(a)vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
From: Mauro Carvalho Chehab on 2 Dec 2009 21:30 Jon Smirl wrote: > On Wed, Dec 2, 2009 at 3:04 PM, Jarod Wilson <jarod(a)wilsonet.com> wrote: >> On Dec 2, 2009, at 2:56 PM, Dmitry Torokhov wrote: >> >>> On Wed, Dec 02, 2009 at 02:22:18PM -0500, Jarod Wilson wrote: >>>> On 12/2/09 12:30 PM, Jon Smirl wrote: >>>>>>>> (for each remote/substream that they can recognize). >>>>>>>>> I'm assuming that, by remote, you're referring to a remote receiver (and not to >>>>>>>>> the remote itself), right? >>>>>>> If we could separate by remote transmitter that would be the best I >>>>>>> think, but I understand that it is rarely possible? >>>>> The code I posted using configfs did that. Instead of making apps IR >>>>> aware it mapped the vendor/device/command triplets into standard Linux >>>>> keycodes. Each remote was its own evdev device. >>>> Note, of course, that you can only do that iff each remote uses distinct >>>> triplets. A good portion of mythtv users use a universal of some sort, >>>> programmed to emulate another remote, such as the mce remote bundled >>>> with mceusb transceivers, or the imon remote bundled with most imon >>>> receivers. I do just that myself. >>>> >>>> Personally, I've always considered the driver/interface to be the >>>> receiver, not the remote. The lirc drivers operate at the receiver >>>> level, anyway, and the distinction between different remotes is made by >>>> the lirc daemon. >>> The fact that lirc does it this way does not necessarily mean it is the >>> most corerct way. >> No, I know that, I'm just saying that's how I've always looked at it, and that's how lirc does it right now, not that it must be that way. >> >>> Do you expect all bluetooth input devices be presented >>> as a single blob just because they happen to talk to the sane receiver >>> in yoru laptop? Do you expect your USB mouse and keyboard be merged >>> together just because they end up being serviced by the same host >>> controller? If not why remotes should be any different? >> A bluetooth remote has a specific device ID that the receiver has to pair with. Your usb mouse and keyboard each have specific device IDs. A usb IR *receiver* has a specific device ID, the remotes do not. So there's the major difference from your examples. > > Actually remotes do have an ID. They all transmit vendor/device pairs > which is exactly how USB works. > Well, the description of NEC and RC5 protocol at http://www.sbprojects.com/knowledge/ir/rc5.htm doesn't mention any vendor/device pair, nor I'm able to get them with the IR hardware decoders I have. Do you have any info on how they're encoded? Cheers, Mauro. -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo(a)vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
From: hermann pitton on 2 Dec 2009 21:40 Am Mittwoch, den 02.12.2009, 20:19 -0500 schrieb Andy Walls: > On Wed, 2009-12-02 at 12:14 -0800, Dmitry Torokhov wrote: > > On Wed, Dec 02, 2009 at 03:04:30PM -0500, Jarod Wilson wrote: > > > > 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? > > > There are a few features that can be used to distinguish remotes: > > 1. Carrier freq > 2. Protocol (NEC, Sony, JVC, RC-5...) > 3. Protocol variant (NEC original, NEC with extended addresses, > RC-5, RC-5 with exteneded commands, > RC-6 Mode 0, RC-6 Mode 6B, ...) > 4. System # or Address sent by the remote (16 bits max, I think) > 5. Set of possible Commands or Information words sent from the remote. > 6. Pulse width deviation from standard (mean, variance) > > > 1, 5, and 6 are really a sort of "fingerprint" and likely not worth the > effort, even if you have hardware that can measure things with some > accuracy. I don't follow closely enough, but eventually we have (different) remotes a receiver chip can distinguish in hardware, firmware might be involved too. If I don't get it wrong, Dmitry is asking in the first place, how such sender receiver combinations switch to different emulated digital information for a bunch of different types of hardware in living rooms. Starting with RC5, IIRC, there is of course such switch over to another device around. We are only one more. To repeat, on such bundled cheapest remotes with some TV/DVB cards around, there are only some minimal implementations of RC5, likely they use that protocol even illegally, at least they make chips in use unidentifiable and this seems to be by will. So, if some try to implement now the highest level, they are far away from to know what hardware goes how far with them. At least fun to see they have some starting point ;) Cheers, Hermann -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo(a)vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
From: Jon Smirl on 3 Dec 2009 00:10
On Wed, Dec 2, 2009 at 9:22 PM, Mauro Carvalho Chehab <mchehab(a)redhat.com> wrote: > Jon Smirl wrote: >> On Wed, Dec 2, 2009 at 3:04 PM, Jarod Wilson <jarod(a)wilsonet.com> wrote: >>> On Dec 2, 2009, at 2:56 PM, Dmitry Torokhov wrote: >>> >>>> On Wed, Dec 02, 2009 at 02:22:18PM -0500, Jarod Wilson wrote: >>>>> On 12/2/09 12:30 PM, Jon Smirl wrote: >>>>>>>>> (for each remote/substream that they can recognize). >>>>>>>>>> I'm assuming that, by remote, you're referring to a remote receiver (and not to >>>>>>>>>> the remote itself), right? >>>>>>>> If we could separate by remote transmitter that would be the best I >>>>>>>> think, but I understand that it is rarely possible? >>>>>> The code I posted using configfs did that. Instead of making apps IR >>>>>> aware it mapped the vendor/device/command triplets into standard Linux >>>>>> keycodes. �Each remote was its own evdev device. >>>>> Note, of course, that you can only do that iff each remote uses distinct >>>>> triplets. A good portion of mythtv users use a universal of some sort, >>>>> programmed to emulate another remote, such as the mce remote bundled >>>>> with mceusb transceivers, or the imon remote bundled with most imon >>>>> receivers. I do just that myself. >>>>> >>>>> Personally, I've always considered the driver/interface to be the >>>>> receiver, not the remote. The lirc drivers operate at the receiver >>>>> level, anyway, and the distinction between different remotes is made by >>>>> the lirc daemon. >>>> The fact that lirc does it this way does not necessarily mean it is the >>>> most corerct way. >>> No, I know that, I'm just saying that's how I've always looked at it, and that's how lirc does it right now, not that it must be that way. >>> >>>> Do you expect all bluetooth input devices be presented >>>> as a single blob just because they happen to talk to the sane receiver >>>> in yoru laptop? Do you expect your USB mouse and keyboard be merged >>>> together just because they end up being serviced by the same host >>>> controller? If not why remotes should be any different? >>> A bluetooth remote has a specific device ID that the receiver has to pair with. Your usb mouse and keyboard each have specific device IDs. A usb IR *receiver* has a specific device ID, the remotes do not. So there's the major difference from your examples. >> >> Actually remotes do have an ID. They all transmit vendor/device pairs >> which is exactly how USB works. >> > > Well, the description of NEC and RC5 protocol at http://www.sbprojects.com/knowledge/ir/rc5.htm > doesn't mention any vendor/device pair, nor I'm able to get them with the IR hardware decoders > I have. Some of the protocols were not intended to be multi-vendor - the vendor is implicit in the protocol encoding. You don't have to split the IR codes into vendor/device/command triplets. I just do that because it is convenient to think of them that way. It is equally valid to treat them as a 64b integers and use four bits of the int to encode the protocol. It should really be a quad protocol/vendor/device/command and some of the fields may be missing. Bottom line, you are looking for unique codes how the fields are split up doesn't really matter. A fixed protocol receiver is more of a challenge. You have to figure out how to make a universal remote transmit device codes for a device you don't already own that is also encoded in the protocol your hardware supports. There's nothing we can do about that problem in Linux, its a side effect of fixed protocol decode hardware. You're just going to have to start guessing devices in the remote until you find one that uses your fixed protocol and doesn't also activate the devices you own. We can put suggestions in the doc when working devices are discovered. With a universal receiver the problem is simpler, just pick a device you don't own - the encoding protocol doesn't matter. These are generic problems with IR that are the same no matter how things get implemented in Linux. -- Jon Smirl jonsmirl(a)gmail.com -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo(a)vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/ |