#include <linux/init.h>
#include <linux/usb.h>
#include <linux/usb/audio.h>
#include <linux/usb/audio-v2.h>
#include <linux/usb/audio-v3.h>
#include <linux/usb/midi.h>
#include "usbaudio.h"
#include "helper.h"
struct usb_desc_validator { … };
#define UAC_VERSION_ALL …
static bool validate_uac1_header(const void *p,
const struct usb_desc_validator *v)
{ … }
static bool validate_mixer_unit(const void *p,
const struct usb_desc_validator *v)
{ … }
static bool validate_processing_unit(const void *p,
const struct usb_desc_validator *v)
{ … }
static bool validate_selector_unit(const void *p,
const struct usb_desc_validator *v)
{ … }
static bool validate_uac1_feature_unit(const void *p,
const struct usb_desc_validator *v)
{ … }
static bool validate_uac2_feature_unit(const void *p,
const struct usb_desc_validator *v)
{ … }
static bool validate_uac3_feature_unit(const void *p,
const struct usb_desc_validator *v)
{ … }
static bool validate_midi_out_jack(const void *p,
const struct usb_desc_validator *v)
{ … }
#define FIXED(p, t, s) …
#define FUNC(p, t, f) …
static const struct usb_desc_validator audio_validators[] = …;
static const struct usb_desc_validator midi_validators[] = …;
static bool validate_desc(unsigned char *hdr, int protocol,
const struct usb_desc_validator *v)
{ … }
bool snd_usb_validate_audio_desc(void *p, int protocol)
{ … }
bool snd_usb_validate_midi_desc(void *p)
{ … }