mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: "Dmitry Torokhov" <dmitry.torokhov@gmail.com>
To: bjdouma <bjdouma@xs4all.nl>
Cc: linux-kernel@vger.kernel.org
Subject: Re: [PATCH 001/001] INPUT: new ioctl's to retrieve values of EV_REP and EV_SND event codes
Date: Wed, 26 Apr 2006 10:24:32 -0400	[thread overview]
Message-ID: <d120d5000604260724q45f52117t27920f2ae59bea76@mail.gmail.com> (raw)
In-Reply-To: <20060426104301.GA4634@skyscraper.unix9.prv>

[-- Attachment #1: Type: text/plain, Size: 1396 bytes --]

On 4/26/06, bjdouma <bjdouma@xs4all.nl> wrote:
> On Wed, Apr 26, 2006 at 01:06:38AM -0400, Dmitry Torokhov wrote:
>
> > What do you gius think about the patch below?
>
> Works like a charm.
> Why is it though that we need EVIOCSREP, when I can set PERIOD and
> DELAY through writing a struct input_event directly to the file
> descriptor?  I've been doing that for quite some time, having
> softrepeat=1 (I need a quick keyboard, DELAY=120, PERIOD=18).
>
> One typo in the patch:
> +#define EVIOCSREP              _IOW('E', 0x03, int[2])                 /* get repeat settings */
> should be:
> +#define EVIOCSREP              _IOW('E', 0x03, int[2])                 /* set repeat settings */
>

Ah, OK, thanks, I will fix that.

> Now, the EV_SND bitmap is still broken.
> I don't think it's simply a matter of adding change_bit(code,dev->snd)
> in the EV_SND part of input.c.  During a quick test the bitmap
> became confused, after setting both bell and tone through writing
> a struct input_event to the file descriptor of the pcspkr's event
> file in /dev/input/, then setting just bell to 0.
>

Are you saying that both bits were set to 0 or that you could not hear
the tone after killing bell? If latter then it is sort of pcspkr
problem as from input core POV tone is still active.

Btw, your patch - did it resemble something like attached?

--
Dmitry

[-- Attachment #2: input-fix-EVIOCGSND.patch --]
[-- Type: text/plain, Size: 619 bytes --]

Input: make EVIOCGSND return meaningful data

Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
---
 drivers/input/input.c |    3 +++
 1 file changed, 3 insertions(+)

Index: linux/drivers/input/input.c
===================================================================
--- linux.orig/drivers/input/input.c
+++ linux/drivers/input/input.c
@@ -155,6 +155,9 @@ void input_event(struct input_dev *dev, 
 			if (code > SND_MAX || !test_bit(code, dev->sndbit))
 				return;
 
+			if (!!test_bit(code, dev->snd) != !!value)
+				change_bit(code, dev->snd);
+
 			if (dev->event) dev->event(dev, type, code, value);
 
 			break;

  reply	other threads:[~2006-04-26 14:24 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-04-22 20:48 bjd
2006-04-24 14:31 ` Dmitry Torokhov
2006-04-24 14:57   ` Vojtech Pavlik
2006-04-24 15:03     ` Dmitry Torokhov
2006-04-25 13:19       ` Dmitry Torokhov
2006-04-25 15:16         ` Vojtech Pavlik
2006-04-25 15:23           ` Dmitry Torokhov
2006-04-25 15:26             ` Vojtech Pavlik
2006-04-26  5:06               ` Dmitry Torokhov
2006-04-26  9:38                 ` Vojtech Pavlik
2006-04-26 10:43                 ` bjdouma
2006-04-26 14:24                   ` Dmitry Torokhov [this message]
2006-04-26 19:09                     ` bjdouma
2006-04-28 17:03                       ` Dmitry Torokhov

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=d120d5000604260724q45f52117t27920f2ae59bea76@mail.gmail.com \
    --to=dmitry.torokhov@gmail.com \
    --cc=bjdouma@xs4all.nl \
    --cc=dtor_core@ameritech.net \
    --cc=linux-kernel@vger.kernel.org \
    /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®