From: Anssi Hannula <anssi.hannula@mbnet.fi>
To: Vojtech Pavlik <vojtech@suse.cz>
Cc: linux-joystick@atrey.karlin.mff.cuni.cz, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] Add Force Feedback interface to joydev
Date: Fri, 08 Jul 2005 19:13:45 +0300 [thread overview]
Message-ID: <42CEA639.1020605@mbnet.fi> (raw)
In-Reply-To: <20050707150537.GB29510@ucw.cz>
Vojtech Pavlik wrote:
> On Thu, Jul 07, 2005 at 05:20:59PM +0300, Anssi Hannula wrote:
>
>>But I think we should not apply (with or without 64-bit) the patch (not
>>yet, anyway), as I'm (slowly) working on restructuring the kernel FF
>>interface and developing a user space library (and writing a generic HID
>>PID FF-driver).
>
> That sounds interesting. However - I don't know of many devices that'd
> be PID compliant except for the MS SideWinder ForceFeedback Pro 2.
> All the Logitechs, as far as I know don't implement full PID.
Unfortunately so :( Do you have any info on how close the FF
implementation of the common FF devices is to the PID standard?
I had a poor choice of words in the previous message; I have only little
code written, mainly I've been just thinking on a bunch of ideas on how
we could do these things better (in other words, I've taken a summer break).
What I have written, is the PID driver (not complete yet) and a simple
FF driver for Zeroplus based devices (VID 0x0c12, PID 0x0005 and 0x0008,
very cheap Playstation-pads with USB connector, I have two branded "XFX
Executioner Dual Impact" (BTW, their Windows driver is crap, doesn't
support multiple devices and hangs Control Panel windows continuosly)).
I could post a patch for the Zeroplus support, but with current FF
driver model, that would be 90% copy-paste of hid-tmff.c & hid-lgff.c.
>
>>As a matter of fact, I have two (lengthy) questions:
>>
>>1. What would be the best way to decide when to delete the effects of a
>>specific process from the device? Currently it is done when flush is
>>called. However, if one process holds multiple fd's to the interface
>>(for example input fd through some gaming-input library and FF fd with
>>the FF library), when any of these closes, all effects are deleted. Good
>>way to overcome this would be fd-specific effects instead of
>>process-specific, but I've got no idea how that would be done. One
>>possible way would be introducing a new device file solely for the FF
>>(so there would be no reason to hold multiple fd's to this file by the
>>same process), but would that be overkill?
>
>
> I don't think that the fact that when a process holds the device open
> twice, the first close flushes the FF effects is that big a problem.
>
Ok.
>>2. Many simpler devices do not have any effect memory, for example there
>>is just one HID report that is used to apply an effect and stop it. They
>>could share very much of their timing code (they have effect memories
>>and timers implemented in software in the kernel). These would also need
>>software handling of envelopes, which is currently not implemented at
>>all (also some effects could possibly be software emulated). So, should
>>these be implemented by the kernel at all or should they implemented in
>>the userspace library?
>
> Probably both. The timing sensitive stuff in the kernel, all the rest in
> an userspace library.
>
Hmm, that wouldn't leave much stuff into the userspace library (Effect
storage for devices without memory, converting effects with envelopes to
magnitude+time -sequences for devices without envelope support, etc).
Maybe we should implement everything in the kernel... I have to think
about it, maybe something big that should be implemented in userspace
comes to my mind.
--
Anssi Hannula
prev parent reply other threads:[~2005-07-08 16:13 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-04-08 17:29 [PATCH] Add Force Feedback interface to joydev Anssi Hannula
2005-07-07 13:40 ` Vojtech Pavlik
2005-07-07 14:20 ` Anssi Hannula
2005-07-07 15:05 ` Vojtech Pavlik
2005-07-08 16:13 ` Anssi Hannula [this message]
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=42CEA639.1020605@mbnet.fi \
--to=anssi.hannula@mbnet.fi \
--cc=linux-joystick@atrey.karlin.mff.cuni.cz \
--cc=linux-kernel@vger.kernel.org \
--cc=vojtech@suse.cz \
/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