Orange Pi5 kernel

Deprecated Linux kernel 5.10.110 for OrangePi 5/5B/5+ boards

3 Commits   0 Branches   0 Tags
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300   1) /* SPDX-License-Identifier: GPL-2.0 */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300   2) #ifndef __USBAUDIO_CARD_H
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300   3) #define __USBAUDIO_CARD_H
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300   4) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300   5) #include <linux/android_kabi.h>
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300   6) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300   7) #define MAX_NR_RATES	1024
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300   8) #define MAX_PACKS	6		/* per URB */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300   9) #define MAX_PACKS_HS	(MAX_PACKS * 8)	/* in high speed mode */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  10) #define MAX_URBS	12
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  11) #define SYNC_URBS	4	/* always four urbs for sync */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  12) #define MAX_QUEUE	18	/* try not to exceed this queue length, in ms */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  13) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  14) struct audioformat {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  15) 	struct list_head list;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  16) 	u64 formats;			/* ALSA format bits */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  17) 	unsigned int channels;		/* # channels */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  18) 	unsigned int fmt_type;		/* USB audio format type (1-3) */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  19) 	unsigned int fmt_bits;		/* number of significant bits */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  20) 	unsigned int frame_size;	/* samples per frame for non-audio */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  21) 	int iface;			/* interface number */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  22) 	unsigned char altsetting;	/* corresponding alternate setting */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  23) 	unsigned char altset_idx;	/* array index of altenate setting */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  24) 	unsigned char attributes;	/* corresponding attributes of cs endpoint */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  25) 	unsigned char endpoint;		/* endpoint */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  26) 	unsigned char ep_attr;		/* endpoint attributes */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  27) 	unsigned char datainterval;	/* log_2 of data packet interval */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  28) 	unsigned char protocol;		/* UAC_VERSION_1/2/3 */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  29) 	unsigned int maxpacksize;	/* max. packet size */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  30) 	unsigned int rates;		/* rate bitmasks */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  31) 	unsigned int rate_min, rate_max;	/* min/max rates */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  32) 	unsigned int nr_rates;		/* number of rate table entries */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  33) 	unsigned int *rate_table;	/* rate table */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  34) 	unsigned char clock;		/* associated clock */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  35) 	struct snd_pcm_chmap_elem *chmap; /* (optional) channel map */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  36) 	bool dsd_dop;			/* add DOP headers in case of DSD samples */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  37) 	bool dsd_bitrev;		/* reverse the bits of each DSD sample */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  38) 	bool dsd_raw;			/* altsetting is raw DSD */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  39) };
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  40) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  41) struct snd_usb_substream;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  42) struct snd_usb_endpoint;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  43) struct snd_usb_power_domain;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  44) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  45) struct snd_urb_ctx {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  46) 	struct urb *urb;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  47) 	unsigned int buffer_size;	/* size of data buffer, if data URB */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  48) 	struct snd_usb_substream *subs;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  49) 	struct snd_usb_endpoint *ep;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  50) 	int index;	/* index for urb array */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  51) 	int packets;	/* number of packets per urb */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  52) 	int packet_size[MAX_PACKS_HS]; /* size of packets for next submission */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  53) 	struct list_head ready_list;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  54) };
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  55) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  56) struct snd_usb_endpoint {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  57) 	struct snd_usb_audio *chip;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  58) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  59) 	int use_count;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  60) 	int ep_num;		/* the referenced endpoint number */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  61) 	int type;		/* SND_USB_ENDPOINT_TYPE_* */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  62) 	unsigned long flags;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  63) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  64) 	void (*prepare_data_urb) (struct snd_usb_substream *subs,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  65) 				  struct urb *urb);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  66) 	void (*retire_data_urb) (struct snd_usb_substream *subs,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  67) 				 struct urb *urb);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  68) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  69) 	struct snd_usb_substream *data_subs;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  70) 	struct snd_usb_endpoint *sync_master;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  71) 	struct snd_usb_endpoint *sync_slave;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  72) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  73) 	struct snd_urb_ctx urb[MAX_URBS];
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  74) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  75) 	struct snd_usb_packet_info {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  76) 		uint32_t packet_size[MAX_PACKS_HS];
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  77) 		int packets;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  78) 	} next_packet[MAX_URBS];
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  79) 	int next_packet_read_pos, next_packet_write_pos;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  80) 	struct list_head ready_playback_urbs;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  81) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  82) 	unsigned int nurbs;		/* # urbs */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  83) 	unsigned long active_mask;	/* bitmask of active urbs */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  84) 	unsigned long unlink_mask;	/* bitmask of unlinked urbs */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  85) 	char *syncbuf;			/* sync buffer for all sync URBs */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  86) 	dma_addr_t sync_dma;		/* DMA address of syncbuf */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  87) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  88) 	unsigned int pipe;		/* the data i/o pipe */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  89) 	unsigned int packsize[2];	/* small/large packet sizes in samples */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  90) 	unsigned int sample_rem;	/* remainder from division fs/pps */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  91) 	unsigned int sample_accum;	/* sample accumulator */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  92) 	unsigned int pps;		/* packets per second */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  93) 	unsigned int freqn;		/* nominal sampling rate in fs/fps in Q16.16 format */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  94) 	unsigned int freqm;		/* momentary sampling rate in fs/fps in Q16.16 format */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  95) 	int	   freqshift;		/* how much to shift the feedback value to get Q16.16 */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  96) 	unsigned int freqmax;		/* maximum sampling rate, used for buffer management */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  97) 	unsigned int phase;		/* phase accumulator */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  98) 	unsigned int maxpacksize;	/* max packet size in bytes */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  99) 	unsigned int maxframesize;      /* max packet size in frames */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 100) 	unsigned int max_urb_frames;	/* max URB size in frames */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 101) 	unsigned int curpacksize;	/* current packet size in bytes (for capture) */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 102) 	unsigned int curframesize;      /* current packet size in frames (for capture) */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 103) 	unsigned int syncmaxsize;	/* sync endpoint packet size */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 104) 	unsigned int fill_max:1;	/* fill max packet size always */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 105) 	unsigned int tenor_fb_quirk:1;	/* corrupted feedback data */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 106) 	unsigned int datainterval;      /* log_2 of data packet interval */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 107) 	unsigned int syncinterval;	/* P for adaptive mode, 0 otherwise */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 108) 	unsigned char silence_value;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 109) 	unsigned int stride;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 110) 	int iface, altsetting;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 111) 	int skip_packets;		/* quirks for devices to ignore the first n packets
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 112) 					   in a stream */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 113) 	bool is_implicit_feedback;      /* This endpoint is used as implicit feedback */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 114) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 115) 	spinlock_t lock;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 116) 	struct list_head list;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 117) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 118) 	ANDROID_KABI_RESERVE(1);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 119) 	ANDROID_KABI_RESERVE(2);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 120) 	ANDROID_KABI_RESERVE(3);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 121) 	ANDROID_KABI_RESERVE(4);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 122) };
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 123) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 124) struct media_ctl;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 125) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 126) struct snd_usb_substream {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 127) 	struct snd_usb_stream *stream;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 128) 	struct usb_device *dev;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 129) 	struct snd_pcm_substream *pcm_substream;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 130) 	int direction;	/* playback or capture */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 131) 	int interface;	/* current interface */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 132) 	int endpoint;	/* assigned endpoint */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 133) 	struct audioformat *cur_audiofmt;	/* current audioformat pointer (for hw_params callback) */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 134) 	struct snd_usb_power_domain *str_pd;	/* UAC3 Power Domain for streaming path */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 135) 	snd_pcm_format_t pcm_format;	/* current audio format (for hw_params callback) */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 136) 	unsigned int channels;		/* current number of channels (for hw_params callback) */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 137) 	unsigned int channels_max;	/* max channels in the all audiofmts */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 138) 	unsigned int cur_rate;		/* current rate (for hw_params callback) */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 139) 	unsigned int period_bytes;	/* current period bytes (for hw_params callback) */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 140) 	unsigned int period_frames;	/* current frames per period */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 141) 	unsigned int buffer_periods;	/* current periods per buffer */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 142) 	unsigned int altset_idx;     /* USB data format: index of alternate setting */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 143) 	unsigned int txfr_quirk:1;	/* allow sub-frame alignment */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 144) 	unsigned int tx_length_quirk:1;	/* add length specifier to transfers */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 145) 	unsigned int fmt_type;		/* USB audio format type (1-3) */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 146) 	unsigned int pkt_offset_adj;	/* Bytes to drop from beginning of packets (for non-compliant devices) */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 147) 	unsigned int stream_offset_adj;	/* Bytes to drop from beginning of stream (for non-compliant devices) */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 148) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 149) 	unsigned int running: 1;	/* running status */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 150) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 151) 	unsigned int hwptr_done;	/* processed byte position in the buffer */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 152) 	unsigned int transfer_done;		/* processed frames since last period update */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 153) 	unsigned int frame_limit;	/* limits number of packets in URB */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 154) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 155) 	/* data and sync endpoints for this stream */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 156) 	unsigned int ep_num;		/* the endpoint number */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 157) 	struct snd_usb_endpoint *data_endpoint;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 158) 	struct snd_usb_endpoint *sync_endpoint;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 159) 	unsigned long flags;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 160) 	bool need_setup_ep;		/* (re)configure EP at prepare? */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 161) 	bool need_setup_fmt;		/* (re)configure fmt after resume? */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 162) 	unsigned int speed;		/* USB_SPEED_XXX */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 163) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 164) 	u64 formats;			/* format bitmasks (all or'ed) */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 165) 	unsigned int num_formats;		/* number of supported audio formats (list) */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 166) 	struct list_head fmt_list;	/* format list */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 167) 	struct snd_pcm_hw_constraint_list rate_list;	/* limited rates */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 168) 	spinlock_t lock;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 169) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 170) 	int last_frame_number;          /* stored frame number */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 171) 	int last_delay;                 /* stored delay */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 172) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 173) 	struct {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 174) 		int marker;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 175) 		int channel;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 176) 		int byte_idx;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 177) 	} dsd_dop;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 178) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 179) 	bool trigger_tstamp_pending_update; /* trigger timestamp being updated from initial estimate */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 180) 	struct media_ctl *media_ctl;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 181) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 182) 	ANDROID_KABI_RESERVE(1);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 183) };
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 184) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 185) struct snd_usb_stream {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 186) 	struct snd_usb_audio *chip;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 187) 	struct snd_pcm *pcm;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 188) 	int pcm_index;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 189) 	unsigned int fmt_type;		/* USB audio format type (1-3) */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 190) 	struct snd_usb_substream substream[2];
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 191) 	struct list_head list;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 192) };
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 193) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 194) struct snd_usb_substream *find_snd_usb_substream(unsigned int card_num,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 195) 	unsigned int pcm_idx, unsigned int direction, struct snd_usb_audio
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 196) 	**uchip, void (*disconnect_cb)(struct snd_usb_audio *chip));
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 197) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 198) int snd_vendor_set_ops(struct snd_usb_audio_vendor_ops *vendor_ops);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 199) struct snd_usb_audio_vendor_ops *snd_vendor_get_ops(void);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 200) int snd_vendor_set_interface(struct usb_device *udev,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 201) 			     struct usb_host_interface *alts,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 202) 			     int iface, int alt);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 203) int snd_vendor_set_rate(struct usb_interface *intf, int iface, int rate,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 204) 			int alt);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 205) int snd_vendor_set_pcm_buf(struct usb_device *udev, int iface);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 206) int snd_vendor_set_pcm_intf(struct usb_interface *intf, int iface, int alt,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 207) 			    int direction);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 208) int snd_vendor_set_pcm_connection(struct usb_device *udev,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 209) 				  enum snd_vendor_pcm_open_close onoff,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 210) 				  int direction);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 211) int snd_vendor_set_pcm_binterval(struct audioformat *fp,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 212) 				 struct audioformat *found,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 213) 				 int *cur_attr, int *attr);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 214) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 215) #endif /* __USBAUDIO_CARD_H */