#include <linux/slab.h>
#include <linux/usb.h>
#include <linux/usb/audio.h>
#include <linux/module.h>
#include <sound/core.h>
#include <sound/hwdep.h>
#include <sound/pcm.h>
#include <sound/initval.h>
#define MODNAME …
#include "usb_stream.c"
#include "../usbaudio.h"
#include "../midi.h"
#include "us122l.h"
MODULE_AUTHOR(…) …;
MODULE_DESCRIPTION(…) …;
MODULE_LICENSE(…) …;
static int index[SNDRV_CARDS] = …;
static char *id[SNDRV_CARDS] = …;
static bool enable[SNDRV_CARDS] = …;
module_param_array(…);
MODULE_PARM_DESC(…) …;
module_param_array(…);
MODULE_PARM_DESC(…) …;
module_param_array(…);
MODULE_PARM_DESC(…) …;
#define US122L_FLAG_US144 …
static int snd_us122l_card_used[SNDRV_CARDS];
static int us122l_create_usbmidi(struct snd_card *card)
{ … }
static int us144_create_usbmidi(struct snd_card *card)
{ … }
static void pt_info_set(struct usb_device *dev, u8 v)
{ … }
static void usb_stream_hwdep_vm_open(struct vm_area_struct *area)
{ … }
static vm_fault_t usb_stream_hwdep_vm_fault(struct vm_fault *vmf)
{ … }
static void usb_stream_hwdep_vm_close(struct vm_area_struct *area)
{ … }
static const struct vm_operations_struct usb_stream_hwdep_vm_ops = …;
static int usb_stream_hwdep_open(struct snd_hwdep *hw, struct file *file)
{ … }
static int usb_stream_hwdep_release(struct snd_hwdep *hw, struct file *file)
{ … }
static int usb_stream_hwdep_mmap(struct snd_hwdep *hw,
struct file *filp, struct vm_area_struct *area)
{ … }
static __poll_t usb_stream_hwdep_poll(struct snd_hwdep *hw,
struct file *file, poll_table *wait)
{ … }
static void us122l_stop(struct us122l *us122l)
{ … }
static int us122l_set_sample_rate(struct usb_device *dev, int rate)
{ … }
static bool us122l_start(struct us122l *us122l,
unsigned int rate, unsigned int period_frames)
{ … }
static int usb_stream_hwdep_ioctl(struct snd_hwdep *hw, struct file *file,
unsigned int cmd, unsigned long arg)
{ … }
#define SND_USB_STREAM_ID …
static int usb_stream_hwdep_new(struct snd_card *card)
{ … }
static bool us122l_create_card(struct snd_card *card)
{ … }
static void snd_us122l_free(struct snd_card *card)
{ … }
static int usx2y_create_card(struct usb_device *device,
struct usb_interface *intf,
struct snd_card **cardp,
unsigned long flags)
{ … }
static int us122l_usb_probe(struct usb_interface *intf,
const struct usb_device_id *device_id,
struct snd_card **cardp)
{ … }
static int snd_us122l_probe(struct usb_interface *intf,
const struct usb_device_id *id)
{ … }
static void snd_us122l_disconnect(struct usb_interface *intf)
{ … }
static int snd_us122l_suspend(struct usb_interface *intf, pm_message_t message)
{ … }
static int snd_us122l_resume(struct usb_interface *intf)
{ … }
static const struct usb_device_id snd_us122l_usb_id_table[] = …;
MODULE_DEVICE_TABLE(usb, snd_us122l_usb_id_table);
static struct usb_driver snd_us122l_usb_driver = …;
module_usb_driver(…) …;