public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* PS2 Input Core Support
@ 2002-07-17 10:13 Udo A. Steinberg
  2002-07-17 10:20 ` Vojtech Pavlik
  2002-07-17 10:23 ` Oliver Graf
  0 siblings, 2 replies; 21+ messages in thread
From: Udo A. Steinberg @ 2002-07-17 10:13 UTC (permalink / raw)
  To: Vojtech Pavlik; +Cc: Linux Kernel


Hi Vojtech,

I'm running 2.5.26 with an ordinary PS/2 keyboard and a 5 button PS/2 mouse.
When using the old psaux driver the mouse works fine.
With input core support, however, the scroll wheel doesn't work properly.
In my XF86Config I'm using IMPS/2 protocol and ZAxisMapping 4 5.
Scrolling up causes the window to scroll down. Scrolling down doesn't do
anything. When changing the protocol to ExplorerPS2 things are not much
better. You can't drag windows over the screen.

The following is the relevant kernel information.
Do you have any tips?

mice: PS/2 mouse device common for all mice
input.c: calling /sbin/hotplug input [HOME=/ PATH=/sbin:/bin:/usr/sbin:/usr/bin ACTION=add PRODUC
input.c: hotplug returned -2
input: AT Set 2 keyboard on isa0060/serio0
serio: i8042 KBD port at 0x60,0x64 irq 1  
serio: i8042 AUX port at 0x60,0x64 irq 12
input.c: calling /sbin/hotplug input [HOME=/ PATH=/sbin:/bin:/usr/sbin:/usr/bin ACTION=add PRODUC
input.c: hotplug returned -2
input: ImExPS/2 Microsoft IntelliMouse Explorer on isa0060/serio1

Regards,
Udo.

^ permalink raw reply	[flat|nested] 21+ messages in thread
* Re: PS2 Input Core Support
@ 2002-07-17 12:55 Petr Vandrovec
  2002-07-17 13:01 ` Vojtech Pavlik
  0 siblings, 1 reply; 21+ messages in thread
From: Petr Vandrovec @ 2002-07-17 12:55 UTC (permalink / raw)
  To: Vojtech Pavlik; +Cc: Linux Kernel

On 17 Jul 02 at 14:44, Vojtech Pavlik wrote:

> > --- a/drivers/input/mouse/psmouse.c     Wed Jul 17 12:19:13 2002
> > +++ b/drivers/input/mouse/psmouse.c     Wed Jul 17 12:19:13 2002
> > @@ -142,7 +142,7 @@
> >   */
> > 
> >         if (psmouse->type == PSMOUSE_IMEX) {
> > -               input_report_rel(dev, REL_WHEEL, (int) (packet[3] & 8) - (int) (packet[2] & 7));
> > +               input_report_rel(dev, REL_WHEEL, (int) (packet[3] & 8) - (int) (packet[3] & 7));
> >                 input_report_key(dev, BTN_SIDE, (packet[3] >> 4) & 1);
> >                 input_report_key(dev, BTN_EXTRA, (packet[3] >> 5) & 1);
> >         }

Hi,
  any plans to support A4Tech mouse? It uses IMEX protocol, but
  
switch(packet[3] & 0x0F) {
    case 0: /* nothing */
    case 1: vertical_wheel--; break;
    case 2: horizontal_wheel++; break;
    case 0xE: horizontal_wheel--; break;
    case 0xF: vertical_wheel++; break;
}

and obviously it never reports wheel move > 1 in one sample.
                                                 Thanks,
                                                    Petr Vandrovec
                                                    vandrove@vc.cvut.cz
                                                    

^ permalink raw reply	[flat|nested] 21+ messages in thread
* Re: PS2 Input Core Support
@ 2002-07-17 13:24 Petr Vandrovec
  0 siblings, 0 replies; 21+ messages in thread
From: Petr Vandrovec @ 2002-07-17 13:24 UTC (permalink / raw)
  To: Vojtech Pavlik; +Cc: Linux Kernel

On 17 Jul 02 at 15:01, Vojtech Pavlik wrote:
> On Wed, Jul 17, 2002 at 02:55:21PM +0200, Petr Vandrovec wrote:
> > On 17 Jul 02 at 14:44, Vojtech Pavlik wrote:
> > 
> > > > --- a/drivers/input/mouse/psmouse.c     Wed Jul 17 12:19:13 2002
> > > > +++ b/drivers/input/mouse/psmouse.c     Wed Jul 17 12:19:13 2002
> > > > @@ -142,7 +142,7 @@
> > > >   */
> > > > 
> > > >         if (psmouse->type == PSMOUSE_IMEX) {
> > > > -               input_report_rel(dev, REL_WHEEL, (int) (packet[3] & 8) - (int) (packet[2] & 7));
> > > > +               input_report_rel(dev, REL_WHEEL, (int) (packet[3] & 8) - (int) (packet[3] & 7));
> > > >                 input_report_key(dev, BTN_SIDE, (packet[3] >> 4) & 1);
> > > >                 input_report_key(dev, BTN_EXTRA, (packet[3] >> 5) & 1);
> > > >         }
> > 
> > Hi,
> >   any plans to support A4Tech mouse? It uses IMEX protocol, but
> >   
> > switch(packet[3] & 0x0F) {
> >     case 0: /* nothing */
> >     case 1: vertical_wheel--; break;
> >     case 2: horizontal_wheel++; break;
> >     case 0xE: horizontal_wheel--; break;
> >     case 0xF: vertical_wheel++; break;
> > }
> > 
> > and obviously it never reports wheel move > 1 in one sample.
> 
> Is there a way to detect whether it's an ImEx or A4? Or will we need a
> command line parameter ... ?

I'm not aware of any way. It behaves like proper ExPS/2 mouse: after reset
it returns id0, after ImPS/2 sequence 3, and after ExPS/2 sequence 4.
In both ImPS/2 and ExPS/2 modes it uses 2/0xE(0xFE) in fourth byte of
packet for horizontal wheel.

Windows .INF talks about "A4M0004", but it looks to me like an internal
.INF identifier and not as an identification string obtainable from mouse.

I'll try to write email to them, maybe they'll answer.
                                            Thanks,
                                                Petr Vandrovec
                                                vandrove@vc.cvut.cz
                                                

^ permalink raw reply	[flat|nested] 21+ messages in thread
* Re: PS2 Input Core Support
@ 2002-07-18 10:17 Petr Vandrovec
  2002-07-18 12:58 ` Vojtech Pavlik
  0 siblings, 1 reply; 21+ messages in thread
From: Petr Vandrovec @ 2002-07-18 10:17 UTC (permalink / raw)
  To: Vojtech Pavlik; +Cc: Linux Kernel, gunther.mayer

On 17 Jul 02 at 16:01, Vojtech Pavlik wrote:
> On Wed, Jul 17, 2002 at 03:58:21PM +0200, Gunther Mayer wrote:
> 
> > > > Hi,
> > > >   any plans to support A4Tech mouse? It uses IMEX protocol, but
> > > >
> > > > switch(packet[3] & 0x0F) {
> > > >     case 0: /* nothing */
> > > >     case 1: vertical_wheel--; break;
> > > >     case 2: horizontal_wheel++; break;
> > > >     case 0xE: horizontal_wheel--; break;
> > > >     case 0xF: vertical_wheel++; break;
> > > > }
> > > >
> > > > and obviously it never reports wheel move > 1 in one sample.
> > >
> > > Is there a way to detect whether it's an ImEx or A4? Or will we need a
> > > command line parameter ... ?
> > 
> > from http://home.t-online.de/home/gunther.mayer/gm_psauxprint-0.01.c :
> > 
> > char a4tech_id[]={ 0xf3,200, 0xf3,100, 0xf3,80, 0xf3,60, 0xf3,40, 0xf3,20};
> > 
> > if(a4tech) {
> > sendbuf(fd,f,a4tech_id,12);
> >         buf[0]=0xf2;
> >         write(fd,&buf,1);
> >         b=consumefa(f);
> >         printf("a4tech ID(f2) is %x\n",b);
> > 
> >         if(b==6 || b==8) printf("AUTODETECT: a4tech\n");
> >         // b=6: spiffy gyro-mouse "8D Profi-Mouse Point Stick"
> >         // b=8: boeder Smartmouse Pro (4Button, 2Scrollwheel, 520dpi) PSM_4DPLUS_ID MOUSE_MODEL_4DPLUS
> > }
> 
> Cool! Anyone send me a patch? ;)

Been there, done that... and unfortunately, my WOP35 insist on
taking first 6 bytes as PS/2->ImPS/2 sequence, and rest as normal
DPI settings. I tried it in reverse order, and couple of permutations,
but it still returns ExPS/2 id. I tried also other sequences from
gm_psauxprint-0.01, but I found nothing interesting, except that
mouse definitely does not support MS PNP id.

Answer from A4Tech support was that mouse is not supported under Linux,
and that I should use Windows and verify that mouse is properly connected.
So I'm on the best way to the command line switch, I think. Google
find couple of problem reporters, but nobody found detection method :-(

                                                    Petr Vandrovec
                                                    vandrove@vc.cvut.cz


^ permalink raw reply	[flat|nested] 21+ messages in thread
* Re: PS2 Input Core Support
@ 2002-07-18 13:36 Petr Vandrovec
  2002-07-18 13:45 ` Vojtech Pavlik
  0 siblings, 1 reply; 21+ messages in thread
From: Petr Vandrovec @ 2002-07-18 13:36 UTC (permalink / raw)
  To: Vojtech Pavlik; +Cc: Linux Kernel, gunther.mayer

On 18 Jul 02 at 14:58, Vojtech Pavlik wrote:
> On Thu, Jul 18, 2002 at 12:17:51PM +0200, Petr Vandrovec wrote:
> 
> > > Cool! Anyone send me a patch? ;)
> > 
> > Been there, done that... and unfortunately, my WOP35 insist on
> > taking first 6 bytes as PS/2->ImPS/2 sequence, and rest as normal
> > DPI settings. I tried it in reverse order, and couple of permutations,
> > but it still returns ExPS/2 id. I tried also other sequences from
> > gm_psauxprint-0.01, but I found nothing interesting, except that
> > mouse definitely does not support MS PNP id.
> > 
> > Answer from A4Tech support was that mouse is not supported under Linux,
> > and that I should use Windows and verify that mouse is properly connected.
> > So I'm on the best way to the command line switch, I think. Google
> > find couple of problem reporters, but nobody found detection method :-(
> 
> Well, it should be possible to snoop the mouse data off the wire using
> a slightly modified parkbd.c module on a different machine and a split
> PS/2 mouse cable ...

Problem is that A4Tech driver does not care. It just interprets incoming
data in the way I described: +-1 is vertical move, +-2 is horizontal,
0 is no move, and everything else is ignored... This is A4Tech's 
interpretation of ImPS/2 and ExPS/2 protocols.

So we can either assume (like GPM does) that wheel movement can be
only +-1, and so we can safely assume that +-2 is horizontal move,
and then everything is fine, or we need some option which will affect
mouse driver behavior.

All my (A4Tech...) PS/2 wheel mouse report wheel movement only +-1 even
with 10Hz sample rate, but I do not think that my mouses are representative
sample of available ExPS/2 implementations.
                                            Petr Vandrovec
                                            

^ permalink raw reply	[flat|nested] 21+ messages in thread

end of thread, other threads:[~2002-07-18 13:42 UTC | newest]

Thread overview: 21+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2002-07-17 10:13 PS2 Input Core Support Udo A. Steinberg
2002-07-17 10:20 ` Vojtech Pavlik
2002-07-17 11:47   ` Udo A. Steinberg
2002-07-17 12:10     ` Vojtech Pavlik
2002-07-17 12:15       ` Udo A. Steinberg
2002-07-17 12:29         ` Vojtech Pavlik
2002-07-17 12:41           ` Udo A. Steinberg
2002-07-17 12:44             ` Vojtech Pavlik
2002-07-17 12:54               ` Udo A. Steinberg
2002-07-17 13:00                 ` Vojtech Pavlik
2002-07-17 13:08                   ` Udo A. Steinberg
2002-07-17 10:23 ` Oliver Graf
  -- strict thread matches above, loose matches on Subject: below --
2002-07-17 12:55 Petr Vandrovec
2002-07-17 13:01 ` Vojtech Pavlik
2002-07-17 13:58   ` Gunther Mayer
2002-07-17 14:01     ` Vojtech Pavlik
2002-07-17 13:24 Petr Vandrovec
2002-07-18 10:17 Petr Vandrovec
2002-07-18 12:58 ` Vojtech Pavlik
2002-07-18 13:36 Petr Vandrovec
2002-07-18 13:45 ` Vojtech Pavlik

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox