/* * combine bytes and get an integer value
*/ unsignedint snd_usb_combine_bytes(unsignedchar *bytes, int size)
{ switch (size) { case 1: return *bytes; case 2: return combine_word(bytes); case 3: return combine_triple(bytes); case 4: return combine_quad(bytes); default: return 0;
}
}
/* * parse descriptor buffer and return the pointer starting the given * descriptor type.
*/ void *snd_usb_find_desc(void *descstart, int desclen, void *after, u8 dtype)
{
u8 *p, *end, *next;
p = descstart;
end = p + desclen; for (; p < end;) { if (p[0] < 2) return NULL;
next = p + p[0]; if (next > end) return NULL; if (p[1] == dtype && (!after || (void *)p > after)) { return p;
}
p = next;
} return NULL;
}
/* * find a class-specified interface descriptor with the given subtype.
*/ void *snd_usb_find_csint_desc(void *buffer, int buflen, void *after, u8 dsubtype)
{ unsignedchar *p = after;
int snd_usb_add_ctrl_interface_link(struct snd_usb_audio *chip, int ifnum, int ctrlif)
{ struct usb_device *dev = chip->dev; struct usb_host_interface *host_iface;
if (chip->num_intf_to_ctrl >= MAX_CARD_INTERFACES) {
dev_info(&dev->dev, "Too many interfaces assigned to the single USB-audio card\n"); return -EINVAL;
}
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.