question of Xinput priorities

Chuck Robey chuckr at telenix.org
Tue Jun 17 14:31:41 PDT 2008


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Simon Thum wrote:
> Chuck Robey wrote:
>> So, either I need to just move most of the stuff I would have stuck
>> into the
>> PreInit part into the later area, or maybe find some way to get the
>> Xinput to
>> suspend it's initialization until there's input waiting.
> I'm not an expert at this, but as you say you should think twice on what
> exactly needs tbd in init/preinit/enable. I guess it's not terribly
> wrong to alter e.g. AxisInfo.min_value just after you got the first
> packet. This should enable you to postpone some of init. Blocking in
> device init is not what you want, really.
> As an alternative, you can resort to configuration instead of guessing.
> AFAIK at least synaptics has such options.

Like I said in my post, it's the USB HID report ID from the report descriptor.
It's controlling everything else it reads.  I'm going to try to have everything
happen automatically, and it works now for my personal unit.  The model I'm
using is VERY widely OEM'ed under a ton of different names, and it's entirely
possible that the data could com ein different orders, with different byte
sizes.  Everything automatically works right now, excepting that my report
descriptor defines multiple differing report ID's (each tagging a different
section of the total report descriptor), but only 1 report ID is sent.
Normally, I guess with most devices, multiple reports are sent, and you toss
what you don't want, but I'm not that lucky (or the folks that programmed this
did me no favors).  I can tell, because of the first byte sent, that they're
giving me report ID #9, but I need to read at least one incoming report to tell
that.  I read the report descriptor separately, and unlike the descriptor, the
input report only comes when the user moves the stylus.  So, I can't do the
config until the user moves the stylus, so I can read the report ID.

Yes, I could just set it to 9.  Isn't that kinda ugly?

Oh, I had an idea ... I could guess at 9, set it up for 9, but when I get the
first incoming report, compare it with my guess, and redo the setup if it's
wrong ... yeah, that'd work.  Rhwn I could do the PreInit as normally expected.
Allright, I'll do that, forget this, but thanks for letting me run on.

> 
> Good luck!
> 
> -Simon

- From Daniel Stone:


> Hi,
> This sounds pretty tough.  Which initialisation exactly do you need to
> defer? Is it just the axis values, or more?
>
> If the latter, you could either declare a fixed range larger than you
> know to exist and then scale up to that (eww!), or we could sort out
> dynamic axis info.

Thanks, you see above, I have a workable method?  Thanks for listening.  your
answer is that it's not just a single axis, it's the whole enchilada.  I sure
wish the UC-Logic folks would answer emails.  I mean, this is going to generate
income for them, one would think they'd care ....
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.4 (FreeBSD)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFIWC09z62J6PPcoOkRAhcPAKCCnCMC8uWVoiBk7bxtmtZpryisUgCfahnv
kmWK1LrpgGV9CkWO6mQoCIM=
=869/
-----END PGP SIGNATURE-----



More information about the xorg mailing list