On Thu, 12 Jun 2003, Clemens Ladisch wrote:
> I didn't see your first post (maybe because the current list moderator
> is Dave Null),

OK, so I won't feel bad sending the diff a second time, then. :)

> so I'm only guessing what your diff did.
>
[...]
> > > When in Advanced Mode, the UA-5 exposes all its interfaces in class
> > > 255/255 (Vendor/Vendor), but actually besides this all the
> > > descriptors are valid USB Audio control/interfaces/endpoints/...
[...]
> There already is a quirk type for this, QUIRK_STANDARD_INTERFACE. See
> the quirk entry for the UA-20, which behaves in the same way (the
> UA-20's interface #3 is for the MIDI ports).

That's what I hoped too (didn't want to have to change usbaudio.c if at
all possible) but it didn't seem to work. (My understanding is that
STANDARD_INTERFACE needs at least the bInterfaceSubClass info to be valid.
This isn't the case on the UA-5.)

Here's the interesting part of the quirk I proposed (mostly a rewrite of
STANDARD_INTERFACE that goes blindly trusting what usbquirks.h says):

  for( i = 0; i < iface->num_altsetting; i++ )
  {
    alts = &iface->altsetting[i];
    altsd = get_iface_desc(alts);
    altsd->bInterfaceClass = USB_CLASS_AUDIO;
    altsd->bInterfaceSubClass = USB_SUBCLASS_AUDIO_STREAMING;
  }

[I'm not sure the overwrite of Vendor with USB_CLASS_AUDIO is strictly
required, but it didn't hurt and is consistent with changing the
subclass.]

Of course since it's my first time looking at alsa/kernel, I may just be
plain off-track. :)
S.

Attachment: ua5.diff.gz
Description: Binary data

Reply via email to