#include <linux/interrupt.h>
#include <linux/slab.h>
#include <linux/usb.h>
#include <linux/moduleparam.h>
#include <sound/core.h>
#include <sound/info.h>
#include <sound/pcm.h>
#include <sound/pcm_params.h>
#include "usx2y.h"
#include "usbusx2y.h"
#define USX2Y_NRPACKS …
#define USX2Y_NRPACKS_VARIABLE …
#ifdef USX2Y_NRPACKS_VARIABLE
static int nrpacks = …;
#define nr_of_packs() …
module_param(nrpacks, int, 0444);
MODULE_PARM_DESC(…) …;
#else
#define nr_of_packs …
#endif
static int usx2y_urb_capt_retire(struct snd_usx2y_substream *subs)
{ … }
static int usx2y_urb_play_prepare(struct snd_usx2y_substream *subs,
struct urb *cap_urb,
struct urb *urb)
{ … }
static void usx2y_urb_play_retire(struct snd_usx2y_substream *subs, struct urb *urb)
{ … }
static int usx2y_urb_submit(struct snd_usx2y_substream *subs, struct urb *urb, int frame)
{ … }
static int usx2y_usbframe_complete(struct snd_usx2y_substream *capsubs,
struct snd_usx2y_substream *playbacksubs,
int frame)
{ … }
static void usx2y_clients_stop(struct usx2ydev *usx2y)
{ … }
static void usx2y_error_urb_status(struct usx2ydev *usx2y,
struct snd_usx2y_substream *subs, struct urb *urb)
{ … }
static void i_usx2y_urb_complete(struct urb *urb)
{ … }
static void usx2y_urbs_set_complete(struct usx2ydev *usx2y,
void (*complete)(struct urb *))
{ … }
static void usx2y_subs_startup_finish(struct usx2ydev *usx2y)
{ … }
static void i_usx2y_subs_startup(struct urb *urb)
{ … }
static void usx2y_subs_prepare(struct snd_usx2y_substream *subs)
{ … }
static void usx2y_urb_release(struct urb **urb, int free_tb)
{ … }
static void usx2y_urbs_release(struct snd_usx2y_substream *subs)
{ … }
static int usx2y_urbs_allocate(struct snd_usx2y_substream *subs)
{ … }
static void usx2y_subs_startup(struct snd_usx2y_substream *subs)
{ … }
static int usx2y_urbs_start(struct snd_usx2y_substream *subs)
{ … }
static snd_pcm_uframes_t snd_usx2y_pcm_pointer(struct snd_pcm_substream *substream)
{ … }
static int snd_usx2y_pcm_trigger(struct snd_pcm_substream *substream, int cmd)
{ … }
struct s_c2 { … };
static const struct s_c2 setrate_44100[] = …;
static const struct s_c2 setrate_48000[] = …;
#define NOOF_SETRATE_URBS …
static void i_usx2y_04int(struct urb *urb)
{ … }
static int usx2y_rate_set(struct usx2ydev *usx2y, int rate)
{ … }
static int usx2y_format_set(struct usx2ydev *usx2y, snd_pcm_format_t format)
{ … }
static int snd_usx2y_pcm_hw_params(struct snd_pcm_substream *substream,
struct snd_pcm_hw_params *hw_params)
{ … }
static int snd_usx2y_pcm_hw_free(struct snd_pcm_substream *substream)
{ … }
static int snd_usx2y_pcm_prepare(struct snd_pcm_substream *substream)
{ … }
static const struct snd_pcm_hardware snd_usx2y_2c = …;
static int snd_usx2y_pcm_open(struct snd_pcm_substream *substream)
{ … }
static int snd_usx2y_pcm_close(struct snd_pcm_substream *substream)
{ … }
static const struct snd_pcm_ops snd_usx2y_pcm_ops = …;
static void usx2y_audio_stream_free(struct snd_usx2y_substream **usx2y_substream)
{ … }
static void snd_usx2y_pcm_private_free(struct snd_pcm *pcm)
{ … }
static int usx2y_audio_stream_new(struct snd_card *card, int playback_endpoint, int capture_endpoint)
{ … }
int usx2y_audio_create(struct snd_card *card)
{ … }