#include <linux/usb/audio.h>
#include <linux/module.h>
#include "u_audio.h"
#include "u_uac1.h"
#define UAC1_CHANNEL_MASK …
#define USB_OUT_FU_ID …
#define USB_IN_FU_ID …
#define EPIN_EN(_opts) …
#define EPOUT_EN(_opts) …
#define FUIN_EN(_opts) …
#define FUOUT_EN(_opts) …
struct f_uac1 { … };
static inline struct f_uac1 *func_to_uac1(struct usb_function *f)
{ … }
static inline struct f_uac1_opts *g_audio_to_uac1_opts(struct g_audio *audio)
{ … }
static struct usb_interface_descriptor ac_interface_desc = …;
static struct uac1_ac_header_descriptor *ac_header_desc;
static struct uac_input_terminal_descriptor usb_out_it_desc = …;
static struct uac1_output_terminal_descriptor io_out_ot_desc = …;
static struct uac_input_terminal_descriptor io_in_it_desc = …;
static struct uac1_output_terminal_descriptor usb_in_ot_desc = …;
static struct uac_feature_unit_descriptor *in_feature_unit_desc;
static struct uac_feature_unit_descriptor *out_feature_unit_desc;
static struct usb_endpoint_descriptor ac_int_ep_desc = …;
static struct usb_interface_descriptor as_out_interface_alt_0_desc = …;
static struct usb_interface_descriptor as_out_interface_alt_1_desc = …;
static struct usb_interface_descriptor as_in_interface_alt_0_desc = …;
static struct usb_interface_descriptor as_in_interface_alt_1_desc = …;
static struct uac1_as_header_descriptor as_out_header_desc = …;
static struct uac1_as_header_descriptor as_in_header_desc = …;
DECLARE_UAC_FORMAT_TYPE_I_DISCRETE_DESC(…);
#define uac_format_type_i_discrete_descriptor …
static struct uac_format_type_i_discrete_descriptor as_out_type_i_desc = …;
static struct usb_endpoint_descriptor as_out_ep_desc = …;
static struct uac_iso_endpoint_descriptor as_iso_out_desc = …;
static struct uac_format_type_i_discrete_descriptor as_in_type_i_desc = …;
static struct usb_endpoint_descriptor as_in_ep_desc = …;
static struct uac_iso_endpoint_descriptor as_iso_in_desc = …;
static struct usb_descriptor_header *f_audio_desc[] = …;
static struct usb_endpoint_descriptor ss_as_out_ep_desc = …;
static struct usb_ss_ep_comp_descriptor ss_as_out_ep_desc_comp = …;
static struct usb_endpoint_descriptor ss_as_in_ep_desc = …;
static struct usb_ss_ep_comp_descriptor ss_as_in_ep_desc_comp = …;
static struct usb_descriptor_header *f_audio_ss_desc[] = …;
enum { … };
static struct usb_string strings_uac1[NUM_STR_DESCRIPTORS + 1] = …;
static struct usb_gadget_strings str_uac1 = …;
static struct usb_gadget_strings *uac1_strings[] = …;
static void uac_cs_attr_sample_rate(struct usb_ep *ep, struct usb_request *req)
{ … }
static void audio_notify_complete(struct usb_ep *_ep, struct usb_request *req)
{ … }
static int audio_notify(struct g_audio *audio, int unit_id, int cs)
{ … }
static int
in_rq_cur(struct usb_function *fn, const struct usb_ctrlrequest *cr)
{ … }
static int
in_rq_min(struct usb_function *fn, const struct usb_ctrlrequest *cr)
{ … }
static int
in_rq_max(struct usb_function *fn, const struct usb_ctrlrequest *cr)
{ … }
static int
in_rq_res(struct usb_function *fn, const struct usb_ctrlrequest *cr)
{ … }
static void
out_rq_cur_complete(struct usb_ep *ep, struct usb_request *req)
{ … }
static int
out_rq_cur(struct usb_function *fn, const struct usb_ctrlrequest *cr)
{ … }
static int ac_rq_in(struct usb_function *f,
const struct usb_ctrlrequest *ctrl)
{ … }
static int audio_set_endpoint_req(struct usb_function *f,
const struct usb_ctrlrequest *ctrl)
{ … }
static int audio_get_endpoint_req(struct usb_function *f,
const struct usb_ctrlrequest *ctrl)
{ … }
static int
f_audio_setup(struct usb_function *f, const struct usb_ctrlrequest *ctrl)
{ … }
static int f_audio_set_alt(struct usb_function *f, unsigned intf, unsigned alt)
{ … }
static int f_audio_get_alt(struct usb_function *f, unsigned intf)
{ … }
static void f_audio_disable(struct usb_function *f)
{ … }
static void
f_audio_suspend(struct usb_function *f)
{ … }
static struct uac_feature_unit_descriptor *build_fu_desc(int chmask)
{ … }
static struct
uac1_ac_header_descriptor *build_ac_header_desc(struct f_uac1_opts *opts)
{ … }
#define USBDHDR(p) …
static void setup_descriptor(struct f_uac1_opts *opts)
{ … }
static int f_audio_validate_opts(struct g_audio *audio, struct device *dev)
{ … }
static int f_audio_bind(struct usb_configuration *c, struct usb_function *f)
{ … }
static inline struct f_uac1_opts *to_f_uac1_opts(struct config_item *item)
{ … }
static void f_uac1_attr_release(struct config_item *item)
{ … }
static struct configfs_item_operations f_uac1_item_ops = …;
#define uac1_kstrtou32 …
#define uac1_kstrtos16 …
#define uac1_kstrtobool(s, base, res) …
static const char *u32_fmt = …;
static const char *s16_fmt = …;
static const char *bool_fmt = …;
#define UAC1_ATTRIBUTE(type, name) …
#define UAC1_RATE_ATTRIBUTE(name) …
#define UAC1_ATTRIBUTE_STRING(name) …
UAC1_ATTRIBUTE(…);
UAC1_RATE_ATTRIBUTE(…);
UAC1_ATTRIBUTE(…);
UAC1_ATTRIBUTE(…);
UAC1_RATE_ATTRIBUTE(…);
UAC1_ATTRIBUTE(…);
UAC1_ATTRIBUTE(…);
UAC1_ATTRIBUTE(…);
UAC1_ATTRIBUTE(…);
UAC1_ATTRIBUTE(…);
UAC1_ATTRIBUTE(…);
UAC1_ATTRIBUTE(…);
UAC1_ATTRIBUTE(…);
UAC1_ATTRIBUTE(…);
UAC1_ATTRIBUTE(…);
UAC1_ATTRIBUTE(…);
UAC1_ATTRIBUTE(…);
UAC1_ATTRIBUTE_STRING(…);
UAC1_ATTRIBUTE_STRING(…);
UAC1_ATTRIBUTE_STRING(…);
UAC1_ATTRIBUTE_STRING(…);
UAC1_ATTRIBUTE_STRING(…);
UAC1_ATTRIBUTE_STRING(…);
UAC1_ATTRIBUTE_STRING(…);
UAC1_ATTRIBUTE_STRING(…);
UAC1_ATTRIBUTE_STRING(…);
static struct configfs_attribute *f_uac1_attrs[] = …;
static const struct config_item_type f_uac1_func_type = …;
static void f_audio_free_inst(struct usb_function_instance *f)
{ … }
static struct usb_function_instance *f_audio_alloc_inst(void)
{ … }
static void f_audio_free(struct usb_function *f)
{ … }
static void f_audio_unbind(struct usb_configuration *c, struct usb_function *f)
{ … }
static struct usb_function *f_audio_alloc(struct usb_function_instance *fi)
{ … }
DECLARE_USB_FUNCTION_INIT(uac1, f_audio_alloc_inst, f_audio_alloc);
MODULE_DESCRIPTION(…) …;
MODULE_LICENSE(…) …;
MODULE_AUTHOR(…) …;