linux/sound/usb/validate.c

// SPDX-License-Identifier: GPL-2.0-or-later
//
// Validation of USB-audio class descriptors
//

#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

/* UAC1 only */
static bool validate_uac1_header(const void *p,
				 const struct usb_desc_validator *v)
{}

/* for mixer unit; covering all UACs */
static bool validate_mixer_unit(const void *p,
				const struct usb_desc_validator *v)
{}

/* both for processing and extension units; covering all UACs */
static bool validate_processing_unit(const void *p,
				     const struct usb_desc_validator *v)
{}

/* both for selector and clock selector units; covering all UACs */
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[] =;


/* Validate the given unit descriptor, return true if it's OK */
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)
{}