#include <linux/wait.h>
#include <linux/usb.h>
#include <linux/slab.h>
#include <linux/module.h>
#include <linux/leds.h>
#include <sound/core.h>
#include <sound/control.h>
#include "capture.h"
#include "driver.h"
#include "playback.h"
enum line6_device_type { … };
struct usb_line6_toneport;
struct toneport_led { … };
struct usb_line6_toneport { … };
#define line6_to_toneport(x) …
static int toneport_send_cmd(struct usb_device *usbdev, int cmd1, int cmd2);
#define TONEPORT_PCM_DELAY …
static const struct snd_ratden toneport_ratden = …;
static struct line6_pcm_properties toneport_pcm_properties = …;
static const struct { … } toneport_source_info[] = …;
static int toneport_send_cmd(struct usb_device *usbdev, int cmd1, int cmd2)
{ … }
static int snd_toneport_monitor_info(struct snd_kcontrol *kcontrol,
struct snd_ctl_elem_info *uinfo)
{ … }
static int snd_toneport_monitor_get(struct snd_kcontrol *kcontrol,
struct snd_ctl_elem_value *ucontrol)
{ … }
static int snd_toneport_monitor_put(struct snd_kcontrol *kcontrol,
struct snd_ctl_elem_value *ucontrol)
{ … }
static int snd_toneport_source_info(struct snd_kcontrol *kcontrol,
struct snd_ctl_elem_info *uinfo)
{ … }
static int snd_toneport_source_get(struct snd_kcontrol *kcontrol,
struct snd_ctl_elem_value *ucontrol)
{ … }
static int snd_toneport_source_put(struct snd_kcontrol *kcontrol,
struct snd_ctl_elem_value *ucontrol)
{ … }
static void toneport_startup(struct usb_line6 *line6)
{ … }
static const struct snd_kcontrol_new toneport_control_monitor = …;
static const struct snd_kcontrol_new toneport_control_source = …;
static bool toneport_has_led(struct usb_line6_toneport *toneport)
{ … }
static const char * const toneport_led_colors[2] = …;
static const int toneport_led_init_vals[2] = …;
static void toneport_update_led(struct usb_line6_toneport *toneport)
{ … }
static void toneport_led_brightness_set(struct led_classdev *led_cdev,
enum led_brightness brightness)
{ … }
static int toneport_init_leds(struct usb_line6_toneport *toneport)
{ … }
static void toneport_remove_leds(struct usb_line6_toneport *toneport)
{ … }
static bool toneport_has_source_select(struct usb_line6_toneport *toneport)
{ … }
static int toneport_setup(struct usb_line6_toneport *toneport)
{ … }
static void line6_toneport_disconnect(struct usb_line6 *line6)
{ … }
static int toneport_init(struct usb_line6 *line6,
const struct usb_device_id *id)
{ … }
#ifdef CONFIG_PM
static int toneport_reset_resume(struct usb_interface *interface)
{ … }
#endif
#define LINE6_DEVICE(prod) …
#define LINE6_IF_NUM(prod, n) …
static const struct usb_device_id toneport_id_table[] = …;
MODULE_DEVICE_TABLE(usb, toneport_id_table);
static const struct line6_properties toneport_properties_table[] = …;
static int toneport_probe(struct usb_interface *interface,
const struct usb_device_id *id)
{ … }
static struct usb_driver toneport_driver = …;
module_usb_driver(…) …;
MODULE_DESCRIPTION(…) …;
MODULE_LICENSE(…) …;