mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: "David Härdeman" <david@hardeman.nu>
To: Tomas Melin <tomas.melin@iki.fi>
Cc: m.chehab@samsung.com, james.hogan@imgtec.com,
	a.seppala@gmail.com, linux-media@vger.kernel.org,
	linux-kernel@vger.kernel.org,
	Tomas Melin <tomas.j.melin@gmail.com>
Subject: Re: [PATCH 2/2] [media] rc-core: change enabled_protocol default setting
Date: Mon, 20 Oct 2014 16:12:54 +0200	[thread overview]
Message-ID: <5ee64319b16d00f8fb800607b1e304a1@hardeman.nu> (raw)
In-Reply-To: <1413714113-7456-2-git-send-email-tomas.melin@iki.fi>

On 2014-10-19 12:21, Tomas Melin wrote:
> Change default setting for enabled protocols.
> Instead of enabling all protocols, disable all except lirc during 
> registration.
> Reduces overhead since all protocols not handled by default.
> Protocol to use will be enabled when keycode table is written by 
> userspace.

I can see the appeal in this, but now you've disabled automatic decoding 
for the protocol specified by the keymap for raw drivers? So this would 
also be a change, right?

I agree with Mauro that the "proper" long-term fix would be to teach the 
LIRC userspace daemon to enable the lirc protocol as/when necessary, but 
something similar to the patch below (but lirc + keymap protocol...if 
that's possible to implement in a non-intrusive manner, I haven't 
checked TBH) might be a good idea as an interim measure?


> 
> Signed-off-by: Tomas Melin <tomas.melin@iki.fi>
> ---
>  drivers/media/rc/rc-ir-raw.c |    3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/media/rc/rc-ir-raw.c 
> b/drivers/media/rc/rc-ir-raw.c
> index a118539..63d23d0 100644
> --- a/drivers/media/rc/rc-ir-raw.c
> +++ b/drivers/media/rc/rc-ir-raw.c
> @@ -256,7 +256,8 @@ int ir_raw_event_register(struct rc_dev *dev)
>  		return -ENOMEM;
> 
>  	dev->raw->dev = dev;
> -	dev->enabled_protocols = ~0;
> +	/* by default, disable all but lirc*/
> +	dev->enabled_protocols = RC_BIT_LIRC;
>  	rc = kfifo_alloc(&dev->raw->kfifo,
>  			 sizeof(struct ir_raw_event) * MAX_IR_EVENT_SIZE,
>  			 GFP_KERNEL);

  reply	other threads:[~2014-10-20 14:12 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-10-19 10:21 [PATCH 1/2] [media] rc-core: fix protocol_change regression in ir_raw_event_register Tomas Melin
2014-10-19 10:21 ` [PATCH 2/2] [media] rc-core: change enabled_protocol default setting Tomas Melin
2014-10-20 14:12   ` David Härdeman [this message]
2014-10-21 17:44     ` Tomas Melin
2014-10-20 14:09 ` [PATCH 1/2] [media] rc-core: fix protocol_change regression in ir_raw_event_register David Härdeman

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=5ee64319b16d00f8fb800607b1e304a1@hardeman.nu \
    --to=david@hardeman.nu \
    --cc=a.seppala@gmail.com \
    --cc=james.hogan@imgtec.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-media@vger.kernel.org \
    --cc=m.chehab@samsung.com \
    --cc=tomas.j.melin@gmail.com \
    --cc=tomas.melin@iki.fi \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®