public inbox for linux-media@vger.kernel.org
 help / color / mirror / Atom feed
From: Chris Hodgkins <chris@slavesoftware.co.uk>
To: Roland Scheidegger <rscheidegger_lists@hispeed.ch>
Cc: linux-dvb@linuxtv.org
Subject: Re: [linux-dvb] Updated Mantis VP-2033 remote control patch for Manu's jusst.de Mantis branch
Date: Sat, 24 May 2008 03:22:05 +0100	[thread overview]
Message-ID: <48377BCD.9000705@slavesoftware.co.uk> (raw)
In-Reply-To: <4832BE7D.2080808@hispeed.ch>

> On 20.05.2008 08:16, Pauli Borodulin wrote:
  >> [...]
>> Btw I found these in dvb-usb-remote.c:
>>
>>      input_dev->rep[REP_PERIOD] = d->props.rc_interval;
>>      input_dev->rep[REP_DELAY]  = d->props.rc_interval + 150;
>>
>> So there seems to be some configurable auto-repeat functionality in 
>> input layer. I guess I'll experiment with those even tho' RCs delays are 
>> a bit crappy, since it's a pretty painful to go through a long list of 
>> recordings without any auto-repeat...

Roland Scheidegger wrote:
> If you change these values (to anything but zero) before
> input_register_device, the input driver will just disable auto-repeat
> (or rather, you'd need to handle it yourself in the driver with the
> appropriate timer func, and I didn't feel like duplicating half the code
> of the input driver). input_register_device also says all capabilities
> must be set up before calling it, when I tried to change those values
> afterwards it didn't seem to work (though maybe I made some testing
> error, I can't see why it shouldn't work). I guess a REP_DELAY a bit
> over the initial delay (like 300ms) should work, and a REP_PERIOD of
> about 100 (which would give you about 50% chance of stopping pressing
> keys exactly) might be reasonable - though it really is annoying if you
> can't stop exactly (but it's not solvable - either live with slow repeat
> or live with that).

In dvb/ttpci/budget-ci.c there's a note:

          /* note: these must be after input_register_device */
          input_dev->rep[REP_DELAY] = 400;
          input_dev->rep[REP_PERIOD] = 250;

I wondered why and proceeded to kernel's drivers/input/input.c. There's
a note in input_register_device:

/*
   * If delay and period are pre-set by the driver, then autorepeating
   * is handled by the driver itself and we don't do it in input.c.
   */

init_timer(&dev->timer);
if (!dev->rep[REP_DELAY] && !dev->rep[REP_PERIOD]) {
	dev->timer.data = (long) dev;
	dev->timer.function = input_repeat_key;
	dev->rep[REP_DELAY] = 250;
	dev->rep[REP_PERIOD] = 33;
}

So it is different whether you set REP_DELAY & REP_PERIOD before or
after calling input_register_device. If you set them before, it seems
you are also expected to provide your own input_repeat_key function. If
after, then... I guess input layer uses it's own logic, but just using
customized REP_DELAY and REP_PERIOD.

I don't know why for example ttpci/av7110_ir.c uses it's own
input_repeat_key function instead of using the logic provided by input
layer. I will probably find this out later today when trying to
experiment auto-repeat functionality.

Regards,
Pauli Borodulin

_______________________________________________
linux-dvb mailing list
linux-dvb@linuxtv.org
http://www.linuxtv.org/cgi-bin/mailman/listinfo/linux-dvb

_______________________________________________
linux-dvb mailing list
linux-dvb@linuxtv.org
http://www.linuxtv.org/cgi-bin/mailman/listinfo/linux-dvb

  parent reply	other threads:[~2008-05-24  2:22 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-05-16 22:57 [linux-dvb] Updated Mantis VP-2033 remote control patch for Manu's jusst.de Mantis branch Pauli Borodulin
2008-05-16 23:21 ` Markus Rechberger
2008-05-19 16:52   ` Pauli Borodulin
2008-05-19 17:47     ` Roland Scheidegger
     [not found]     ` <4831B70D.8050809@tungstengraphics.com>
2008-05-19 18:51       ` Pauli Borodulin
2008-05-19 23:47         ` Roland Scheidegger
     [not found]         ` <48320E0B.8090501@tungstengraphics.com>
2008-05-20  6:16           ` Pauli Borodulin
2008-05-20 12:05             ` Roland Scheidegger
2008-05-20 12:30               ` Pauli Borodulin
2008-05-24  2:22               ` Chris Hodgkins [this message]
2008-05-24  2:21             ` Chris Hodgkins

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=48377BCD.9000705@slavesoftware.co.uk \
    --to=chris@slavesoftware.co.uk \
    --cc=linux-dvb@linuxtv.org \
    --cc=rscheidegger_lists@hispeed.ch \
    /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