All of lore.kernel.org
 help / color / mirror / Atom feed
* The restricted number (LIRCBUF_SIZE) of pulse-spaces in IR sequences is too small
@ 2019-06-12 14:08 Takashi Kanamaru
  2019-06-12 15:01 ` Sean Young
  0 siblings, 1 reply; 7+ messages in thread
From: Takashi Kanamaru @ 2019-06-12 14:08 UTC (permalink / raw)
  To: linux-media

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

#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.

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

Sincerely,

Takashi Kanamaru

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: The restricted number (LIRCBUF_SIZE) of pulse-spaces in IR sequences is too small
  2019-06-12 14:08 The restricted number (LIRCBUF_SIZE) of pulse-spaces in IR sequences is too small Takashi Kanamaru
@ 2019-06-12 15:01 ` Sean Young
  2019-06-13  5:09   ` Takashi Kanamaru
  0 siblings, 1 reply; 7+ messages in thread
From: Sean Young @ 2019-06-12 15:01 UTC (permalink / raw)
  To: Takashi Kanamaru; +Cc: linux-media

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

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: The restricted number (LIRCBUF_SIZE) of pulse-spaces in IR sequences is too small
  2019-06-12 15:01 ` Sean Young
@ 2019-06-13  5:09   ` Takashi Kanamaru
  2019-06-13  8:49     ` [PATCH] media: rc: IR signal for Panasonic air conditioner too long " Sean Young
  0 siblings, 1 reply; 7+ messages in thread
From: Takashi Kanamaru @ 2019-06-13  5:09 UTC (permalink / raw)
  To: Sean Young; +Cc: linux-media

Dear Sean Young,

> 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.

I observed the IR signals of my air conditioner (Panasoic ACXA75C00600)
and TV (Belson DS16-11B) with the oscilloscope,
and uploaded their graph as follows:

https://github.com/neuralassembly/raspi/blob/master/IRSignalGraph.png

It is observed that the length of IR signal of air conditioner is long
(about 250ms),
and that of TV is short (about 60ms).

It is difficult to count the number of pulses and spaces in this graph,
so I counted them from the output of the "mode2" command.
They had 439 pulse-spaces and 67 pulse-spaces, respectively.

Sincerely,

Takashi Kanamaru

^ permalink raw reply	[flat|nested] 7+ messages in thread

* [PATCH] media: rc: IR signal for Panasonic air conditioner too long sequences is too small
  2019-06-13  5:09   ` Takashi Kanamaru
@ 2019-06-13  8:49     ` Sean Young
  2020-04-06  9:06       ` Takashi Kanamaru
  0 siblings, 1 reply; 7+ messages in thread
From: Sean Young @ 2019-06-13  8:49 UTC (permalink / raw)
  To: linux-media; +Cc: Takashi Kanamaru

The IR signal to control the Panasonic ACXA75C00600 air conditioner has
439 pulse/spaces. Increase limit to make it possible to transmit signal.

Reported-by: Takashi Kanamaru <neuralassembly@gmail.com>
Signed-off-by: Sean Young <sean@mess.org>
---
 drivers/media/rc/lirc_dev.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/media/rc/lirc_dev.c b/drivers/media/rc/lirc_dev.c
index 10830605c734..f078f8a3aec8 100644
--- a/drivers/media/rc/lirc_dev.c
+++ b/drivers/media/rc/lirc_dev.c
@@ -19,7 +19,7 @@
 #include "rc-core-priv.h"
 #include <uapi/linux/lirc.h>
 
-#define LIRCBUF_SIZE	256
+#define LIRCBUF_SIZE	1024
 
 static dev_t lirc_base_dev;
 
-- 
2.20.1


^ permalink raw reply related	[flat|nested] 7+ messages in thread

* Re: [PATCH] media: rc: IR signal for Panasonic air conditioner too long sequences is too small
  2019-06-13  8:49     ` [PATCH] media: rc: IR signal for Panasonic air conditioner too long " Sean Young
@ 2020-04-06  9:06       ` Takashi Kanamaru
  2020-04-06  9:51         ` Sean Young
  0 siblings, 1 reply; 7+ messages in thread
From: Takashi Kanamaru @ 2020-04-06  9:06 UTC (permalink / raw)
  To: Sean Young; +Cc: linux-media

Dear Sean Young and all,

In the last year, a change of the value of LIRCBUF_SIZE
from 256 to 1024 was committed to the master branch at the time,
and the new value can be used in the kernel 5.3 or later.

https://github.com/torvalds/linux/commit/5c4c8b4a999019f19e770cb55cbacb89c95897bd#diff-3b71f634ae88214ee31a1b6c90f7df5c

This change of LIRCBUF_SIZE was proposed
in order to treat long IR sequences of remote controllers
on Raspberry Pi.

However, Raspberry Pi now uses kernel 4.19,
so the new value cannot be used.

Can you backport the above commit
to the older kernels, i.e.,
4.19, 4.20, 5.0, 5.1, and 5.2?

Sincerely,

Takashi Kanamaru

2019年6月13日(木) 17:49 Sean Young <sean@mess.org>:
>
> The IR signal to control the Panasonic ACXA75C00600 air conditioner has
> 439 pulse/spaces. Increase limit to make it possible to transmit signal.
>
> Reported-by: Takashi Kanamaru <neuralassembly@gmail.com>
> Signed-off-by: Sean Young <sean@mess.org>
> ---
>  drivers/media/rc/lirc_dev.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/media/rc/lirc_dev.c b/drivers/media/rc/lirc_dev.c
> index 10830605c734..f078f8a3aec8 100644
> --- a/drivers/media/rc/lirc_dev.c
> +++ b/drivers/media/rc/lirc_dev.c
> @@ -19,7 +19,7 @@
>  #include "rc-core-priv.h"
>  #include <uapi/linux/lirc.h>
>
> -#define LIRCBUF_SIZE   256
> +#define LIRCBUF_SIZE   1024
>
>  static dev_t lirc_base_dev;
>
> --
> 2.20.1
>

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH] media: rc: IR signal for Panasonic air conditioner too long sequences is too small
  2020-04-06  9:06       ` Takashi Kanamaru
@ 2020-04-06  9:51         ` Sean Young
  2020-04-06 10:17           ` Greg Kroah-Hartman
  0 siblings, 1 reply; 7+ messages in thread
From: Sean Young @ 2020-04-06  9:51 UTC (permalink / raw)
  To: stable, Greg Kroah-Hartman; +Cc: linux-media, Takashi Kanamaru

Hello stable team, Greg,

On Mon, Apr 06, 2020 at 06:06:29PM +0900, Takashi Kanamaru wrote:
> Dear Sean Young and all,
> 
> In the last year, a change of the value of LIRCBUF_SIZE
> from 256 to 1024 was committed to the master branch at the time,
> and the new value can be used in the kernel 5.3 or later.
> 
> https://github.com/torvalds/linux/commit/5c4c8b4a999019f19e770cb55cbacb89c95897bd#diff-3b71f634ae88214ee31a1b6c90f7df5c
> 
> This change of LIRCBUF_SIZE was proposed
> in order to treat long IR sequences of remote controllers
> on Raspberry Pi.
> 
> However, Raspberry Pi now uses kernel 4.19,
> so the new value cannot be used.
> 
> Can you backport the above commit
> to the older kernels, i.e.,
> 4.19, 4.20, 5.0, 5.1, and 5.2?

I'd like to propose this commit for the stable tree, from kernel 4.16 to
5.2. It has been in the tree from v5.3 onwards and no regressions have
been found.

Thank you,

Sean

> Sincerely,
> 
> Takashi Kanamaru
> 
> 2019年6月13日(木) 17:49 Sean Young <sean@mess.org>:
> >
> > The IR signal to control the Panasonic ACXA75C00600 air conditioner has
> > 439 pulse/spaces. Increase limit to make it possible to transmit signal.
> >
> > Reported-by: Takashi Kanamaru <neuralassembly@gmail.com>
> > Signed-off-by: Sean Young <sean@mess.org>
> > ---
> >  drivers/media/rc/lirc_dev.c | 2 +-
> >  1 file changed, 1 insertion(+), 1 deletion(-)
> >
> > diff --git a/drivers/media/rc/lirc_dev.c b/drivers/media/rc/lirc_dev.c
> > index 10830605c734..f078f8a3aec8 100644
> > --- a/drivers/media/rc/lirc_dev.c
> > +++ b/drivers/media/rc/lirc_dev.c
> > @@ -19,7 +19,7 @@
> >  #include "rc-core-priv.h"
> >  #include <uapi/linux/lirc.h>
> >
> > -#define LIRCBUF_SIZE   256
> > +#define LIRCBUF_SIZE   1024
> >
> >  static dev_t lirc_base_dev;
> >
> > --
> > 2.20.1
> >

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH] media: rc: IR signal for Panasonic air conditioner too long sequences is too small
  2020-04-06  9:51         ` Sean Young
@ 2020-04-06 10:17           ` Greg Kroah-Hartman
  0 siblings, 0 replies; 7+ messages in thread
From: Greg Kroah-Hartman @ 2020-04-06 10:17 UTC (permalink / raw)
  To: Sean Young; +Cc: stable, linux-media, Takashi Kanamaru

On Mon, Apr 06, 2020 at 10:51:55AM +0100, Sean Young wrote:
> Hello stable team, Greg,
> 
> On Mon, Apr 06, 2020 at 06:06:29PM +0900, Takashi Kanamaru wrote:
> > Dear Sean Young and all,
> > 
> > In the last year, a change of the value of LIRCBUF_SIZE
> > from 256 to 1024 was committed to the master branch at the time,
> > and the new value can be used in the kernel 5.3 or later.
> > 
> > https://github.com/torvalds/linux/commit/5c4c8b4a999019f19e770cb55cbacb89c95897bd#diff-3b71f634ae88214ee31a1b6c90f7df5c
> > 
> > This change of LIRCBUF_SIZE was proposed
> > in order to treat long IR sequences of remote controllers
> > on Raspberry Pi.
> > 
> > However, Raspberry Pi now uses kernel 4.19,
> > so the new value cannot be used.
> > 
> > Can you backport the above commit
> > to the older kernels, i.e.,
> > 4.19, 4.20, 5.0, 5.1, and 5.2?
> 
> I'd like to propose this commit for the stable tree, from kernel 4.16 to
> 5.2. It has been in the tree from v5.3 onwards and no regressions have
> been found.

The only kernel being supported in that range is 4.19 at the moment, so
I'll queue it up now, thanks.  All other kernel trees are long
end-of-life and no one should be using them anymore.

thanks,

greg k-h

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2020-04-06 10:17 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-06-12 14:08 The restricted number (LIRCBUF_SIZE) of pulse-spaces in IR sequences is too small Takashi Kanamaru
2019-06-12 15:01 ` Sean Young
2019-06-13  5:09   ` Takashi Kanamaru
2019-06-13  8:49     ` [PATCH] media: rc: IR signal for Panasonic air conditioner too long " Sean Young
2020-04-06  9:06       ` Takashi Kanamaru
2020-04-06  9:51         ` Sean Young
2020-04-06 10:17           ` Greg Kroah-Hartman

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.