Re: The restricted number (LIRCBUF_SIZE) of pulse-spaces in IR sequences is too small

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

 



Dear Takashi Kanamaru,

On Wed, Jun 12, 2019 at 11:08:34PM +0900, Takashi Kanamaru wrote:
> Dear all,
> 
> When using kernel 4.19.X and sending IR commands with LIRC,
> the number of  pulse-spaces of IR sequence is restricted to be smaller than 256.
> 
> In kernel 4.19, this restriction is caused by the following line in
> media/rc/lirc_dev.c,
> which did not exist kernel 4.14.
> https://github.com/torvalds/linux/blob/v4.19/drivers/media/rc/lirc_dev.c

Indeed this file did not exist in 4.14. In 4.14, it was called:

https://github.com/torvalds/linux/blob/v4.14/drivers/media/rc/ir-lirc-codec.c

> #define LIRCBUF_SIZE 256
> 
> An IR sequences of a remote controller of my air conditioner has 439
> pulse-spaces
> with about 250ms duration, so, it cannot be sent with kernel 4.19.

There are a lot of IR drivers/hardware that can send more than 256
pulse/spaces. This limit exists in rc-core because it was always there;
however some old lirc drivers did not have a limit.

I don't see any reason why it can't be increased. For the record, it would
be interesting to know what your air conditioner model is and what the
IR signal looks like. I have not seen such a signal before.

> The max duration of IR sequence is detemined as 500ms by IR_MAX_DURATION.
> Therefore,  I think signals with about 1000 pulse-spaces should be allowed.
> 
> So, could you please set LIRCBUF_SIZE to the value 1024?

I don't see any reason not to.

> I built a kernel 4.19.46 with LIRCBUF_SIZE=1024,
> and I confirmed that IR sequences  with 439 pulse-spaces
> could be sent correctly.

That's great.

Thanks,

Sean



[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