* Re: In-kernel IR remote control support [not found] <13134331.2018681226657305244.JavaMail.www@wwinf8303> @ 2008-11-14 17:37 ` Maxim Levitsky 0 siblings, 0 replies; 15+ messages in thread From: Maxim Levitsky @ 2008-11-14 17:37 UTC (permalink / raw) To: Emmanuel Fust; +Cc: linux-kernel Emmanuel Fust wrote: > Hi, > > >Christoph Bartelmus wrote: > >> Hi, > >> > >> on 12 Nov 08 at 14:39, J.R. Mauro wrote: > >> [...] > >>> On Wed, Nov 5, 2008 at 3:07 PM, Jon Smirl wrote: > >>>> On Wed, Nov 5, 2008 at 2:59 PM, J.R. Mauro wrote: > >>>>> On Wed, Nov 5, 2008 at 2:47 PM, Jon Smirl wrote: > >>>>>> New release of in-kernel IR support implementing evdev support. > The goal > >>>>>> of in-kernel IR is to integrate IR events into the evdev input event > >>>>>> queue and maintain ordering of events from all input devices. Still > >>>>>> looking for help with this project. > >> > >>>>> (Forgive me if this has already been asked or dealt with) > >> > >>>>> Have you contacted the LIRC developers? Is there any overlap between > >>>>> your projects? > >> > >>>> The LIRC people know about this. Pieces of the code are coming from > >>>> the LIRC source base and being reworked for kernel inclusion. > >> > >>> Great, it's nice to see there's cooperation. > >> > >> LOL. There's just a small omission from Jon's side... > >> Yes, LIRC people know about this. And Jon has a no-go from me. > >> > >> Decoding IR protocols in-kernel is the wrong way IMHO and this will > not be > >> supported by LIRC as long as I maintain LIRC. > >> It's simply not possible to decode all existing IR protocols and > LIRC just > >> stores the timing data for these protocols as-is without trying to > decode > >> them. With the in-kernel decoding approach these remotes cannot be > >> supported. I'm not willing to sacrifice the support for these even > though > >> they only consist of a very small fraction of remotes in use. > >+1 > > > >I agree completely. > >This way we can make lirc to recognize any remote. > > > >Don't yet have a general receiver, but when I have one, I would like > to use my remotes, > >and who knows what protocols they use... > > > > > >Best solution is to make new input layer message, a raw PCM data. > No, raw PCM data has nothing to do as an input layer message. Is is not > an input event. > > >or, you can even keep the daemon, but make it inject input events back > to input system. > > > Exactly as Jon designed it. Use the raw sysfs interface to get raw data > and inject input events back to input system. > > >The only think I don't like at all about lirc is that you need special > library to talk > > to it while I want remotes to be used as a keyboards. > > > >Btw, one can write a lirc client that does the above, but this is hackish. > > > >Some standard ir protocols can be decoded in kernel, but there should > be standard > > (not debug) way to do so in userspace. > > Call it raw instead of debug and you're done. Lircd will be the main if > not the only regular user of this raw interface. I was under impression that sysfs interface isn't fit for everyday use. Is it at least possible to receive a continuous stream of data? Then lets rename it to regular not debug interface. > > Jon did a wonderful jobs, it's thin, simple, clean and fit perfectly > with the input system. No more specialized libs. With a little work, > existing decoders could cover more than 70% the IR remotes. With more > engines, we could rapidly cover more than 95% of know IR protocols. A > simplified lircd could at any time cover the rest. Best regards, Maxim Levitsky > > Bests regards, > Emmanuel. > --- > > > > /Créez votre adresse <http://www.laposte.net> électronique > prenom.nom@laposte.net > 1 Go d'espace de stockage, anti-spam et anti-virus intégrés./ ^ permalink raw reply [flat|nested] 15+ messages in thread
[parent not found: <7f0c6fc9-556c-41a1-9750-ffb3455589ab@35g2000pry.googlegroups.com>]
* Re: In-kernel IR remote control support [not found] <7f0c6fc9-556c-41a1-9750-ffb3455589ab@35g2000pry.googlegroups.com> @ 2008-11-12 23:09 ` Christoph Bartelmus 2008-11-13 18:20 ` Maxim Levitsky 2008-11-15 11:58 ` Pavel Machek 0 siblings, 2 replies; 15+ messages in thread From: Christoph Bartelmus @ 2008-11-12 23:09 UTC (permalink / raw) To: linux-kernel; +Cc: jonsmirl, jrm8005 Hi, on 12 Nov 08 at 14:39, J.R. Mauro wrote: [...] > On Wed, Nov 5, 2008 at 3:07 PM, Jon Smirl <jonsm...@gmail.com> wrote: >> On Wed, Nov 5, 2008 at 2:59 PM, J.R. Mauro <jrm8...@gmail.com> wrote: >>> On Wed, Nov 5, 2008 at 2:47 PM, Jon Smirl <jonsm...@gmail.com> wrote: >>>> New release of in-kernel IR support implementing evdev support. The goal >>>> of in-kernel IR is to integrate IR events into the evdev input event >>>> queue and maintain ordering of events from all input devices. Still >>>> looking for help with this project. >>> (Forgive me if this has already been asked or dealt with) >>> Have you contacted the LIRC developers? Is there any overlap between >>> your projects? >> The LIRC people know about this. Pieces of the code are coming from >> the LIRC source base and being reworked for kernel inclusion. > Great, it's nice to see there's cooperation. LOL. There's just a small omission from Jon's side... Yes, LIRC people know about this. And Jon has a no-go from me. Decoding IR protocols in-kernel is the wrong way IMHO and this will not be supported by LIRC as long as I maintain LIRC. It's simply not possible to decode all existing IR protocols and LIRC just stores the timing data for these protocols as-is without trying to decode them. With the in-kernel decoding approach these remotes cannot be supported. I'm not willing to sacrifice the support for these even though they only consist of a very small fraction of remotes in use. Christoph ^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: In-kernel IR remote control support 2008-11-12 23:09 ` Christoph Bartelmus @ 2008-11-13 18:20 ` Maxim Levitsky 2008-11-15 11:58 ` Pavel Machek 1 sibling, 0 replies; 15+ messages in thread From: Maxim Levitsky @ 2008-11-13 18:20 UTC (permalink / raw) To: Christoph Bartelmus; +Cc: linux-kernel, jonsmirl, jrm8005 Christoph Bartelmus wrote: > Hi, > > on 12 Nov 08 at 14:39, J.R. Mauro wrote: > [...] >> On Wed, Nov 5, 2008 at 3:07 PM, Jon Smirl <jonsm...@gmail.com> wrote: >>> On Wed, Nov 5, 2008 at 2:59 PM, J.R. Mauro <jrm8...@gmail.com> wrote: >>>> On Wed, Nov 5, 2008 at 2:47 PM, Jon Smirl <jonsm...@gmail.com> wrote: >>>>> New release of in-kernel IR support implementing evdev support. The goal >>>>> of in-kernel IR is to integrate IR events into the evdev input event >>>>> queue and maintain ordering of events from all input devices. Still >>>>> looking for help with this project. > >>>> (Forgive me if this has already been asked or dealt with) > >>>> Have you contacted the LIRC developers? Is there any overlap between >>>> your projects? > >>> The LIRC people know about this. Pieces of the code are coming from >>> the LIRC source base and being reworked for kernel inclusion. > >> Great, it's nice to see there's cooperation. > > LOL. There's just a small omission from Jon's side... > Yes, LIRC people know about this. And Jon has a no-go from me. > > Decoding IR protocols in-kernel is the wrong way IMHO and this will not be > supported by LIRC as long as I maintain LIRC. > It's simply not possible to decode all existing IR protocols and LIRC just > stores the timing data for these protocols as-is without trying to decode > them. With the in-kernel decoding approach these remotes cannot be > supported. I'm not willing to sacrifice the support for these even though > they only consist of a very small fraction of remotes in use. +1 I agree completely. This way we can make lirc to recognize any remote. Don't yet have a general receiver, but when I have one, I would like to use my remotes, and who knows what protocols they use... Best solution is to make new input layer message, a raw PCM data. or, you can even keep the daemon, but make it inject input events back to input system. The only think I don't like at all about lirc is that you need special library to talk to it while I want remotes to be used as a keyboards. Btw, one can write a lirc client that does the above, but this is hackish. Some standard ir protocols can be decoded in kernel, but there should be standard (not debug) way to do so in userspace. Just my .02 cents, Best regards, Maxim Levitsky > > Christoph > -- > To unsubscribe from this list: send the line "unsubscribe linux-kernel" in > the body of a message to majordomo@vger.kernel.org > More majordomo info at http://vger.kernel.org/majordomo-info.html > Please read the FAQ at http://www.tux.org/lkml/ ^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: In-kernel IR remote control support 2008-11-12 23:09 ` Christoph Bartelmus 2008-11-13 18:20 ` Maxim Levitsky @ 2008-11-15 11:58 ` Pavel Machek 2008-11-15 16:10 ` J.R. Mauro 2008-11-23 9:14 ` Christoph Bartelmus 1 sibling, 2 replies; 15+ messages in thread From: Pavel Machek @ 2008-11-15 11:58 UTC (permalink / raw) To: Christoph Bartelmus; +Cc: linux-kernel, jonsmirl, jrm8005 On Thu 2008-11-13 00:09:00, Christoph Bartelmus wrote: > Hi, > > on 12 Nov 08 at 14:39, J.R. Mauro wrote: > [...] > > On Wed, Nov 5, 2008 at 3:07 PM, Jon Smirl <jonsm...@gmail.com> wrote: > >> On Wed, Nov 5, 2008 at 2:59 PM, J.R. Mauro <jrm8...@gmail.com> wrote: > >>> On Wed, Nov 5, 2008 at 2:47 PM, Jon Smirl <jonsm...@gmail.com> wrote: > >>>> New release of in-kernel IR support implementing evdev support. The goal > >>>> of in-kernel IR is to integrate IR events into the evdev input event > >>>> queue and maintain ordering of events from all input devices. Still > >>>> looking for help with this project. > > >>> (Forgive me if this has already been asked or dealt with) > > >>> Have you contacted the LIRC developers? Is there any overlap between > >>> your projects? > > >> The LIRC people know about this. Pieces of the code are coming from > >> the LIRC source base and being reworked for kernel inclusion. > > > Great, it's nice to see there's cooperation. > > LOL. There's just a small omission from Jon's side... > Yes, LIRC people know about this. And Jon has a no-go from me. > > Decoding IR protocols in-kernel is the wrong way IMHO and this will not be > supported by LIRC as long as I maintain LIRC. Time to fork lirc...? Can you elaborate? I don't see why IR remotes deserve special handling. I'd expect to just plug in the receiver and have it work as /dev/input/*. > It's simply not possible to decode all existing IR protocols and LIRC just > stores the timing data for these protocols as-is without trying to decode > them. With the in-kernel decoding approach these remotes cannot be > supported. I'm not willing to sacrifice the support for these even though > they only consist of a very small fraction of remotes in use. So you make it suck for everyone just because few obscure IR remotes. Perfect enemy of good, I'd say :-(. Can we merge the common ones into the kernel, while still keeping the obscure ones in userspace using uinput or something? I don't see why Jon's work bothers you. He's trying to do the right support for the common remotes. That seems like a net plus to me, and you can still keep the obscure ones in userland. -- (english) http://www.livejournal.com/~pavelmachek (cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html ^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: In-kernel IR remote control support 2008-11-15 11:58 ` Pavel Machek @ 2008-11-15 16:10 ` J.R. Mauro 2008-11-23 9:14 ` Christoph Bartelmus 1 sibling, 0 replies; 15+ messages in thread From: J.R. Mauro @ 2008-11-15 16:10 UTC (permalink / raw) To: Pavel Machek; +Cc: Christoph Bartelmus, linux-kernel, jonsmirl On Sat, Nov 15, 2008 at 6:58 AM, Pavel Machek <pavel@suse.cz> wrote: > On Thu 2008-11-13 00:09:00, Christoph Bartelmus wrote: >> Hi, >> >> on 12 Nov 08 at 14:39, J.R. Mauro wrote: >> [...] >> > On Wed, Nov 5, 2008 at 3:07 PM, Jon Smirl <jonsm...@gmail.com> wrote: >> >> On Wed, Nov 5, 2008 at 2:59 PM, J.R. Mauro <jrm8...@gmail.com> wrote: >> >>> On Wed, Nov 5, 2008 at 2:47 PM, Jon Smirl <jonsm...@gmail.com> wrote: >> >>>> New release of in-kernel IR support implementing evdev support. The goal >> >>>> of in-kernel IR is to integrate IR events into the evdev input event >> >>>> queue and maintain ordering of events from all input devices. Still >> >>>> looking for help with this project. >> >> >>> (Forgive me if this has already been asked or dealt with) >> >> >>> Have you contacted the LIRC developers? Is there any overlap between >> >>> your projects? >> >> >> The LIRC people know about this. Pieces of the code are coming from >> >> the LIRC source base and being reworked for kernel inclusion. >> >> > Great, it's nice to see there's cooperation. >> >> LOL. There's just a small omission from Jon's side... >> Yes, LIRC people know about this. And Jon has a no-go from me. >> >> Decoding IR protocols in-kernel is the wrong way IMHO and this will not be >> supported by LIRC as long as I maintain LIRC. > > Time to fork lirc...? > > Can you elaborate? I don't see why IR remotes deserve special > handling. I'd expect to just plug in the receiver and have it work as > /dev/input/*. > >> It's simply not possible to decode all existing IR protocols and LIRC just >> stores the timing data for these protocols as-is without trying to decode >> them. With the in-kernel decoding approach these remotes cannot be >> supported. I'm not willing to sacrifice the support for these even though >> they only consist of a very small fraction of remotes in use. > > So you make it suck for everyone just because few obscure IR > remotes. Perfect enemy of good, I'd say :-(. > > Can we merge the common ones into the kernel, while still keeping the > obscure ones in userspace using uinput or something? > > I don't see why Jon's work bothers you. He's trying to do the right > support for the common remotes. That seems like a net plus to me, and > you can still keep the obscure ones in userland. We manage to have both kernelspace and userspace USB drivers. I think that would be the right approach here, especially since whole classes of some remotes change model to model. Apple remotes are an example of this: you have to figure out what different signal each new model sends and it is really nice for the user to be able to do this and put it in a config file and not have to wait for the next kernel version. Finding the middle ground here is probably the sanest course. > > > -- > (english) http://www.livejournal.com/~pavelmachek > (cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html > ^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: In-kernel IR remote control support 2008-11-15 11:58 ` Pavel Machek 2008-11-15 16:10 ` J.R. Mauro @ 2008-11-23 9:14 ` Christoph Bartelmus 2008-11-23 18:01 ` Pavel Machek ` (2 more replies) 1 sibling, 3 replies; 15+ messages in thread From: Christoph Bartelmus @ 2008-11-23 9:14 UTC (permalink / raw) To: pavel; +Cc: jonsmirl, jrm8005, linux-kernel Hi Pavel, on 15 Nov 08 at 12:58, Pavel Machek wrote: [...] > On Thu 2008-11-13 00:09:00, Christoph Bartelmus wrote: >> Hi, >> >> on 12 Nov 08 at 14:39, J.R. Mauro wrote: >> [...] >>> On Wed, Nov 5, 2008 at 3:07 PM, Jon Smirl <jonsm...@gmail.com> wrote: >>>> On Wed, Nov 5, 2008 at 2:59 PM, J.R. Mauro <jrm8...@gmail.com> wrote: >>>>> On Wed, Nov 5, 2008 at 2:47 PM, Jon Smirl <jonsm...@gmail.com> wrote: >>>>>> New release of in-kernel IR support implementing evdev support. The >>>>>> goal of in-kernel IR is to integrate IR events into the evdev input >>>>>> event queue and maintain ordering of events from all input devices. >>>>>> Still looking for help with this project. >> >>>>> (Forgive me if this has already been asked or dealt with) >> >>>>> Have you contacted the LIRC developers? Is there any overlap between >>>>> your projects? >> >>>> The LIRC people know about this. Pieces of the code are coming from >>>> the LIRC source base and being reworked for kernel inclusion. >> >>> Great, it's nice to see there's cooperation. >> >> LOL. There's just a small omission from Jon's side... >> Yes, LIRC people know about this. And Jon has a no-go from me. >> >> Decoding IR protocols in-kernel is the wrong way IMHO and this will not be >> supported by LIRC as long as I maintain LIRC. > Time to fork lirc...? This wouldn't be a fork. It has nothing to do with how LIRC currently is working. > Can you elaborate? I don't see why IR remotes deserve special > handling. I'd expect to just plug in the receiver and have it work as > /dev/input/*. > >> It's simply not possible to decode all existing IR protocols and LIRC just >> stores the timing data for these protocols as-is without trying to decode >> them. With the in-kernel decoding approach these remotes cannot be >> supported. I'm not willing to sacrifice the support for these even though >> they only consist of a very small fraction of remotes in use. > So you make it suck for everyone just because few obscure IR > remotes. Perfect enemy of good, I'd say :-(. Watch your words. This is getting personal. Who is telling you that LIRC cannot work like simply plugging in the receiver and start using the remote? You can have LIRC setup to decode all common remote control protocols. It's just a matter of proper packaging and pre-configuration. You don't have to write a single line of code for this (I still have to add uinput support, though, which I probably would have done by now, if I weren't busy writing posts like this). > Can we merge the common ones into the kernel, while still keeping the > obscure ones in userspace using uinput or something? Why do you want to complicate things even more. When you have an obscure protocol, you have to use LIRC style kernel drivers anyway. Why not use them for all protocols if you need them anyway? Everyone seems to be so focussed on the input layer, that he does not even consider that it might not be the right approach for all cases. > I don't see why Jon's work bothers you. He's trying to do the right > support for the common remotes. That seems like a net plus to me, and > you can still keep the obscure ones in userland. Jon's code and the LIRC approach exclude each other. It does not make sense to have both in the kernel. There have been attempts to clean up LIRC code to be included in the kernel. The current discussion lessens my hope that this will happen anytime soon. The decision to include some IR support using the Linux input layer some time ago has forced *me* to add support for this in LIRC and explain to people why for some devices they need LIRC drivers, and for some they need the kernel drivers, and for other configurations they have to explicitly disable the kernel drivers and replace them by LIRC drivers, etc. I'm just telling you now, that I will not do this work again for the drivers in question. Christoph ^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: In-kernel IR remote control support 2008-11-23 9:14 ` Christoph Bartelmus @ 2008-11-23 18:01 ` Pavel Machek 2008-12-02 18:00 ` Christoph Bartelmus 2008-11-23 20:33 ` Jiri Kosina 2008-12-02 22:00 ` Gerd Hoffmann 2 siblings, 1 reply; 15+ messages in thread From: Pavel Machek @ 2008-11-23 18:01 UTC (permalink / raw) To: Christoph Bartelmus; +Cc: jonsmirl, jrm8005, linux-kernel Hi! > Who is telling you that LIRC cannot work like simply plugging in the > receiver and start using the remote? Well, I don't have to install special userland to make USB keyboard to work, and I don't see why remote controls should be different. > You can have LIRC setup to decode all common remote control protocols. > It's just a matter of proper packaging and pre-configuration. ...which distributions don't generally do because they avoid out-of-tree patches...? > > Can we merge the common ones into the kernel, while still keeping the > > obscure ones in userspace using uinput or something? > > Why do you want to complicate things even more. When you have an obscure > protocol, you have to use LIRC style kernel drivers anyway. Why not use > them for all protocols if you need them anyway? It is more complex in the obscure case, agreed; but the common case gets simpler and I believe tradeoff is worth it. > Everyone seems to be so focussed on the input layer, that he does not even > consider that it might not be the right approach for all cases. Remote controls do look like keyboards; that's why people want to use input layer. Unlike normal keyboards, 'tcpdump' or 'irdump' makes a lot of sense for remote controls, but so what? > > support for the common remotes. That seems like a net plus to me, and > > you can still keep the obscure ones in userland. > > Jon's code and the LIRC approach exclude each other. It does not make > sense to have both in the kernel. There have been attempts to clean up > LIRC code to be included in the kernel. The current discussion lessens my > hope that this will happen anytime soon. I don't see why we could not use Jon's code for common remotes decoded mostly by hw, and your code for the obscure cases. Pavel -- (english) http://www.livejournal.com/~pavelmachek (cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html ^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: In-kernel IR remote control support 2008-11-23 18:01 ` Pavel Machek @ 2008-12-02 18:00 ` Christoph Bartelmus 2008-12-03 8:25 ` Pavel Machek 0 siblings, 1 reply; 15+ messages in thread From: Christoph Bartelmus @ 2008-12-02 18:00 UTC (permalink / raw) To: pavel; +Cc: jonsmirl, jrm8005, linux-kernel Hi Pavel, on 23 Nov 08 at 19:01, Pavel Machek wrote: [...] >>> support for the common remotes. That seems like a net plus to me, and >>> you can still keep the obscure ones in userland. >> >> Jon's code and the LIRC approach exclude each other. It does not make >> sense to have both in the kernel. There have been attempts to clean up >> LIRC code to be included in the kernel. The current discussion lessens my >> hope that this will happen anytime soon. > I don't see why we could not use Jon's code for common remotes decoded > mostly by hw, and your code for the obscure cases. Ok, how about this: there's one common point in lirc_dev where all IR timing data is handled. Jon's code can grab the data at this point and feed it into its state machine. That way there's no need to change any of the existing drivers. And we all work together to get this stuff ready for inclusion into the kernel. Christoph ^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: In-kernel IR remote control support 2008-12-02 18:00 ` Christoph Bartelmus @ 2008-12-03 8:25 ` Pavel Machek 0 siblings, 0 replies; 15+ messages in thread From: Pavel Machek @ 2008-12-03 8:25 UTC (permalink / raw) To: Christoph Bartelmus; +Cc: jonsmirl, jrm8005, linux-kernel On Tue 2008-12-02 19:00:00, Christoph Bartelmus wrote: > Hi Pavel, > > on 23 Nov 08 at 19:01, Pavel Machek wrote: > [...] > >>> support for the common remotes. That seems like a net plus to me, and > >>> you can still keep the obscure ones in userland. > >> > >> Jon's code and the LIRC approach exclude each other. It does not make > >> sense to have both in the kernel. There have been attempts to clean up > >> LIRC code to be included in the kernel. The current discussion lessens my > >> hope that this will happen anytime soon. > > > I don't see why we could not use Jon's code for common remotes decoded > > mostly by hw, and your code for the obscure cases. > > Ok, how about this: > there's one common point in lirc_dev where all IR timing data is handled. > Jon's code can grab the data at this point and feed it into its state > machine. That way there's no need to change any of the existing drivers. > And we all work together to get this stuff ready for inclusion into the > kernel. Yes, that sounds sane. -- (english) http://www.livejournal.com/~pavelmachek (cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html ^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: In-kernel IR remote control support 2008-11-23 9:14 ` Christoph Bartelmus 2008-11-23 18:01 ` Pavel Machek @ 2008-11-23 20:33 ` Jiri Kosina 2008-11-23 22:28 ` Christoph Bartelmus 2008-12-02 22:00 ` Gerd Hoffmann 2 siblings, 1 reply; 15+ messages in thread From: Jiri Kosina @ 2008-11-23 20:33 UTC (permalink / raw) To: Christoph Bartelmus; +Cc: pavel, jonsmirl, jrm8005, linux-kernel On Sun, 23 Nov 2008, Christoph Bartelmus wrote: > You can have LIRC setup to decode all common remote control protocols. > It's just a matter of proper packaging and pre-configuration. You don't > have to write a single line of code for this (I still have to add uinput > support, though, which I probably would have done by now, if I weren't > busy writing posts like this). Just a question -- how much is the situation different to what we currently have for HID devices? For these, we currently have common code, that is able to handle all the "normal" devices by default, that are fully compliant with the HID standard. For the devices that don't behave that well, we have specialized drivers, that use all the generic HID infrastructure to handle the standard-compliant behavior of the device and allows the specialized drivers to implement only the parts that violate standard. It's pretty lightweight and seems to work well. Wouldn't this work also for LIRC drivers? -- Jiri Kosina SUSE Labs ^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: In-kernel IR remote control support 2008-11-23 20:33 ` Jiri Kosina @ 2008-11-23 22:28 ` Christoph Bartelmus 2008-11-23 22:58 ` Jon Smirl 0 siblings, 1 reply; 15+ messages in thread From: Christoph Bartelmus @ 2008-11-23 22:28 UTC (permalink / raw) To: jkosina; +Cc: jonsmirl, jrm8005, linux-kernel, pavel Hi, on 23 Nov 08 at 21:33, Jiri Kosina wrote: > On Sun, 23 Nov 2008, Christoph Bartelmus wrote: >> You can have LIRC setup to decode all common remote control protocols. >> It's just a matter of proper packaging and pre-configuration. You don't >> have to write a single line of code for this (I still have to add uinput >> support, though, which I probably would have done by now, if I weren't >> busy writing posts like this). > Just a question -- how much is the situation different to what we > currently have for HID devices? > > For these, we currently have common code, that is able to handle all the > "normal" devices by default, that are fully compliant with the HID > standard. > For the devices that don't behave that well, we have specialized drivers, > that use all the generic HID infrastructure to handle the > standard-compliant behavior of the device and allows the specialized > drivers to implement only the parts that violate standard. > > It's pretty lightweight and seems to work well. Wouldn't this work also > for LIRC drivers? No. Unlike with HID devices, with most IR receivers you can use any remote. In LIRC we write drivers for the receivers and don't care about the remote, which is handled in userspace. The suggested approach would move both receiver and remote handling into kernel space (actually only part of it because many receivers have userspace drivers, so both receiver and remote handling must be done in userspace anyway for these receivers). Christoph ^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: In-kernel IR remote control support 2008-11-23 22:28 ` Christoph Bartelmus @ 2008-11-23 22:58 ` Jon Smirl 0 siblings, 0 replies; 15+ messages in thread From: Jon Smirl @ 2008-11-23 22:58 UTC (permalink / raw) To: Christoph Bartelmus; +Cc: jkosina, jrm8005, linux-kernel, pavel On Sun, Nov 23, 2008 at 5:28 PM, Christoph Bartelmus <lirc@bartelmus.de> wrote: > Hi, > > on 23 Nov 08 at 21:33, Jiri Kosina wrote: >> On Sun, 23 Nov 2008, Christoph Bartelmus wrote: > >>> You can have LIRC setup to decode all common remote control protocols. >>> It's just a matter of proper packaging and pre-configuration. You don't >>> have to write a single line of code for this (I still have to add uinput >>> support, though, which I probably would have done by now, if I weren't >>> busy writing posts like this). > >> Just a question -- how much is the situation different to what we >> currently have for HID devices? >> >> For these, we currently have common code, that is able to handle all the >> "normal" devices by default, that are fully compliant with the HID >> standard. >> For the devices that don't behave that well, we have specialized drivers, >> that use all the generic HID infrastructure to handle the >> standard-compliant behavior of the device and allows the specialized >> drivers to implement only the parts that violate standard. >> >> It's pretty lightweight and seems to work well. Wouldn't this work also >> for LIRC drivers? > > No. Unlike with HID devices, with most IR receivers you can use any > remote. In LIRC we write drivers for the receivers and don't care about > the remote, which is handled in userspace. The suggested approach would > move both receiver and remote handling into kernel space (actually only > part of it because many receivers have userspace drivers, so both receiver > and remote handling must be done in userspace anyway for these receivers). Now that I've worked on this for a while, I'm moving towards putting all of the IR drivers in the kernel. Putting them in the kernel collects them in a single place where they can't get lost and they will be maintained on all archs. Sure you can write these drivers in user space too. But they are so small (10-20K), they are hardly noticeable in the kernel when compared to a 4MB Nvidia device driver. I'm also a big fan of using existing kernel interfaces and not building new ones. Evdev, sysfs and configfs can implement everything IR needs and all of them are pre-existing APIs. The code I'm post is not being marked for inclusion in the kernel. It is being posted RFC - request for comment. Various features aren't implement (repeat, more protocol engines, etc). There are bugs too. After I added configfs support I discovered that interrupt handling needs to be altered since configfs was being called from interrupt context and that;s not allowed. I'm traveling now and will fix it when I get back next week. I'd like to get some input on the general design but so far nobody have commented on the design. > > Christoph > -- Jon Smirl jonsmirl@gmail.com ^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: In-kernel IR remote control support 2008-11-23 9:14 ` Christoph Bartelmus 2008-11-23 18:01 ` Pavel Machek 2008-11-23 20:33 ` Jiri Kosina @ 2008-12-02 22:00 ` Gerd Hoffmann 2008-12-03 0:59 ` J.R. Mauro 2 siblings, 1 reply; 15+ messages in thread From: Gerd Hoffmann @ 2008-12-02 22:00 UTC (permalink / raw) To: Christoph Bartelmus; +Cc: pavel, jonsmirl, jrm8005, linux-kernel Hi, >> Can we merge the common ones into the kernel, while still keeping the >> obscure ones in userspace using uinput or something? > > Why do you want to complicate things even more. Reality check please. It already is that complicated. We have IR kernel drivers today. > The decision to include some IR support using the Linux input layer some > time ago has forced *me* to add support for this in LIRC and explain to > people why for some devices they need LIRC drivers, and for some they need > the kernel drivers, and for other configurations they have to explicitly > disable the kernel drivers and replace them by LIRC drivers, etc. The only way to get out of this situation long-term is to get advanced IR support into the mainline kernel. It doesn't matter how that actually looks like. Could be pretty much like todays lirc drivers. Could be some input layer extention for receiving/sending raw IR codes. Could be something completely different such as using the tty layer for that. That has to be discussed and agreed on. What *does* matter is being in mainline. lirc not being in mainline was *the* major reason for me to use the input layer to handle TV card IR support. Having a in-tree driver depending on a out-of-tree subsystem for IR is a major pain. It is certainly a good thing to have only *one* way to handle IR remotes. But the kernel side of that way *must* be in mainline. Everything else simply isn't going to fly. cheers, Gerd ^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: In-kernel IR remote control support 2008-12-02 22:00 ` Gerd Hoffmann @ 2008-12-03 0:59 ` J.R. Mauro 2008-12-03 9:30 ` Gerd Hoffmann 0 siblings, 1 reply; 15+ messages in thread From: J.R. Mauro @ 2008-12-03 0:59 UTC (permalink / raw) To: Gerd Hoffmann; +Cc: Christoph Bartelmus, pavel, jonsmirl, linux-kernel On Tue, Dec 2, 2008 at 5:00 PM, Gerd Hoffmann <kraxel@redhat.com> wrote: > Hi, > >>> Can we merge the common ones into the kernel, while still keeping the >>> obscure ones in userspace using uinput or something? >> >> Why do you want to complicate things even more. > > Reality check please. It already is that complicated. We have IR > kernel drivers today. > >> The decision to include some IR support using the Linux input layer some >> time ago has forced *me* to add support for this in LIRC and explain to >> people why for some devices they need LIRC drivers, and for some they need >> the kernel drivers, and for other configurations they have to explicitly >> disable the kernel drivers and replace them by LIRC drivers, etc. > > The only way to get out of this situation long-term is to get advanced > IR support into the mainline kernel. We at least need a unified place for drivers, or unified support for those drivers that must be put in userspace, a la usbfs and libusb. > > It doesn't matter how that actually looks like. Could be pretty much > like todays lirc drivers. Could be some input layer extention for > receiving/sending raw IR codes. Could be something completely different > such as using the tty layer for that. That has to be discussed and > agreed on. Agreed. And we need to make sure the discussion part actually happens because once a decision is made, it's hard to correct bad choices. I would think that an input layer extension would be best because, e.g. Apple remotes are changed around all the time and, while functioning the same and having the same form, they send very very slightly different codes, and I think we would want a way to keep this really flexible so we just update a quirks table or something to that effect. I don't know if we're already trying to do that (if we are, hooray, I'll go away now) but I think it's a good idea. > > What *does* matter is being in mainline. lirc not being in mainline was > *the* major reason for me to use the input layer to handle TV card IR > support. Having a in-tree driver depending on a out-of-tree subsystem > for IR is a major pain. > > It is certainly a good thing to have only *one* way to handle IR > remotes. But the kernel side of that way *must* be in mainline. > Everything else simply isn't going to fly. One way or a hybrid way to address everyone's concerns. I don't see why this has to be ALL kernel or ALL userspace. I would think it could be both and still be clean. > > cheers, > Gerd > > > ^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: In-kernel IR remote control support 2008-12-03 0:59 ` J.R. Mauro @ 2008-12-03 9:30 ` Gerd Hoffmann 0 siblings, 0 replies; 15+ messages in thread From: Gerd Hoffmann @ 2008-12-03 9:30 UTC (permalink / raw) To: J.R. Mauro; +Cc: Christoph Bartelmus, pavel, jonsmirl, linux-kernel Hi, >> The only way to get out of this situation long-term is to get advanced >> IR support into the mainline kernel. > > We at least need a unified place for drivers, or unified support for > those drivers that must be put in userspace, a la usbfs and libusb. That isn't good enougth. That unified place must be mainline (for the kernel stuff). Userland bits can continue to live in the lirc package, that isn't a problem. >> It is certainly a good thing to have only *one* way to handle IR >> remotes. But the kernel side of that way *must* be in mainline. >> Everything else simply isn't going to fly. > > One way or a hybrid way to address everyone's concerns. I don't see > why this has to be ALL kernel or ALL userspace. It hasn't to be all kernel or all userspace. But all kernel bits must be in mainline. > I would think it could > be both and still be clean. Sure. We can even support both ways in the very same driver. I'll grab a piece of hardware I know of as example: cx88-based TV cards: * The hardware gives you the raw IR samples. * The kernel takes them, decodes them and sends the input layer way to user. The remote bundled with the TV card works fine. Which is what probably 95% of the users need. * In theory you can decode *any* remote IR codes. In practice you can't because there is no way to get the raw IR samples to userspace where lircd can handle them. Ok, what are the options to fix the latter? * lirc would do the trick. Doesn't fly though due to cx88 being mainline and lirc (kernel drivers) being out-of-tree. * input layer extension for raw IR codes. Doesn't exist (yet?). * something completely different ... Then you can have cx88 register both within the input layer (for the bundled remote) and in the new raw-ir-codes subsystem. Someone (say lircd) opening the raw IR interface will make the in-kernel decoding stop. You are done ;) cheers, Gerd ^ permalink raw reply [flat|nested] 15+ messages in thread
end of thread, other threads:[~2008-12-03 9:31 UTC | newest]
Thread overview: 15+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <13134331.2018681226657305244.JavaMail.www@wwinf8303>
2008-11-14 17:37 ` In-kernel IR remote control support Maxim Levitsky
[not found] <7f0c6fc9-556c-41a1-9750-ffb3455589ab@35g2000pry.googlegroups.com>
2008-11-12 23:09 ` Christoph Bartelmus
2008-11-13 18:20 ` Maxim Levitsky
2008-11-15 11:58 ` Pavel Machek
2008-11-15 16:10 ` J.R. Mauro
2008-11-23 9:14 ` Christoph Bartelmus
2008-11-23 18:01 ` Pavel Machek
2008-12-02 18:00 ` Christoph Bartelmus
2008-12-03 8:25 ` Pavel Machek
2008-11-23 20:33 ` Jiri Kosina
2008-11-23 22:28 ` Christoph Bartelmus
2008-11-23 22:58 ` Jon Smirl
2008-12-02 22:00 ` Gerd Hoffmann
2008-12-03 0:59 ` J.R. Mauro
2008-12-03 9:30 ` Gerd Hoffmann
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox