Index | Thread | Search

From:
Alexandre Ratchov <alex@caoua.org>
Subject:
Re: uaudio(4): dynamic feature unit control size for UAC2
To:
Andrew Kloet <andrew@kloet.net>
Cc:
tech@openbsd.org
Date:
Thu, 12 Nov 2026 09:36:58 +0100

Download raw body.

Thread
On Tue, Nov 10, 2026 at 06:37:33PM -0500, Andrew Kloet wrote:
> Hello tech@
> 
> While attaching a 'Teenage Engineering EP-136' audio interface...
> uaudio(4) uaudio_process_unit() fails feature unit parsing.
> 
> Under UAUDIO_AC_FEATURE, the driver hardcodes size = 4 for UAUDIO_V2.
> However, both UAC1/2 specs read bControlSize from the descriptor.
> Hardcoding size = 4 causes uaudio_getnum() to overrun on devices whose
> feature units specify a different control size.
> 
> Fetching bControlSize dynamically for both V1 and V2 resolves the issue.
> 

AFAIU, the UAC 2.0 FEATURE_UNIT descriptor has not bControlSize
field. All the bmaControls bitmaps are of fixed size 4.

What causes the failure? Is the descriptor too small?