#include <linux/init.h>
#include <linux/slab.h>
#include <linux/usb.h>
#include <linux/usb/audio.h>
#include <linux/usb/audio-v2.h>
#include <linux/usb/audio-v3.h>
#include <sound/core.h>
#include <sound/pcm.h>
#include <sound/control.h>
#include <sound/tlv.h>
#include "usbaudio.h"
#include "card.h"
#include "proc.h"
#include "quirks.h"
#include "endpoint.h"
#include "pcm.h"
#include "helper.h"
#include "format.h"
#include "clock.h"
#include "stream.h"
#include "power.h"
#include "media.h"
static void audioformat_free(struct audioformat *fp)
{ … }
static void free_substream(struct snd_usb_substream *subs)
{ … }
static void snd_usb_audio_stream_free(struct snd_usb_stream *stream)
{ … }
static void snd_usb_audio_pcm_free(struct snd_pcm *pcm)
{ … }
static void snd_usb_init_substream(struct snd_usb_stream *as,
int stream,
struct audioformat *fp,
struct snd_usb_power_domain *pd)
{ … }
static int usb_chmap_ctl_info(struct snd_kcontrol *kcontrol,
struct snd_ctl_elem_info *uinfo)
{ … }
static bool have_dup_chmap(struct snd_usb_substream *subs,
struct audioformat *fp)
{ … }
static int usb_chmap_ctl_tlv(struct snd_kcontrol *kcontrol, int op_flag,
unsigned int size, unsigned int __user *tlv)
{ … }
static int usb_chmap_ctl_get(struct snd_kcontrol *kcontrol,
struct snd_ctl_elem_value *ucontrol)
{ … }
static int add_chmap(struct snd_pcm *pcm, int stream,
struct snd_usb_substream *subs)
{ … }
static struct snd_pcm_chmap_elem *convert_chmap(int channels, unsigned int bits,
int protocol)
{ … }
static struct
snd_pcm_chmap_elem *convert_chmap_v3(struct uac3_cluster_header_descriptor
*cluster)
{ … }
static int __snd_usb_add_audio_stream(struct snd_usb_audio *chip,
int stream,
struct audioformat *fp,
struct snd_usb_power_domain *pd)
{ … }
int snd_usb_add_audio_stream(struct snd_usb_audio *chip,
int stream,
struct audioformat *fp)
{ … }
static int snd_usb_add_audio_stream_v3(struct snd_usb_audio *chip,
int stream,
struct audioformat *fp,
struct snd_usb_power_domain *pd)
{ … }
static int parse_uac_endpoint_attributes(struct snd_usb_audio *chip,
struct usb_host_interface *alts,
int protocol, int iface_no)
{ … }
static void *
snd_usb_find_input_terminal_descriptor(struct usb_host_interface *ctrl_iface,
int terminal_id, int protocol)
{ … }
static void *
snd_usb_find_output_terminal_descriptor(struct usb_host_interface *ctrl_iface,
int terminal_id, int protocol)
{ … }
static struct audioformat *
audio_format_alloc_init(struct snd_usb_audio *chip,
struct usb_host_interface *alts,
int protocol, int iface_no, int altset_idx,
int altno, int num_channels, int clock)
{ … }
static struct audioformat *
snd_usb_get_audioformat_uac12(struct snd_usb_audio *chip,
struct usb_host_interface *alts,
int protocol, int iface_no, int altset_idx,
int altno, int stream, int bm_quirk)
{ … }
static struct audioformat *
snd_usb_get_audioformat_uac3(struct snd_usb_audio *chip,
struct usb_host_interface *alts,
struct snd_usb_power_domain **pd_out,
int iface_no, int altset_idx,
int altno, int stream)
{ … }
static int __snd_usb_parse_audio_interface(struct snd_usb_audio *chip,
int iface_no,
bool *has_non_pcm, bool non_pcm)
{ … }
int snd_usb_parse_audio_interface(struct snd_usb_audio *chip, int iface_no)
{ … }