From: Mauro Carvalho Chehab <mchehab@redhat.com>
To: Rui Salvaterra <rsalvaterra@gmail.com>
Cc: "Ezequiel García" <elezegarcia@gmail.com>, linux-media@vger.kernel.org
Subject: Re: eMPIA EM2710 Webcam (em28xx) and LIRC
Date: Thu, 15 Mar 2012 11:39:41 -0300 [thread overview]
Message-ID: <4F61FF2D.6010505@redhat.com> (raw)
In-Reply-To: <CALjTZvZR=Mr-eSVwy=Wd8ToikAX9bG23NLARRw_K0scT-_YeCg@mail.gmail.com>
Em 15-03-2012 10:10, Rui Salvaterra escreveu:
> On 15 March 2012 10:42, Mauro Carvalho Chehab <mchehab@redhat.com> wrote:
>>
>> The em28xx module requires IR support from rc_core, as most em28xx devices
>> support it. It can be compiled without IR support, but, as the em28xx-input
>> is not on a separate module, and it contains some calls to rc_core functions
>> like rc_register_device, modprobe will load rc_core, and rc_core will load
>> the decoders, including lirc_dev.
>>
>> Those modules are small and won't be running if all you have are the webcams.
>> The optimization to not load those modules is not big, so nobody had time
>> yet to do it.
>>
>> Anyway, if you want to fix it, there are two possible approaches:
>>
>> 1) change rc_core to not load the IR decoders at load time, postponing it
>> to load only if a RC_DRIVER_IR_RAW device is registered via rc_register_device.
>>
>> A patch for it shouldn't be hard. All you need to do is to move ir_raw_init()
>> to rc_register_device() and add a logic there to call it for the first
>> raw device.
>>
>> With such patch, rc_core module will still be loaded.
>>
>> 2) change em28xx-input.c to be a separate module, called only when a device
>> has IR. It will need to have a logic similar to em28xx-dvb and em28xx-alsa
>> modules.
>>
>> It is not hard to write such patch, as most of the logic is already there,
>> but it is not as trivial as approach (1).
>>
>> It probably makes sense for both approaches (1) and (2), as not all boards
>> support "raw" devices. In the case of em28xx, there's no device using "raw"
>> mode, as the em28xx chips provide a hardware IR decoder. So, up to now, we
>> didn't find any em28xx device requiring a software decoder for IR.
>>
>> If you want to write patches for the above, they'll be welcome.
>>
>> I hope that helps.
>>
>> Regards,
>> Mauro
>
>
> Hi, Mauro
>
> I'm sorry for the late reply, I'm at work.
> Thanks a lot for the explanation. Such refactoring seems a bit out of
> my reach, for the time being (though apparently a nice opportunity to
> learn Git-fu, I'm intoxicated by CVS), but at least now I understand
> what is really happening.
> I may try and hack the code a bit and see what comes out, but don't
> wait for me, by all means. I only have a general idea of how the
> kernel works (I understand C, but stopped writing it about ten years
> ago, as I do Java for a living).
Take your time. As I said, a patch for (1) should be easy. So, if you're
interested on trying to do it, it is probably the best thing to start.
If you won't take it, it is likely that some day someone will do it,
but, as this is just a cleanup, the main developers won't likely
have time for doing it, as they're generally busy adding support for
new hardware.
Regards,
Mauro
>
>
> Thanks, once again,
>
> Rui Salvaterra
next prev parent reply other threads:[~2012-03-15 14:39 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-03-14 11:28 eMPIA EM2710 Webcam (em28xx) and LIRC Rui Salvaterra
2012-03-14 17:42 ` Ezequiel García
2012-03-14 18:47 ` Rui Salvaterra
2012-03-14 19:47 ` Ezequiel García
2012-03-15 0:28 ` Rui Salvaterra
2012-03-15 3:03 ` Ezequiel García
2012-03-15 10:42 ` Mauro Carvalho Chehab
2012-03-15 12:34 ` Frank Schäfer
2012-03-15 13:05 ` Mauro Carvalho Chehab
2012-03-16 22:18 ` Move em27xx/em28xx webcams to a gspca subdriver ? Frank Schäfer
2012-03-21 18:01 ` Frank Schäfer
2012-03-21 20:39 ` Mauro Carvalho Chehab
2012-03-15 13:10 ` eMPIA EM2710 Webcam (em28xx) and LIRC Rui Salvaterra
2012-03-15 14:39 ` Mauro Carvalho Chehab [this message]
2012-03-15 17:15 ` Ezequiel García
2012-03-15 17:37 ` Mauro Carvalho Chehab
2012-03-16 9:08 ` Rui Salvaterra
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4F61FF2D.6010505@redhat.com \
--to=mchehab@redhat.com \
--cc=elezegarcia@gmail.com \
--cc=linux-media@vger.kernel.org \
--cc=rsalvaterra@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.