Re: ukbd key repeat behaviour changed?

2020-03-04 Thread Hans Petter Selasky


However, to confirm it's not just my typing, I booted into my old kernel 
(r357365) and I don't see the issue as in the newer revision (r358484).

I think it may be something to do with the latest version not resetting the 
initial repeat delay when another key is pressed, e.g.

1) Hold down the 'a' key.
2) Wait a split second just before the 'a' key should start repeating, and 
press 'l' key whilst still holding the 'a' key.
3) There should be a renewed initial delay before the 'l' key starts repeating, 
but I think it starts repeating almost immediately (as if it were still 
counting from the press of the 'a' key).

Hope that makes some sense! :-)



Hi,

Can you try the attached patch?

Does it solve the issue?

--HPS
Index: sys/dev/usb/input/ukbd.c
===
--- sys/dev/usb/input/ukbd.c	(revision 358536)
+++ sys/dev/usb/input/ukbd.c	(working copy)
@@ -522,15 +522,9 @@
 if (ukbd_is_modifier_key(key))
 	continue;
 
-/*
- * Check for first new key and set
- * initial delay and [re]start timer:
- */
-if (sc->sc_repeat_key == 0) {
-	sc->sc_co_basetime = sbinuptime();
-	sc->sc_delay = sc->sc_kbd.kb_delay1;
-	ukbd_start_timer(sc);
-}
+sc->sc_co_basetime = sbinuptime();
+sc->sc_delay = sc->sc_kbd.kb_delay1;
+ukbd_start_timer(sc);
 
 /* set repeat time for last key */
 sc->sc_repeat_time = now + sc->sc_kbd.kb_delay1;
___
freebsd-usb@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-usb
To unsubscribe, send any mail to "freebsd-usb-unsubscr...@freebsd.org"


[Bug 222646] ukbd(4): support Consumer Control based multimedia keys

2020-03-04 Thread bugzilla-noreply
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=222646

--- Comment #12 from Vladimir Kondratyev  ---
The patch will not work for WASD keyboard as it's report descriptor does not
includes consumer page input usages. Most probably, consumer page is accessible
as separate USB HID device and is accessible with usbhidctl/usbhidaction utils.

-- 
You are receiving this mail because:
You are the assignee for the bug.
___
freebsd-usb@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-usb
To unsubscribe, send any mail to "freebsd-usb-unsubscr...@freebsd.org"


[Bug 194727] uaudio device gets disconnected, and hangs usb until everything using /dev/mixer* is closed

2020-03-04 Thread bugzilla-noreply
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=194727

--- Comment #22 from commit-h...@freebsd.org ---
A commit references this bug:

Author: hselasky
Date: Wed Mar  4 17:23:21 UTC 2020
New revision: 358629
URL: https://svnweb.freebsd.org/changeset/base/358629

Log:
  Implement a detaching flag for the sound(4) subsystem to take
  appropriate actions when we are trying to detach an audio device,
  but cannot because someone is using it.

  This avoids applications having to wait for the DSP read data
  timeout before they receive any error indication.
  Tested with virtual_oss(8).

  Remove some unused definitions while at it.

  PR:   194727
  MFC after:1 week
  Sponsored by: Mellanox Technologies

Changes:
  head/sys/dev/sound/pcm/dsp.c
  head/sys/dev/sound/pcm/mixer.c
  head/sys/dev/sound/pcm/sound.c
  head/sys/dev/sound/pcm/sound.h

-- 
You are receiving this mail because:
You are the assignee for the bug.
___
freebsd-usb@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-usb
To unsubscribe, send any mail to "freebsd-usb-unsubscr...@freebsd.org"


[Bug 222646] ukbd(4): support Consumer Control based multimedia keys

2020-03-04 Thread bugzilla-noreply
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=222646

Greg V  changed:

   What|Removed |Added

 Resolution|--- |Overcome By Events
 Status|New |Closed

--- Comment #13 from Greg V  ---
There is consumer page support in iichid now. (also I use a different mouse) so
I'm abandoning this patch.

-- 
You are receiving this mail because:
You are the assignee for the bug.
___
freebsd-usb@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-usb
To unsubscribe, send any mail to "freebsd-usb-unsubscr...@freebsd.org"


Re: ukbd key repeat behaviour changed?

2020-03-04 Thread James Wright



> On 4 Mar 2020, at 08:49, Hans Petter Selasky  wrote:
> 
>> However, to confirm it's not just my typing, I booted into my old kernel 
>> (r357365) and I don't see the issue as in the newer revision (r358484).
>> I think it may be something to do with the latest version not resetting the 
>> initial repeat delay when another key is pressed, e.g.
>> 1) Hold down the 'a' key.
>> 2) Wait a split second just before the 'a' key should start repeating, and 
>> press 'l' key whilst still holding the 'a' key.
>> 3) There should be a renewed initial delay before the 'l' key starts 
>> repeating, but I think it starts repeating almost immediately (as if it were 
>> still counting from the press of the 'a' key).
>> Hope that makes some sense! :-)
> 
> Hi,
> 
> Can you try the attached patch?
> 
> Does it solve the issue?
> 
> --HPS
> 


Thanks for the patch! 

Is there any way of easily testing it without rebuilding the whole kernel, as 
ukbd seems built in by default?


Thanks,
James
___
freebsd-usb@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-usb
To unsubscribe, send any mail to "freebsd-usb-unsubscr...@freebsd.org"


[Bug 244602] Media key support for WASD keyboard

2020-03-04 Thread bugzilla-noreply
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=244602

--- Comment #1 from Henry Hu  ---
The key reason seems to be that interface 1 has

  bInterfaceClass = 0x0003  
  bInterfaceSubClass = 0x0001 
  bInterfaceProtocol = 0x0002 

0x0001 = UISUBCLASS_BOOT
0x0002 = UIPROTO_MOUSE

Thus it's treated as a mouse, while in this case, it only has some media keys.
Maybe ums should not attach if there is no mouse button or axis?

-- 
You are receiving this mail because:
You are the assignee for the bug.
___
freebsd-usb@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-usb
To unsubscribe, send any mail to "freebsd-usb-unsubscr...@freebsd.org"


[Bug 222646] ukbd(4): support Consumer Control based multimedia keys

2020-03-04 Thread bugzilla-noreply
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=222646

--- Comment #14 from Henry Hu  ---
(In reply to Vladimir Kondratyev from comment #12)
Hans, yes, every key press there seem to be 2 reports:

19:36:22.021230 usbus0.2 SUBM-INTR-EP=0081,SPD=LOW,NFR=1,SLEN=0,IVAL=10
 frame[0] READ 8 bytes
19:36:22.021231 usbus0.2
DONE-INTR-EP=0081,SPD=LOW,NFR=1,SLEN=8,IVAL=10,ERR=0
 frame[0] READ 8 bytes
   00 00 00 00 00 00 00 00  -- -- -- -- -- -- -- --  ||
19:36:22.021353 usbus0.2
DONE-INTR-EP=0082,SPD=LOW,NFR=1,SLEN=8,IVAL=10,ERR=0
 frame[0] READ 7 bytes
   01 08 00 00 00 00 00 --  -- -- -- -- -- -- -- --  |... |
19:36:22.021356 usbus0.2 SUBM-INTR-EP=0082,SPD=LOW,NFR=1,SLEN=0,IVAL=10
 frame[0] READ 8 bytes

19:36:22.101224 usbus0.2 SUBM-INTR-EP=0081,SPD=LOW,NFR=1,SLEN=0,IVAL=10
 frame[0] READ 8 bytes
19:36:22.101225 usbus0.2
DONE-INTR-EP=0081,SPD=LOW,NFR=1,SLEN=8,IVAL=10,ERR=0
 frame[0] READ 8 bytes
   00 00 00 00 00 00 00 00  -- -- -- -- -- -- -- --  ||
19:36:22.101348 usbus0.2
DONE-INTR-EP=0082,SPD=LOW,NFR=1,SLEN=8,IVAL=10,ERR=0
 frame[0] READ 7 bytes
   01 00 00 00 00 00 00 --  -- -- -- -- -- -- -- --  |... |
19:36:22.101349 usbus0.2 SUBM-INTR-EP=0082,SPD=LOW,NFR=1,SLEN=0,IVAL=10
 frame[0] READ 8 bytes

Vladimir: There is another device, which is attached by ums driver, but
interestingly no button/axis is reported.

Greg: I may try iichid as well.

Let's open another PR to track this.

-- 
You are receiving this mail because:
You are the assignee for the bug.
___
freebsd-usb@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-usb
To unsubscribe, send any mail to "freebsd-usb-unsubscr...@freebsd.org"


Re: ukbd key repeat behaviour changed?

2020-03-04 Thread James Wright



> On 4 Mar 2020, at 21:29, Hans Petter Selasky  wrote:
> 
> On 2020-03-04 19:46, James Wright wrote:
>>> On 4 Mar 2020, at 08:49, Hans Petter Selasky  wrote:
>>> 
 However, to confirm it's not just my typing, I booted into my old kernel 
 (r357365) and I don't see the issue as in the newer revision (r358484).
 I think it may be something to do with the latest version not resetting 
 the initial repeat delay when another key is pressed, e.g.
 1) Hold down the 'a' key.
 2) Wait a split second just before the 'a' key should start repeating, and 
 press 'l' key whilst still holding the 'a' key.
 3) There should be a renewed initial delay before the 'l' key starts 
 repeating, but I think it starts repeating almost immediately (as if it 
 were still counting from the press of the 'a' key).
 Hope that makes some sense! :-)
>>> 
>>> Hi,
>>> 
>>> Can you try the attached patch?
>>> 
>>> Does it solve the issue?
>>> 
>>> --HPS
>>> 
>> Thanks for the patch!
>> Is there any way of easily testing it without rebuilding the whole kernel, 
>> as ukbd seems built in by default?
> 
> Hi,
> 
> make buildkernel -jX -DNO_CLEAN
> 
> might save you some time.
> 
> --HPS
> 

The patch does indeed fix the issue.

Thanks for sorting it out so quickly, do you need me to raise a bugzilla ticket 
for this?

James

___
freebsd-usb@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-usb
To unsubscribe, send any mail to "freebsd-usb-unsubscr...@freebsd.org"


[Bug 244602] Media key support for WASD keyboard

2020-03-04 Thread bugzilla-noreply
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=244602

Bug ID: 244602
   Summary: Media key support for WASD keyboard
   Product: Base System
   Version: 12.1-STABLE
  Hardware: Any
OS: Any
Status: New
  Severity: Affects Only Me
  Priority: ---
 Component: usb
  Assignee: u...@freebsd.org
  Reporter: henry.hu...@gmail.com

There are media keys on the WASD keyboard (https://www.wasdkeyboards.com/).
However, they are not recognized by FreeBSD. Pressing them does not result in
any keyboard event in X.

The keyboard shows 2 interfaces:
 Configuration index 0

bLength = 0x0009 
bDescriptorType = 0x0002 
wTotalLength = 0x003b 
bNumInterfaces = 0x0002 
bConfigurationValue = 0x0001 
iConfiguration = 0x  
bmAttributes = 0x00a0 
bMaxPower = 0x0032 

Interface 0
  bLength = 0x0009 
  bDescriptorType = 0x0004 
  bInterfaceNumber = 0x 
  bAlternateSetting = 0x 
  bNumEndpoints = 0x0001 
  bInterfaceClass = 0x0003  
  bInterfaceSubClass = 0x0001 
  bInterfaceProtocol = 0x0001 
  iInterface = 0x  

  Additional Descriptor

  bLength = 0x09
  bDescriptorType = 0x21
  bDescriptorSubType = 0x10
   RAW dump: 
   0x00 | 0x09, 0x21, 0x10, 0x01, 0x00, 0x01, 0x22, 0x3e, 
   0x08 | 0x00

 Endpoint 0
bLength = 0x0007 
bDescriptorType = 0x0005 
bEndpointAddress = 0x0081  
bmAttributes = 0x0003  
wMaxPacketSize = 0x0008 
bInterval = 0x000a 
bRefresh = 0x 
bSynchAddress = 0x 


Interface 1
  bLength = 0x0009 
  bDescriptorType = 0x0004 
  bInterfaceNumber = 0x0001 
  bAlternateSetting = 0x 
  bNumEndpoints = 0x0001 
  bInterfaceClass = 0x0003  
  bInterfaceSubClass = 0x0001 
  bInterfaceProtocol = 0x0002 
  iInterface = 0x  

  Additional Descriptor

  bLength = 0x09
  bDescriptorType = 0x21
  bDescriptorSubType = 0x10
   RAW dump: 
   0x00 | 0x09, 0x21, 0x10, 0x01, 0x00, 0x01, 0x22, 0xa6, 
   0x08 | 0x00

 Endpoint 0
bLength = 0x0007 
bDescriptorType = 0x0005 
bEndpointAddress = 0x0082  
bmAttributes = 0x0003  
wMaxPacketSize = 0x0008 
bInterval = 0x000a 
bRefresh = 0x 
bSynchAddress = 0x 

ukbd attaches to interface 0, and ums attaches to interface 1.
Interface 0's HID report descriptor is a general one:

0x05, 0x01,// Usage Page (Generic Desktop Ctrls)
0x09, 0x06,// Usage (Keyboard)
0xA1, 0x01,// Collection (Application)
0x05, 0x07,//   Usage Page (Kbrd/Keypad)

// Control/Alt etc.
0x19, 0xE0,//   Usage Minimum (0xE0)
0x29, 0xE7,//   Usage Maximum (0xE7)
0x15, 0x00,//   Logical Minimum (0)
0x25, 0x01,//   Logical Maximum (1)
0x75, 0x01,//   Report Size (1)
0x95, 0x08,//   Report Count (8)
0x81, 0x02,//   Input (Data,Var,Abs,No Wrap,Linear,Preferred State,No
Null Position)
// Padding
0x95, 0x01,//   Report Count (1)
0x75, 0x08,//   Report Size (8)
0x81, 0x01,//   Input (Const,Array,Abs,No Wrap,Linear,Preferred
State,No Null Position)
// LEDs
0x95, 0x03,//   Report Count (3)
0x75, 0x01,//   Report Size (1)
0x05, 0x08,//   Usage Page (LEDs)
0x19, 0x01,//   Usage Minimum (Num Lock)
0x29, 0x03,//   Usage Maximum (Scroll Lock)
0x91, 0x02,//   Output (Data,Var,Abs,No Wrap,Linear,Preferred State,No
Null Position,Non-volatile)
// Padding
0x95, 0x05,//   Report Count (5)
0x75, 0x01,//   Report Size (1)
0x91, 0x01,//   Output (Const,Array,Abs,No Wrap,Linear,Preferred
State,No Null Position,Non-volatile)
// Key array
0x95, 0x06,//   Report Count (6)
0x75, 0x08,//   Report Size (8)
0x26, 0xFF, 0x00,  //   Logical Maximum (255)
0x05, 0x07,//   Usage Page (Kbrd/Keypad)
0x19, 0x00,//   Usage Minimum (0x00)
0x29, 0x91,//   Usage Maximum (0x91)
0x81, 0x00,//   Input (Data,Array,Abs,No Wrap,Linear,Preferred State,No
Null Position)

0xC0,  // End Collection

// 62 bytes

The interesting keys are in the interface 1:
Report descriptor:
Collection type=Application page=Consumer usage=Consumer_Control
Input   rid=1 pos=0 size=1 count=1 page=Consumer usage=Help, logical range 0..1
Input   rid=1 pos=1 size=1 count=1 page=Consumer usage=Mute, logical range 0..1
Input   rid=1 pos=2 size=1 count=1 page=Consumer usage=Volume_Decrement,
logical range 0..1
Input   rid=1 pos=3 size=1 count=1 page=Consumer usage=Volume_Increment,
logical range 0..1
Input   rid=1 pos=4 size=1 count=1 page=Consumer usage=AL_Word_Processor,
logical range 0..1
Input   rid=1 pos=5 size=1 count=1 page=Consumer usage=AL_Spreadsheet, logical
range 0..1
Input   rid=1 pos=6 size=1 count=1 

Re: ukbd key repeat behaviour changed?

2020-03-04 Thread Hans Petter Selasky

On 2020-03-04 19:46, James Wright wrote:




On 4 Mar 2020, at 08:49, Hans Petter Selasky  wrote:


However, to confirm it's not just my typing, I booted into my old kernel 
(r357365) and I don't see the issue as in the newer revision (r358484).
I think it may be something to do with the latest version not resetting the 
initial repeat delay when another key is pressed, e.g.
1) Hold down the 'a' key.
2) Wait a split second just before the 'a' key should start repeating, and 
press 'l' key whilst still holding the 'a' key.
3) There should be a renewed initial delay before the 'l' key starts repeating, 
but I think it starts repeating almost immediately (as if it were still 
counting from the press of the 'a' key).
Hope that makes some sense! :-)


Hi,

Can you try the attached patch?

Does it solve the issue?

--HPS




Thanks for the patch!

Is there any way of easily testing it without rebuilding the whole kernel, as 
ukbd seems built in by default?



Hi,

make buildkernel -jX -DNO_CLEAN

might save you some time.

--HPS

___
freebsd-usb@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-usb
To unsubscribe, send any mail to "freebsd-usb-unsubscr...@freebsd.org"


[Bug 222646] ukbd(4): support Consumer Control based multimedia keys

2020-03-04 Thread bugzilla-noreply
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=222646

--- Comment #10 from Hans Petter Selasky  ---
Henry:

Try to run:

usbdump -i usbusX -f Y -s 65536 -vvv

where X.Y are the numbers after ugenX.Y for your keyboard.

It will show the actual event data packet.

--HPS

-- 
You are receiving this mail because:
You are the assignee for the bug.
___
freebsd-usb@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-usb
To unsubscribe, send any mail to "freebsd-usb-unsubscr...@freebsd.org"


[Bug 222646] ukbd(4): support Consumer Control based multimedia keys

2020-03-04 Thread bugzilla-noreply
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=222646

--- Comment #11 from Hans Petter Selasky  ---
Greg: You need to rebase your patch again.

After the gamers keyboard support, keycode's are gone and we now have a bitmap
where we set all the input keys!

-- 
You are receiving this mail because:
You are the assignee for the bug.
___
freebsd-usb@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-usb
To unsubscribe, send any mail to "freebsd-usb-unsubscr...@freebsd.org"