From: Manuel Reimer <mail+linux-input@m-reimer.de>
To: linux-input@vger.kernel.org
Subject: How to get the kernel to emulate force feedback events?
Date: Sat, 20 Feb 2016 20:28:45 +0100 [thread overview]
Message-ID: <56C8BE6D.7050409@m-reimer.de> (raw)
Hello,
if I plug my Xbox 360 controller and run fftest on it, then the
following force feedback modes are listed as supported:
| Force feedback effects types: Periodic, Rumble, Gain,
| Force feedback periodic effects: Square, Triangle, Sine,
If I have a look at the driver itself, then it actually only supports
FF_RUMBLE:
https://github.com/torvalds/linux/blob/master/drivers/input/joystick/xpad.c#L1054
https://github.com/torvalds/linux/blob/master/drivers/input/joystick/xpad.c#L966
So somewhere in the kernel source there has to be some kind of built-in
force feedback effect emulation...
If I do the same in an uinput driver (only report "FF_RUMBLE" as being
supported), then fftest only shows this one effect to be supported by
the device. The "kernel side emulation" does not kick in...
The kernel documentation
(https://www.kernel.org/doc/Documentation/input/ff.txt) says:
| Note: In most cases you should use FF_PERIODIC instead of FF_RUMBLE.
| All devices that support FF_RUMBLE support FF_PERIODIC (square,
| triangle, sine) and the other way around.
But what could be the mistake, which allowed me to create a device
driver which actually only supports FF_RUMBLE? Are there any special
driver parameters that have to be present, so the kernel side emulation
gets active?
Thanks in advance.
Best regards,
Manuel
next reply other threads:[~2016-02-20 19:28 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-02-20 19:28 Manuel Reimer [this message]
2016-02-21 10:20 ` How to get the kernel to emulate force feedback events? Manuel Reimer
2016-02-21 14:07 ` Manuel Reimer
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=56C8BE6D.7050409@m-reimer.de \
--to=mail+linux-input@m-reimer.de \
--cc=linux-input@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 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.