Re: cx88 remote control event device

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Jean,

Jean Delvare wrote:
> Hi Andrzej,
> 
> Last year, you submitted a fix for the cx88 remote control not behaving
> properly on some cards. The fix works fine for me and lets me use my
> remote control, and I am very grateful for this.
> 
> However, I have noticed (using powertop) that the cx88 driver is waking
> up the kernel 1250 times per second to handle the remote control. I
> understand that it is needed for proper operation when the remote
> control is in use. What I do not understand is why it still happens
> when nobody uses the remote control. Even when no application has the
> event device node opened, polling still happens.
> 
> Can't we have the cx88 driver poll the remote control only when the
> device node is opened? I believe this would save some power by allowing
> the CPU to stay in higher C states.

The IR can be used even when nobody is opening the /dev/video device, as
it is an input device that can be used to control other things, including
the start of the video application.

That's said, it makes sense to only enable the polling when the /dev/input/event 
device is opened. 

Btw, the same polling logic is also present on bttv and saa7134 drivers.

As I'm doing a large IR rework, with the addition of the IR core subsystem,
and the patch for handing the open/close is very simple, I've already wrote
a patch for saa7134, on my IR tree:
	http://git.linuxtv.org/mchehab/ir.git?a=commitdiff;h=2b1d3acdb48266f05b82923b8db06e6c7ada0c72

The change itself is very simple, although I've added some additional checks
to avoid the risk of having an IRQ while IR is disabled.

I have one cx88 board on my IR test machine (although I need to find the IR sensor for the
board I'm using there). If I find one that works, I'll try later to write a similar 
code to cx88.

-- 

Cheers,
Mauro

--
To unsubscribe from this list: send the line "unsubscribe linux-media" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Input]     [Video for Linux]     [Gstreamer Embedded]     [Mplayer Users]     [Linux USB Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]
  Powered by Linux