From: Manuel Reimer <mail+linux-input@m-reimer.de>
To: "Clément VUCHENER" <clement.vuchener@gmail.com>
Cc: linux-input <linux-input@vger.kernel.org>
Subject: Re: uinput: ioctls for UI_BEGIN_FF_UPLOAD fails (returns -1). How to debug?
Date: Tue, 29 Mar 2016 18:48:19 +0200 [thread overview]
Message-ID: <56FAB1D3.5020003@m-reimer.de> (raw)
In-Reply-To: <CAM4jgCo9a-6ati0tQWCZqBRyxM6E6NrQK6Cj0uGQAogCRMgrOA@mail.gmail.com>
On 03/29/2016 12:21 PM, Clément VUCHENER wrote:
> This looks fine to me (maybe you should make sure upload.retval is
> correctly set before calling UI_END_FF_UPLOAD, but that is not related
> to your problem).
Thanks for the hint. I guess I should do that in the erase handler, too.
> I am using uinput with multiple threads without problems (one in a
> reading loop like yours, others writing events). You must be doing
> something wrong with that file descriptor in that other thread.
I also think so, but I don't see the mistake...
As the idea was to publish this under GPL3 anyway, I've uploaded my
early development state:
https://github.com/M-Reimer/pspaddrv
To give a short overview:
The relevant ones are:
device-handler.c
----------------
contains the actual handling thread functions
> DeviceHandlerThreadUSB
is called from main.c. Contains the "Sending main loop"
and starts a second thread in
> DeviceHandlerThreadRumble
which actually does the rumble stuff and contains the
"Receiving main loop"
uinput.c
--------
contains the uinput init function and the sending function which sends
one block of xbox button data at once without any prefiltering.
The code files, probably not relevant for this problem are:
main.c
------
starts the device handling threads (probably not relevant for my problems)
ps[34]-device.c
---------------
contain the gamepad interaction
usb.c
-----
some libusb helper functions
Would be great if someone could have a look at this and maybe give me a
hint about what could be the problem.
To test the code, an PS3 or PS4 gamepad is needed and the rumble stuff
actually needs to be commented out. If done so, this driver can be used
to emulate an XBox 360 gamepad with an PS3 or PS4 gamepad.
Thanks in advance
Manuel
--
To unsubscribe from this list: send the line "unsubscribe linux-input" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
next prev parent reply other threads:[~2016-03-29 16:48 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-03-27 18:53 uinput: ioctls for UI_BEGIN_FF_UPLOAD fails (returns -1). How to debug? Manuel Reimer
2016-03-27 19:11 ` Clément VUCHENER
2016-03-28 8:53 ` Manuel Reimer
2016-03-29 10:21 ` Clément VUCHENER
2016-03-29 16:48 ` Manuel Reimer [this message]
2016-03-31 17:46 ` Manuel Reimer
2016-04-03 10:02 ` Manuel Reimer
2016-04-03 10:21 ` Clément VUCHENER
2016-04-05 19:10 ` 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=56FAB1D3.5020003@m-reimer.de \
--to=mail+linux-input@m-reimer.de \
--cc=clement.vuchener@gmail.com \
--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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).