From owner-freebsd-usb@freebsd.org Wed Jan 9 17:52:34 2019 Return-Path: Delivered-To: freebsd-usb@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id DD70914886D1 for ; Wed, 9 Jan 2019 17:52:33 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from mailman.ysv.freebsd.org (mailman.ysv.freebsd.org [IPv6:2001:1900:2254:206a::50:5]) by mx1.freebsd.org (Postfix) with ESMTP id 74EDD6C570 for ; Wed, 9 Jan 2019 17:52:33 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: by mailman.ysv.freebsd.org (Postfix) id 3770614886D0; Wed, 9 Jan 2019 17:52:33 +0000 (UTC) Delivered-To: usb@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 14C0A14886CB for ; Wed, 9 Jan 2019 17:52:33 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from mxrelay.ysv.freebsd.org (mxrelay.ysv.freebsd.org [IPv6:2001:1900:2254:206a::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.ysv.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id A77B16C56E for ; Wed, 9 Jan 2019 17:52:32 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from kenobi.freebsd.org (kenobi.freebsd.org [IPv6:2001:1900:2254:206a::16:76]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.ysv.freebsd.org (Postfix) with ESMTPS id E2C8013280 for ; Wed, 9 Jan 2019 17:52:31 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from kenobi.freebsd.org ([127.0.1.118]) by kenobi.freebsd.org (8.15.2/8.15.2) with ESMTP id x09HqVdB021187 for ; Wed, 9 Jan 2019 17:52:31 GMT (envelope-from bugzilla-noreply@freebsd.org) Received: (from www@localhost) by kenobi.freebsd.org (8.15.2/8.15.2/Submit) id x09HqV3t021186 for usb@FreeBSD.org; Wed, 9 Jan 2019 17:52:31 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 234794] snd_uaudio: Quirks for Edirol UA-25EX in advanced driver mode Date: Wed, 09 Jan 2019 17:52:31 +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: CURRENT X-Bugzilla-Keywords: X-Bugzilla-Severity: Affects Only Me X-Bugzilla-Who: dev@submerge.ch 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 attachments.created 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 MIME-Version: 1.0 X-BeenThere: freebsd-usb@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: FreeBSD support for USB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 09 Jan 2019 17:52:34 -0000 https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D234794 Bug ID: 234794 Summary: snd_uaudio: Quirks for Edirol UA-25EX in advanced driver mode Product: Base System Version: CURRENT Hardware: Any OS: Any Status: New Severity: Affects Only Me Priority: --- Component: usb Assignee: usb@FreeBSD.org Reporter: dev@submerge.ch Created attachment 200961 --> https://bugs.freebsd.org/bugzilla/attachment.cgi?id=3D200961&action= =3Dedit Add vendor class quirk and ignore missing Audio Control header. The Edirol UA-25EX USB 1.1 audio interface has an advanced driver mode which enables 24 bit operation at up to 96kHz. Unfortunately this mode is not cla= ss compliant and needs some additional quirks to get it running. How to reproduce: 1. Set the "ADVANCED DRIVER" switch on the back of the device to "ON". 2. Pull out the device and plug it in again (needed when changing switches). The device will not be detected by snd_uaudio. Analysis: There are actually two problems that prevent proper device detection. a) The USB descriptors indicate a vendor specific implementation. b) The Audio Control header is completely omitted from the descriptors. Issue a) is easy to circumvent with the UQ_AU_VENDOR_CLASS quirk. It can be applied by adding the following line to /boot/loader.conf: hw.usb.quirk.0=3D"0x0582 0x00e6 0x0000 0xffff UQ_AU_VENDOR_CLASS" While this will get the MIDI part detected, no audio stream channels are considered due to the Audio Control header missing. Patch: The patch provided is based on FreeBSD CURRENT. In my basic tests it result= s in a fully working device, for all settings of the physical sample rate switch= . It adds both the device quirk for a) and solves the channel detection for issue b). The latter is achieved by matching the device specifically when being attached, and setting a flag to make channel detection ignore the missing A= udio Control header. Mixer detection is not an issue in this case since mixers are all hardware only. I'm sure this is not the most elegant way to code it, and I am open for suggestions. I could probably factor out the changes for issue b) into a generic quirk, e.g. as UQ_AU_NO_AC_HEADER. Also some quirks seem to be unimplemented, like UQ_AU_INP_ASYNC and UQ_BAD_= ADC. Did I miss something? --=20 You are receiving this mail because: You are the assignee for the bug.=