On Tue, Jan 26, 2021 at 08:56:29PM +0000, Edd Barrett wrote:
> Hi,
> 
> I've recently come across a uaudio device which doesn't work in OpenBSD:
> 
> uaudio2 at uhub0 port 1 configuration 1 interface 3 "E+ Corp. DAC Audio" rev 
> 1.10/0.01 addr 2
> uaudio2: class v1, full-speed, async, channels: 2 play, 0 rec, 3 ctls
> audio3 at uaudio2
> 
> When opening the audio device, the kernel reports `uaudio0: can't get iface
> handle` in the dmesg buffer.
> 
> I posted information about the device and sthen@ and kettenis@ spotted
> the problem: the device exposes non-consecutive interface numbers, and
> is thus not compliant with the USB standard.
> 
> It has interfaces 0, 1 and 3, in that order. The audio stream is on
> interface 3, which the kernel expects to find at index 3 in the ifaces
> array, but actually it's at index 2!
> 
> I've pasted a load of info about the device (lsusb and debug kernel
> output) here:
> https://gist.github.com/vext01/958756d0fd515cc321f99a3ee1e3351a
> 
> The following diff makes this device work. It searches the ifaces array
> in the event that the correct entry is not found at the expect index.
> This should be a "no functional change" for all existing compliant
> devices.
> 
> I've tested this for the past two days and all seems well, but I'd like
> some USB stack hackers to verify it.
> 

This also fixes another audio device. AFAICS this diff doesn't change
the code-path for compliant devices, so I don't see how this could
cause problems

ok ratchov

(could you split the long comment line, please)

Reply via email to