Re: joydev.c and saitek cyborg evo force

2007-08-11 Thread Renato Golin
On 11/08/07, Jiri Kosina <[EMAIL PROTECTED]> wrote: > Force feedback functionality shouldn't be influenced in any means by this > patch - FF implementation doesn't care about the values of the > input_dev->abs{max,min,fuzz,flat}. So it means the patch should work for all other joysticks as well?

Re: joydev.c and saitek cyborg evo force

2007-08-11 Thread Renato Golin
On 10/08/07, Jiri Kosina <[EMAIL PROTECTED]> wrote: > does the attached patch (against 2.6.23-rc2) fix the problem with axis > ranges for you please? Hi Jiri, fixes perfectly. But it probably breaks the output range and kills the force-feedback. I couldn't find fftest for debian (the package

Re: joydev.c and saitek cyborg evo force

2007-08-11 Thread Renato Golin
On 10/08/07, Jiri Kosina [EMAIL PROTECTED] wrote: does the attached patch (against 2.6.23-rc2) fix the problem with axis ranges for you please? Hi Jiri, fixes perfectly. But it probably breaks the output range and kills the force-feedback. I couldn't find fftest for debian (the package with

Re: joydev.c and saitek cyborg evo force

2007-08-11 Thread Renato Golin
On 11/08/07, Jiri Kosina [EMAIL PROTECTED] wrote: Force feedback functionality shouldn't be influenced in any means by this patch - FF implementation doesn't care about the values of the input_dev-abs{max,min,fuzz,flat}. So it means the patch should work for all other joysticks as well? That's

Re: joydev.c and saitek cyborg evo force

2007-08-10 Thread Renato Golin
On 10/08/07, Jiri Kosina <[EMAIL PROTECTED]> wrote: > Renato, does force feedback work properly in Linux with this device? If > so, that would mean that the device has logical maximum and minimum for X > and Y axes different in input and output, and we would need to handle this > properly (we

Re: joydev.c and saitek cyborg evo force

2007-08-10 Thread Renato Golin
On 10/08/07, Jiri Kosina [EMAIL PROTECTED] wrote: Renato, does force feedback work properly in Linux with this device? If so, that would mean that the device has logical maximum and minimum for X and Y axes different in input and output, and we would need to handle this properly (we currently

Re: joydev.c and saitek cyborg evo force

2007-07-20 Thread Renato Golin
On 20/06/07, Jiri Kosina <[EMAIL PROTECTED]> wrote: Could you please send me the report descriptor of the device, so that I could debug it locally here? Hi Jiri, sorry for the delay, below the report descriptor and attached is the full report when I've connected the joystick. report

Re: joydev.c and saitek cyborg evo force

2007-07-20 Thread Renato Golin
On 20/06/07, Jiri Kosina [EMAIL PROTECTED] wrote: Could you please send me the report descriptor of the device, so that I could debug it locally here? Hi Jiri, sorry for the delay, below the report descriptor and attached is the full report when I've connected the joystick. report

Re: joydev.c and saitek cyborg evo force

2007-06-14 Thread Renato Golin
On 12/06/07, Jiri Kosina <[EMAIL PROTECTED]> wrote: could you please apply the stupid patch below (against 2.6.20, I know you are using it :) ) and report the result? It should show us whether the values 0 and 4096 (which can be seen in your hid parsing debug dump) are correctly passed from HID

Re: joydev.c and saitek cyborg evo force

2007-06-14 Thread Renato Golin
On 12/06/07, Jiri Kosina [EMAIL PROTECTED] wrote: could you please apply the stupid patch below (against 2.6.20, I know you are using it :) ) and report the result? It should show us whether the values 0 and 4096 (which can be seen in your hid parsing debug dump) are correctly passed from HID to

Re: joydev.c and saitek cyborg evo force

2007-06-12 Thread Renato Golin
On 12/06/07, Dmitry Torokhov <[EMAIL PROTECTED]> wrote: We need to find out why you see [-127, 127] range, because if joydev would see [0, 4096] range it would perform automatic correction and map values like this: c0: 2048, c1: 2048, c2: 262144, c3: 262144 Hi Dmitry, That's the values I got

Re: joydev.c and saitek cyborg evo force

2007-06-12 Thread Renato Golin
On 12/06/07, Jiri Kosina <[EMAIL PROTECTED]> wrote: the thing is that the aim of this quirk is to normalize the values that are being reported by bogus devices, so we don't really want to trust the values they provide here, do we? Hi Jiri, I don't know about the other joysticks, but Saitek

Re: joydev.c and saitek cyborg evo force

2007-06-12 Thread Renato Golin
On 04/06/07, Renato Golin <[EMAIL PROTECTED]> wrote: > Well calibration using jscal might be needed, that should be fine. The > question is whether the ranges are now correct and calibration using jscal > works fine. Ok, so maybe in that case my automatic calibration is sti

Re: joydev.c and saitek cyborg evo force

2007-06-12 Thread Renato Golin
On 04/06/07, Renato Golin [EMAIL PROTECTED] wrote: Well calibration using jscal might be needed, that should be fine. The question is whether the ranges are now correct and calibration using jscal works fine. Ok, so maybe in that case my automatic calibration is still worth to put

Re: joydev.c and saitek cyborg evo force

2007-06-12 Thread Renato Golin
On 12/06/07, Jiri Kosina [EMAIL PROTECTED] wrote: the thing is that the aim of this quirk is to normalize the values that are being reported by bogus devices, so we don't really want to trust the values they provide here, do we? Hi Jiri, I don't know about the other joysticks, but Saitek did

Re: joydev.c and saitek cyborg evo force

2007-06-12 Thread Renato Golin
On 12/06/07, Dmitry Torokhov [EMAIL PROTECTED] wrote: We need to find out why you see [-127, 127] range, because if joydev would see [0, 4096] range it would perform automatic correction and map values like this: c0: 2048, c1: 2048, c2: 262144, c3: 262144 Hi Dmitry, That's the values I got

Re: joydev.c and saitek cyborg evo force

2007-06-04 Thread Renato Golin
On 04/06/07, Jiri Kosina <[EMAIL PROTECTED]> wrote: sorry, don't fully understand - what do you mean by "got the messages but not the fix"? The range "detected" was 0 to 255 but both X and Y axis are reporting 4096. I think that the code in drivers/hid/hid-input.c: if ((device->quirks &

Re: joydev.c and saitek cyborg evo force

2007-06-04 Thread Renato Golin
On 03/06/07, Jiri Kosina <[EMAIL PROTECTED]> wrote: Please try this patch on top of 2.6.20 Hi Jiri, Patched and run, we're almost there... I put an additional printk on usb/input/hid-core.c and hid/hid-input.c to assure I got the right copy, got the messages but not the fix. What joydev

Re: joydev.c and saitek cyborg evo force

2007-06-04 Thread Renato Golin
On 03/06/07, Jiri Kosina [EMAIL PROTECTED] wrote: Please try this patch on top of 2.6.20 Hi Jiri, Patched and run, we're almost there... I put an additional printk on usb/input/hid-core.c and hid/hid-input.c to assure I got the right copy, got the messages but not the fix. What joydev

Re: joydev.c and saitek cyborg evo force

2007-06-04 Thread Renato Golin
On 04/06/07, Jiri Kosina [EMAIL PROTECTED] wrote: sorry, don't fully understand - what do you mean by got the messages but not the fix? The range detected was 0 to 255 but both X and Y axis are reporting 4096. I think that the code in drivers/hid/hid-input.c: if ((device-quirks

Re: joydev.c and saitek cyborg evo force

2007-06-01 Thread Renato Golin
On 31/05/07, Jiri Kosina <[EMAIL PROTECTED]> wrote: Yes, the problem with axis ranges definitely looks like that. Renato, could you please send me vendor id and product id of the joystick in question, I will send you a patch to test whether normalizing the values on hid-level (as we already do

Re: joydev.c and saitek cyborg evo force

2007-06-01 Thread Renato Golin
On 31/05/07, Jiri Kosina [EMAIL PROTECTED] wrote: Yes, the problem with axis ranges definitely looks like that. Renato, could you please send me vendor id and product id of the joystick in question, I will send you a patch to test whether normalizing the values on hid-level (as we already do for

Re: joydev.c and saitek cyborg evo force

2007-05-30 Thread Renato Golin
On 30/05/07, Renato Golin <[EMAIL PROTECTED]> wrote: On 30/05/07, Jiri Kosina <[EMAIL PROTECTED]> wrote: > do any data appear in the kernel log when you generate events with the > device (i.e. move the joystick, press the buttons, etc)? That should be > reported if DEBUG_DAT

Re: joydev.c and saitek cyborg evo force

2007-05-30 Thread Renato Golin
On 30/05/07, Jiri Kosina <[EMAIL PROTECTED]> wrote: do any data appear in the kernel log when you generate events with the device (i.e. move the joystick, press the buttons, etc)? That should be reported if DEBUG_DATA is defined properly on the older kernels. Not at all... only my own debug

Re: joydev.c and saitek cyborg evo force

2007-05-30 Thread Renato Golin
On 30/05/07, Jiri Kosina <[EMAIL PROTECTED]> wrote: well I have changed the overall HID code design in 2.6.21 a little bit. Anyway, just hardcoding '#define DEBUG' and '#define DEBUG_DATA' (that's also important) in 2.6.20-and-older kernels should have similar result as CONFIG_HID_DEBUG in

Re: joydev.c and saitek cyborg evo force

2007-05-30 Thread Renato Golin
On 30/05/07, Renato Golin [EMAIL PROTECTED] wrote: On 30/05/07, Jiri Kosina [EMAIL PROTECTED] wrote: do any data appear in the kernel log when you generate events with the device (i.e. move the joystick, press the buttons, etc)? That should be reported if DEBUG_DATA is defined properly

Re: joydev.c and saitek cyborg evo force

2007-05-30 Thread Renato Golin
On 30/05/07, Jiri Kosina [EMAIL PROTECTED] wrote: well I have changed the overall HID code design in 2.6.21 a little bit. Anyway, just hardcoding '#define DEBUG' and '#define DEBUG_DATA' (that's also important) in 2.6.20-and-older kernels should have similar result as CONFIG_HID_DEBUG in

Re: joydev.c and saitek cyborg evo force

2007-05-30 Thread Renato Golin
On 30/05/07, Jiri Kosina [EMAIL PROTECTED] wrote: do any data appear in the kernel log when you generate events with the device (i.e. move the joystick, press the buttons, etc)? That should be reported if DEBUG_DATA is defined properly on the older kernels. Not at all... only my own debug

Re: joydev.c and saitek cyborg evo force

2007-05-29 Thread Renato Golin
On 21/05/07, Jiri Kosina <[EMAIL PROTECTED]> wrote: could you please turn on the HID debugging support ("Device Drivers -> HID devices -> HID debugging support" in menuconfig of any reasonably recent kernel) and show the output that appears when the joystick is plugged in, and also when you

Re: joydev.c and saitek cyborg evo force

2007-05-29 Thread Renato Golin
On 21/05/07, Jiri Kosina [EMAIL PROTECTED] wrote: could you please turn on the HID debugging support (Device Drivers - HID devices - HID debugging support in menuconfig of any reasonably recent kernel) and show the output that appears when the joystick is plugged in, and also when you generate

Re: joydev.c and saitek cyborg evo force

2007-05-24 Thread Renato Golin
On 21/05/07, Jiri Kosina <[EMAIL PROTECTED]> wrote: could you please turn on the HID debugging support ("Device Drivers -> HID devices -> HID debugging support" in menuconfig of any reasonably recent kernel) and show the output that appears when the joystick is plugged in, and also when you

Re: joydev.c and saitek cyborg evo force

2007-05-24 Thread Renato Golin
On 21/05/07, Jiri Kosina [EMAIL PROTECTED] wrote: could you please turn on the HID debugging support (Device Drivers - HID devices - HID debugging support in menuconfig of any reasonably recent kernel) and show the output that appears when the joystick is plugged in, and also when you generate

Re: [PATCH] joydev.c automatic re-calibration

2007-05-23 Thread Renato Golin
On 23/05/07, Andrew Morton <[EMAIL PROTECTED]> wrote: A few patch protocol things: - Please always prepare patches in `patch -p1' form - Include a Signed-off-by: as per Documentation/SubmittingPatches, section 11. - Avoid including two copies of the patch in the one email. Inlined plain

Re: [PATCH] joydev.c automatic re-calibration

2007-05-23 Thread Renato Golin
On 23/05/07, Jiri Kosina <[EMAIL PROTECTED]> wrote: I have asked Renato to provide HID debugging output a few days ago - see http://lkml.org/lkml/2007/5/21/201 - but that was without reply. Sorry, didn't get the email. Renato, do you think you could try this, so that we can understand

Re: [PATCH] joydev.c automatic re-calibration

2007-05-23 Thread Renato Golin
: adding Signed-off-by line (is that it?) Signed-off-by: Renato Golin <[EMAIL PROTECTED]> $ diff -u joydev.c.original joydev.c --- joydev.c.original 2007-05-22 22:23:43.0 +0100 +++ joydev.c2007-05-23 01:24:04.0 +0100 @@ -53,6 +53,8 @@ __u8 absmap[ABS_MAX + 1];

Re: [PATCH] joydev.c automatic re-calibration

2007-05-23 Thread Renato Golin
On 23/05/07, Jiri Kosina <[EMAIL PROTECTED]> wrote: (Adding Dmitry to CC so that he doesn't miss it. Also, if you'd like to get your patch merged, you should add proper Signed-off-by line. Hi Jiri, Sorry, it's my first kernel patch, how do I add Signed-off-by line? I did with: $ diff -u

Re: [PATCH] joydev.c automatic re-calibration

2007-05-23 Thread Renato Golin
On 23/05/07, Jiri Kosina [EMAIL PROTECTED] wrote: (Adding Dmitry to CC so that he doesn't miss it. Also, if you'd like to get your patch merged, you should add proper Signed-off-by line. Hi Jiri, Sorry, it's my first kernel patch, how do I add Signed-off-by line? I did with: $ diff -u

Re: [PATCH] joydev.c automatic re-calibration

2007-05-23 Thread Renato Golin
: adding Signed-off-by line (is that it?) Signed-off-by: Renato Golin [EMAIL PROTECTED] $ diff -u joydev.c.original joydev.c --- joydev.c.original 2007-05-22 22:23:43.0 +0100 +++ joydev.c2007-05-23 01:24:04.0 +0100 @@ -53,6 +53,8 @@ __u8 absmap[ABS_MAX + 1]; __u8 abspam

Re: [PATCH] joydev.c automatic re-calibration

2007-05-23 Thread Renato Golin
On 23/05/07, Jiri Kosina [EMAIL PROTECTED] wrote: I have asked Renato to provide HID debugging output a few days ago - see http://lkml.org/lkml/2007/5/21/201 - but that was without reply. Sorry, didn't get the email. Renato, do you think you could try this, so that we can understand better

Re: [PATCH] joydev.c automatic re-calibration

2007-05-23 Thread Renato Golin
On 23/05/07, Andrew Morton [EMAIL PROTECTED] wrote: A few patch protocol things: - Please always prepare patches in `patch -p1' form - Include a Signed-off-by: as per Documentation/SubmittingPatches, section 11. - Avoid including two copies of the patch in the one email. Inlined plain

[PATCH] joydev.c automatic re-calibration

2007-05-22 Thread Renato Golin
This small patch adds the automatic recalibration feature without spoiling previously calibrated devices. It's a fix for those joysticks that report faulty range, specially Saitek Cyborg Evo Force. File: drivers/input/joydev.c Fix: - extracted code from joydev_connect to method

[PATCH] joydev.c automatic re-calibration

2007-05-22 Thread Renato Golin
This small patch adds the automatic recalibration feature without spoiling previously calibrated devices. It's a fix for those joysticks that report faulty range, specially Saitek Cyborg Evo Force. File: drivers/input/joydev.c Fix: - extracted code from joydev_connect to method

Re: joydev.c and saitek cyborg evo force

2007-05-18 Thread Renato Golin
On 18/05/07, Renato Golin <[EMAIL PROTECTED]> wrote: Problem is, on joydev_connect, when defining the corrections for every axis, the joystick is reporting dev->absmax = 127 and dev->absmin = -127 for both axis 0 and 1, so the correction is based on a signed range when the joystick

joydev.c and saitek cyborg evo force

2007-05-18 Thread Renato Golin
Hi, I'm a kernel newbie so please, pardon my French. I have a Saitek Cyborg Evo Force, a very good joystick with force- feedback. Problem is, on Windows it works well (its drivers know its own idiosyncrasies) but on Linux it gets a bit fuzzy. The behaviour is that, all axis are working fine,

joydev.c and saitek cyborg evo force

2007-05-18 Thread Renato Golin
Hi, I'm a kernel newbie so please, pardon my French. I have a Saitek Cyborg Evo Force, a very good joystick with force- feedback. Problem is, on Windows it works well (its drivers know its own idiosyncrasies) but on Linux it gets a bit fuzzy. The behaviour is that, all axis are working fine,

Re: joydev.c and saitek cyborg evo force

2007-05-18 Thread Renato Golin
On 18/05/07, Renato Golin [EMAIL PROTECTED] wrote: Problem is, on joydev_connect, when defining the corrections for every axis, the joystick is reporting dev-absmax = 127 and dev-absmin = -127 for both axis 0 and 1, so the correction is based on a signed range when the joystick is actually