From nobody Mon Jul 5 23:57:04 2021 X-Original-To: usb@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 7B7B47CA0E6 for ; Mon, 5 Jul 2021 23:57:31 +0000 (UTC) (envelope-from wulf@FreeBSD.org) Received: from smtp.freebsd.org (smtp.freebsd.org [IPv6:2610:1c1:1:606c::24b:4]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "smtp.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4GJjKl35v5z4nNc; Mon, 5 Jul 2021 23:57:31 +0000 (UTC) (envelope-from wulf@FreeBSD.org) Received: from [192.168.0.30] (unknown [176.120.233.129]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client did not present a certificate) (Authenticated sender: wulf) by smtp.freebsd.org (Postfix) with ESMTPSA id CEE8910EA; Mon, 5 Jul 2021 23:57:30 +0000 (UTC) (envelope-from wulf@FreeBSD.org) Subject: Re: eGalax USB touchscreen issues To: Mark Kane Cc: usb@freebsd.org, hps@selasky.org References: <324d49ca-1c0e-659d-194d-ece4d5f7f5e2@FreeBSD.org> <0ae3fec48e2c351d2c006f4ba4932cd7@kane.mn> <166dd4d4-24cd-c24b-d75e-9a34fa734358@FreeBSD.org> <36983ce5-8358-5a04-2377-46067d3c3c79@FreeBSD.org> <59ba07a0ecbdac36746fe18ea5f0559f@kane.mn> From: Vladimir Kondratyev Message-ID: <92c855bf-a73a-bae5-fcdc-c5a88008739b@FreeBSD.org> Date: Tue, 6 Jul 2021 02:57:04 +0300 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:78.0) Gecko/20100101 Thunderbird/78.10.0 List-Id: FreeBSD List-Archive: https://lists.freebsd.org/archives/freebsd-usb List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-usb@freebsd.org X-BeenThere: freebsd-usb@freebsd.org MIME-Version: 1.0 In-Reply-To: <59ba07a0ecbdac36746fe18ea5f0559f@kane.mn> Content-Type: multipart/mixed; boundary="------------408055B6BAAF669D2B49145A" Content-Language: en-US X-ThisMailContainsUnwantedMimeParts: N This is a multi-part message in MIME format. --------------408055B6BAAF669D2B49145A Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit On 04.06.2021 03:37, Mark Kane wrote: > On 2021-06-02 20:14, Vladimir Kondratyev wrote: >>> For now, report descriptor is not broken but it still does not match my >>> expectations. Could you post output of >>> >>> install sysutils/hid-tools >>> sudo kldload hidraw.ko >>> sudo hid-decode /dev/hidraw# >>> >>> Where # is number corresponding your touchscreen >> >> One more patch :-) with relaxed as compared to MS specs requirements to >> usages presence. > > Thanks for the updated patches, I think we're getting very close :). > With latest patch: > I am sorry for my long silence. Please try updated patch. -- WBR Vladimir Kondratyev --------------408055B6BAAF669D2B49145A Content-Type: text/x-patch; charset=UTF-8; name="hpen.patch" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="hpen.patch" diff --git a/sys/dev/hid/hms.c b/sys/dev/hid/hms.c index 94267b3fcd5..0f60eec86a4 100644 --- a/sys/dev/hid/hms.c +++ b/sys/dev/hid/hms.c @@ -109,6 +109,7 @@ static const struct hidmap_item hms_map_wheel_rev[] = { /* A match on these entries will load hms */ static const struct hid_device_id hms_devs[] = { + { HID_TLC(HUP_GENERIC_DESKTOP, HUG_POINTER) }, { HID_TLC(HUP_GENERIC_DESKTOP, HUG_MOUSE) }, }; diff --git a/sys/dev/hid/hpen.c b/sys/dev/hid/hpen.c index 1d505e14089..d93c0cce9b5 100644 --- a/sys/dev/hid/hpen.c +++ b/sys/dev/hid/hpen.c @@ -72,7 +72,7 @@ static hidmap_cb_t hpen_final_pen_cb; HIDMAP_ABS_CB(HUP_DIGITIZERS, HUD_##usage, &cb) /* Generic map digitizer page map according to hut1_12v2.pdf */ -static const struct hidmap_item hpen_map_digi[] = { +static const struct hidmap_item hpen_map[] = { { HPEN_MAP_ABS_GD(X, ABS_X), .required = true }, { HPEN_MAP_ABS_GD(Y, ABS_Y), .required = true }, { HPEN_MAP_ABS( TIP_PRESSURE, ABS_PRESSURE) }, @@ -88,28 +88,21 @@ static const struct hidmap_item hpen_map_digi[] = { { HPEN_MAP_BUT( ERASER, BTN_TOUCH) }, { HPEN_MAP_BUT( TABLET_PICK, BTN_STYLUS2) }, { HPEN_MAP_BUT( SEC_BARREL_SWITCH,BTN_STYLUS2) }, - { HIDMAP_FINAL_CB( &hpen_final_digi_cb) }, }; -/* Microsoft-standardized pen support */ static const struct hidmap_item hpen_map_pen[] = { - { HPEN_MAP_ABS_GD(X, ABS_X), .required = true }, - { HPEN_MAP_ABS_GD(Y, ABS_Y), .required = true }, - { HPEN_MAP_ABS( TIP_PRESSURE, ABS_PRESSURE), .required = true }, - { HPEN_MAP_ABS( X_TILT, ABS_TILT_X) }, - { HPEN_MAP_ABS( Y_TILT, ABS_TILT_Y) }, - { HPEN_MAP_ABS_CB(BATTERY_STRENGTH, hpen_battery_strenght_cb) }, - { HPEN_MAP_BUT( TIP_SWITCH, BTN_TOUCH), .required = true }, - { HPEN_MAP_BUT( IN_RANGE, BTN_TOOL_PEN), .required = true }, - { HPEN_MAP_BUT( BARREL_SWITCH, BTN_STYLUS) }, - { HPEN_MAP_BUT( INVERT, BTN_TOOL_RUBBER), .required = true }, - { HPEN_MAP_BUT( ERASER, BTN_TOUCH), .required = true }, { HIDMAP_FINAL_CB( &hpen_final_pen_cb) }, }; +static const struct hidmap_item hpen_map_digi[] = { + { HIDMAP_FINAL_CB( &hpen_final_digi_cb) }, +}; + static const struct hid_device_id hpen_devs[] = { { HID_TLC(HUP_DIGITIZERS, HUD_DIGITIZER) }, { HID_TLC(HUP_DIGITIZERS, HUD_PEN) }, + { HID_TLC(HUP_DIGITIZERS, HUD_TOUCHSCREEN), + HID_BVP(BUS_USB, USB_VENDOR_EGALAX, USB_PRODUCT_EGALAX_TPANEL) }, }; static int @@ -138,24 +131,26 @@ static int hpen_final_digi_cb(HIDMAP_CB_ARGS) { struct evdev_dev *evdev = HIDMAP_CB_GET_EVDEV(); - - if (HIDMAP_CB_GET_STATE() == HIDMAP_CB_IS_ATTACHING) + if (HIDMAP_CB_GET_STATE() == HIDMAP_CB_IS_ATTACHING) { evdev_support_prop(evdev, INPUT_PROP_POINTER); + /* Do not execute callback at interrupt handler and detach */ + return (ENOSYS); + } - /* Do not execute callback at interrupt handler and detach */ - return (ENOSYS); + return (0); } static int hpen_final_pen_cb(HIDMAP_CB_ARGS) { struct evdev_dev *evdev = HIDMAP_CB_GET_EVDEV(); - - if (HIDMAP_CB_GET_STATE() == HIDMAP_CB_IS_ATTACHING) + if (HIDMAP_CB_GET_STATE() == HIDMAP_CB_IS_ATTACHING) { evdev_support_prop(evdev, INPUT_PROP_DIRECT); + /* Do not execute callback at interrupt handler and detach */ + return (ENOSYS); + } - /* Do not execute callback at interrupt handler and detach */ - return (ENOSYS); + return (0); } static void @@ -186,7 +181,7 @@ hpen_probe(device_t dev) { struct hidmap *hm = device_get_softc(dev); int error; - bool is_pen; + const char *suffix; error = HIDBUS_LOOKUP_DRIVER_INFO(dev, hpen_devs); if (error != 0) @@ -194,15 +189,31 @@ hpen_probe(device_t dev) hidmap_set_dev(hm, dev); + error = HIDMAP_ADD_MAP(hm, hpen_map, NULL); + if (error != 0) + return (error); + /* Check if report descriptor belongs to a HID tablet device */ - is_pen = hidbus_get_usage(dev) == HID_USAGE2(HUP_DIGITIZERS, HUD_PEN); - error = is_pen - ? HIDMAP_ADD_MAP(hm, hpen_map_pen, NULL) - : HIDMAP_ADD_MAP(hm, hpen_map_digi, NULL); + switch (HID_GET_USAGE(hidbus_get_usage(dev))) { + case HUD_PEN: + error = HIDMAP_ADD_MAP(hm, hpen_map_pen, NULL); + suffix = "Pen"; + break; + case HUD_TOUCHSCREEN: + error = HIDMAP_ADD_MAP(hm, hpen_map_pen, NULL); + suffix = "TouchScreen"; + break; + case HUD_DIGITIZER: + error = HIDMAP_ADD_MAP(hm, hpen_map_digi, NULL); + suffix = "Digitizer"; + break; + default: + KASSERT(1 == 0, ("Unknown usage")); + } if (error != 0) return (error); - hidbus_set_desc(dev, is_pen ? "Pen" : "Digitizer"); + hidbus_set_desc(dev, suffix); return (BUS_PROBE_DEFAULT); } --------------408055B6BAAF669D2B49145A-- From nobody Thu Jul 8 23:21:13 2021 X-Original-To: usb@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 31E9811E0A58 for ; Thu, 8 Jul 2021 23:21:13 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4GLXNT0gy1z3m8r for ; Thu, 8 Jul 2021 23:21:13 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from kenobi.freebsd.org (kenobi.freebsd.org [IPv6:2610:1c1:1:606c::50:1d]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id F3C2D1CAC for ; Thu, 8 Jul 2021 23:21:12 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from kenobi.freebsd.org ([127.0.1.5]) by kenobi.freebsd.org (8.15.2/8.15.2) with ESMTP id 168NLCgp085260 for ; Thu, 8 Jul 2021 23:21:12 GMT (envelope-from bugzilla-noreply@freebsd.org) Received: (from www@localhost) by kenobi.freebsd.org (8.15.2/8.15.2/Submit) id 168NLCml085259 for usb@FreeBSD.org; Thu, 8 Jul 2021 23:21:12 GMT (envelope-from bugzilla-noreply@freebsd.org) X-Authentication-Warning: kenobi.freebsd.org: www set sender to bugzilla-noreply@freebsd.org using -f From: bugzilla-noreply@freebsd.org To: usb@FreeBSD.org Subject: [Bug 121275] [boot] [panic] FreeBSD fails to boot with usb legacy support enabled Date: Thu, 08 Jul 2021 23:21:13 +0000 X-Bugzilla-Reason: AssignedTo X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: Base System X-Bugzilla-Component: usb X-Bugzilla-Version: 7.0-RELEASE X-Bugzilla-Keywords: loader X-Bugzilla-Severity: Affects Only Me X-Bugzilla-Who: imp@FreeBSD.org X-Bugzilla-Status: Closed X-Bugzilla-Resolution: FIXED X-Bugzilla-Priority: Normal X-Bugzilla-Assigned-To: usb@FreeBSD.org X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: resolution bug_status Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: https://bugs.freebsd.org/bugzilla/ Auto-Submitted: auto-generated List-Id: FreeBSD List-Archive: https://lists.freebsd.org/archives/freebsd-usb List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-usb@freebsd.org X-BeenThere: freebsd-usb@freebsd.org MIME-Version: 1.0 X-ThisMailContainsUnwantedMimeParts: N https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D121275 Warner Losh changed: What |Removed |Added ---------------------------------------------------------------------------- Resolution|--- |FIXED Status|Open |Closed --- Comment #3 from Warner Losh --- This has been fixed for a long time. --=20 You are receiving this mail because: You are the assignee for the bug.= From nobody Fri Jul 9 15:29:19 2021 X-Original-To: usb@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 094B011DCA97 for ; Fri, 9 Jul 2021 15:29:19 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4GLxsV6nl1z3s7f for ; Fri, 9 Jul 2021 15:29:18 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from kenobi.freebsd.org (kenobi.freebsd.org [IPv6:2610:1c1:1:606c::50:1d]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id CE46E16E74 for ; Fri, 9 Jul 2021 15:29:18 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from kenobi.freebsd.org ([127.0.1.5]) by kenobi.freebsd.org (8.15.2/8.15.2) with ESMTP id 169FTIQ6095962 for ; Fri, 9 Jul 2021 15:29:18 GMT (envelope-from bugzilla-noreply@freebsd.org) Received: (from www@localhost) by kenobi.freebsd.org (8.15.2/8.15.2/Submit) id 169FTIwP095961 for usb@FreeBSD.org; Fri, 9 Jul 2021 15:29:18 GMT (envelope-from bugzilla-noreply@freebsd.org) X-Authentication-Warning: kenobi.freebsd.org: www set sender to bugzilla-noreply@freebsd.org using -f From: bugzilla-noreply@freebsd.org To: usb@FreeBSD.org Subject: [Bug 257082] Sound with Scarlett Solo 3rd intermittently cuts off for very short periods of milliseconds. Date: Fri, 09 Jul 2021 15:29:19 +0000 X-Bugzilla-Reason: AssignedTo X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: Base System X-Bugzilla-Component: usb X-Bugzilla-Version: 13.0-STABLE X-Bugzilla-Keywords: X-Bugzilla-Severity: Affects Only Me X-Bugzilla-Who: hodong@nimfsoft.com X-Bugzilla-Status: New X-Bugzilla-Resolution: X-Bugzilla-Priority: --- X-Bugzilla-Assigned-To: usb@FreeBSD.org X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: bug_id short_desc product version rep_platform op_sys bug_status bug_severity priority component assigned_to reporter Message-ID: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: https://bugs.freebsd.org/bugzilla/ Auto-Submitted: auto-generated List-Id: FreeBSD List-Archive: https://lists.freebsd.org/archives/freebsd-usb List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-usb@freebsd.org X-BeenThere: freebsd-usb@freebsd.org MIME-Version: 1.0 X-ThisMailContainsUnwantedMimeParts: N https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D257082 Bug ID: 257082 Summary: Sound with Scarlett Solo 3rd intermittently cuts off for very short periods of milliseconds. Product: Base System Version: 13.0-STABLE Hardware: Any OS: Any Status: New Severity: Affects Only Me Priority: --- Component: usb Assignee: usb@FreeBSD.org Reporter: hodong@nimfsoft.com Hello. Sound with Scarlett Solo 3rd intermittently cuts off for very short periods= of milliseconds within a few minutes. At this moment crackling noise occurs. Sometimes there is no sound for 0.0x seconds. I tried it on Linux (kernel 5.10.x) and MS Windows 10 as a test, and it wor= ks fine. % uname -a FreeBSD nimfsoft 13.0-RELEASE-p3 FreeBSD 13.0-RELEASE-p3 #0: Tue Jun 29 19:46:20 UTC 2021=20=20=20=20 root@amd64-builder.daemonology.net:/usr/obj/usr/src/amd64.amd64/sys/GENERIC= =20 amd64 % dmesg | grep uaudio uaudio0 on uhub0 uaudio0: on usbus1 uaudio0: Play[0]: 192000 Hz, 2 ch, 32-bit S-LE PCM format, 2x8ms buffer. uaudio0: Play[0]: 176400 Hz, 2 ch, 32-bit S-LE PCM format, 2x8ms buffer. uaudio0: Play[0]: 96000 Hz, 2 ch, 32-bit S-LE PCM format, 2x8ms buffer. uaudio0: Play[0]: 88200 Hz, 2 ch, 32-bit S-LE PCM format, 2x8ms buffer. uaudio0: Play[0]: 48000 Hz, 2 ch, 32-bit S-LE PCM format, 2x8ms buffer. uaudio0: Play[0]: 44100 Hz, 2 ch, 32-bit S-LE PCM format, 2x8ms buffer. uaudio0: Record[0]: 192000 Hz, 2 ch, 32-bit S-LE PCM format, 2x8ms buffer. uaudio0: Record[0]: 176400 Hz, 2 ch, 32-bit S-LE PCM format, 2x8ms buffer. uaudio0: Record[0]: 96000 Hz, 2 ch, 32-bit S-LE PCM format, 2x8ms buffer. uaudio0: Record[0]: 88200 Hz, 2 ch, 32-bit S-LE PCM format, 2x8ms buffer. uaudio0: Record[0]: 48000 Hz, 2 ch, 32-bit S-LE PCM format, 2x8ms buffer. uaudio0: Record[0]: 44100 Hz, 2 ch, 32-bit S-LE PCM format, 2x8ms buffer. uaudio0: No MIDI sequencer. pcm4: on uaudio0 uaudio0: No HID volume keys found. % cat /dev/sndstat Installed devices: pcm0: (play) pcm1: (play) pcm2: (play/rec) pcm3: (play/rec) pcm4: (play/rec) default No devices installed from userspace. % sudo usbconfig ugen1.1: <0x1022 XHCI root HUB> at usbus1, cfg=3D0 md=3DHOST spd=3DSUPER (5= .0Gbps) pwr=3DSAVE (0mA) ugen0.1: <0x1022 XHCI root HUB> at usbus0, cfg=3D0 md=3DHOST spd=3DSUPER (5= .0Gbps) pwr=3DSAVE (0mA) ugen1.2: at usbus1, cfg=3D0 md=3DHOST spd=3DH= IGH (480Mbps) pwr=3DON (500mA) ugen1.3: at usbus1, cfg=3D0 md=3DHOST spd=3DFULL (1= 2Mbps) pwr=3DON (98mA) ugen1.4: at usbus1, cfg=3D0 md=3DHOST spd=3DFULL (12M= bps) pwr=3DON (300mA) % sudo usbconfig -d 1.2 dump_all_desc ugen1.2: at usbus1, cfg=3D0 md=3DHOST spd=3DH= IGH (480Mbps) pwr=3DON (500mA) bLength =3D 0x0012 bDescriptorType =3D 0x0001 bcdUSB =3D 0x0210 bDeviceClass =3D 0x00ef bDeviceSubClass =3D 0x0002 bDeviceProtocol =3D 0x0001 bMaxPacketSize0 =3D 0x0040 idVendor =3D 0x1235 idProduct =3D 0x8211 bcdDevice =3D 0x05ff iManufacturer =3D 0x0001 iProduct =3D 0x0003 iSerialNumber =3D 0x0002 bNumConfigurations =3D 0x0001 Configuration index 0 bLength =3D 0x0009 bDescriptorType =3D 0x0002 wTotalLength =3D 0x0126 bNumInterfaces =3D 0x0005 bConfigurationValue =3D 0x0001 iConfiguration =3D 0x0009 bmAttributes =3D 0x0080 bMaxPower =3D 0x00fa Additional Descriptor bLength =3D 0x08 bDescriptorType =3D 0x0b bDescriptorSubType =3D 0x00 RAW dump: 0x00 | 0x08, 0x0b, 0x00, 0x03, 0x01, 0x00, 0x20, 0x00 Interface 0 bLength =3D 0x0009 bDescriptorType =3D 0x0004 bInterfaceNumber =3D 0x0000 bAlternateSetting =3D 0x0000 bNumEndpoints =3D 0x0000 bInterfaceClass =3D 0x0001