On Tue, Aug 17, 2021 at 10:08:35PM +0200, Paul de Weerd wrote:
> Hi Anton,
>
> Thanks - I've applied your diff and built a kernel with it. Full
> dmesg (both before and after) at the end of this mail, diff is:
>
> -uhid2 at uhidev3 reportid 3: input=3, output=0, feature=0
> +ucc0 at uhidev3 reportid 3 keys 24, mappings 7
> +wskbd3 at ucc0 mux 1
>
> -wskbd3 at ukbd2 mux 1
> -uhid3 at uhidev5 reportid 3: input=4, output=0, feature=0
> -uhid4 at uhidev5 reportid 4: input=1, output=0, feature=0
> -uhidpp0 at uhidev5 reportid 16
> +wskbd4 at ukbd2 mux 1
> +ucc1 at uhidev5 reportid 3 keys 0, mappings 0
> +uhid2 at uhidev5 reportid 4: input=1, output=0, feature=0
> +uhidpp0 at uhidev5 reportid 16
>
> That is with this keyboard:
>
> [weerd@pom] $ dmesg | grep Metadot
> uhidev2 at uhub3 port 4 configuration 1 interface 0 "Metadot - Das Keyboard
> Das Keyboard" rev 2.00/1.00 addr 4
> uhidev3 at uhub3 port 4 configuration 1 interface 1 "Metadot - Das Keyboard
> Das Keyboard" rev 2.00/1.00 addr 4
> [weerd@pom] $ usbdevs -v -a 04
> addr 04: 24f0:0140 Metadot - Das Keyboard, Das Keyboard
> full speed, power 100 mA, config 1, rev 1.00
> driver: uhidev2
> driver: uhidev3
>
> (there's a few more deltas that I'm leaving out due to an external
> AHCI controller not being detected).
>
> Anyway, I see two ucc(4) devices - not sure why that is; assuming it's
> because the keyboard itself also shows up twice. But at least the
> volume control works. Playing an audio file with mpd and turning the
> big volume knob on my keyboard changes the volume (also indicated by
> sndioctl(1). The 'mute' button doesn't do anything, but I may have to
> dig a bit more into how this works first.
>
> I'll play around with this a bit more, but initial results look very
> promising - thanks for this new driver!
The second one is from your Logitech MX518 mouse. What would be helpful
is a raw dump of the USB HID report descriptor from both the mouse and
your keyboard. In order get the reports, one must boot a kernel without
ucc making the two devices attach as uhid as opposed of being matched by
ucc. Then run the following command once per device, the uhid numbers
are taken from your dmesg before applying the ucc diff:
# usbhidctl -f /dev/uhid2 -R >keyboard
# usbhidctl -f /dev/uhid3 -R >mouse
As for the mute button, could you enable UCC_DEBUG in dev/usb/ucc.c,
compile and install the new kernel, make sure to press the mute button
and then send me the dmesg output please.