linux/sound/usb/line6/driver.c

// SPDX-License-Identifier: GPL-2.0-only
/*
 * Line 6 Linux USB driver
 *
 * Copyright (C) 2004-2010 Markus Grabner ([email protected])
 */

#include <linux/kernel.h>
#include <linux/module.h>
#include <linux/export.h>
#include <linux/slab.h>
#include <linux/usb.h>

#include <sound/core.h>
#include <sound/initval.h>
#include <sound/hwdep.h>

#include "capture.h"
#include "driver.h"
#include "midi.h"
#include "playback.h"

#define DRIVER_AUTHOR
#define DRIVER_DESC

/*
	This is Line 6's MIDI manufacturer ID.
*/
const unsigned char line6_midi_id[3] =;
EXPORT_SYMBOL_GPL();

/*
	Code to request version of POD, Variax interface
	(and maybe other devices).
*/
static const char line6_request_version[] =;

/*
	 Class for asynchronous messages.
*/
struct message {};

/*
	Forward declarations.
*/
static void line6_data_received(struct urb *urb);
static int line6_send_raw_message_async_part(struct message *msg,
					     struct urb *urb);

/*
	Start to listen on endpoint.
*/
static int line6_start_listen(struct usb_line6 *line6)
{}

/*
	Stop listening on endpoint.
*/
static void line6_stop_listen(struct usb_line6 *line6)
{}

/*
	Send raw message in pieces of wMaxPacketSize bytes.
*/
int line6_send_raw_message(struct usb_line6 *line6, const char *buffer,
				  int size)
{}
EXPORT_SYMBOL_GPL();

/*
	Notification of completion of asynchronous request transmission.
*/
static void line6_async_request_sent(struct urb *urb)
{}

/*
	Asynchronously send part of a raw message.
*/
static int line6_send_raw_message_async_part(struct message *msg,
					     struct urb *urb)
{}

/*
	Asynchronously send raw message.
*/
int line6_send_raw_message_async(struct usb_line6 *line6, const char *buffer,
				 int size)
{}
EXPORT_SYMBOL_GPL();

/*
	Send asynchronous device version request.
*/
int line6_version_request_async(struct usb_line6 *line6)
{}
EXPORT_SYMBOL_GPL();

/*
	Send sysex message in pieces of wMaxPacketSize bytes.
*/
int line6_send_sysex_message(struct usb_line6 *line6, const char *buffer,
			     int size)
{}
EXPORT_SYMBOL_GPL();

/*
	Allocate buffer for sysex message and prepare header.
	@param code sysex message code
	@param size number of bytes between code and sysex end
*/
char *line6_alloc_sysex_buffer(struct usb_line6 *line6, int code1, int code2,
			       int size)
{}
EXPORT_SYMBOL_GPL();

/*
	Notification of data received from the Line 6 device.
*/
static void line6_data_received(struct urb *urb)
{}

#define LINE6_READ_WRITE_STATUS_DELAY
#define LINE6_READ_WRITE_MAX_RETRIES

/*
	Read data from device.
*/
int line6_read_data(struct usb_line6 *line6, unsigned address, void *data,
		    unsigned datalen)
{}
EXPORT_SYMBOL_GPL();

/*
	Write data to device.
*/
int line6_write_data(struct usb_line6 *line6, unsigned address, void *data,
		     unsigned datalen)
{}
EXPORT_SYMBOL_GPL();

/*
	Read Line 6 device serial number.
	(POD, TonePort, GuitarPort)
*/
int line6_read_serial_number(struct usb_line6 *line6, u32 *serial_number)
{}
EXPORT_SYMBOL_GPL();

/*
	Card destructor.
*/
static void line6_destruct(struct snd_card *card)
{}

static void line6_get_usb_properties(struct usb_line6 *line6)
{}

/* Enable buffering of incoming messages, flush the buffer */
static int line6_hwdep_open(struct snd_hwdep *hw, struct file *file)
{}

/* Stop buffering */
static int line6_hwdep_release(struct snd_hwdep *hw, struct file *file)
{}

/* Read from circular buffer, return to user */
static long
line6_hwdep_read(struct snd_hwdep *hwdep, char __user *buf, long count,
					loff_t *offset)
{}

/* Write directly (no buffering) to device by user*/
static long
line6_hwdep_write(struct snd_hwdep *hwdep, const char __user *data, long count,
					loff_t *offset)
{}

static __poll_t
line6_hwdep_poll(struct snd_hwdep *hwdep, struct file *file, poll_table *wait)
{}

static const struct snd_hwdep_ops hwdep_ops =;

/* Insert into circular buffer */
static void line6_hwdep_push_message(struct usb_line6 *line6)
{}

static int line6_hwdep_init(struct usb_line6 *line6)
{}

static int line6_init_cap_control(struct usb_line6 *line6)
{}

static void line6_startup_work(struct work_struct *work)
{}

/*
	Probe USB device.
*/
int line6_probe(struct usb_interface *interface,
		const struct usb_device_id *id,
		const char *driver_name,
		const struct line6_properties *properties,
		int (*private_init)(struct usb_line6 *, const struct usb_device_id *id),
		size_t data_size)
{}
EXPORT_SYMBOL_GPL();

/*
	Line 6 device disconnected.
*/
void line6_disconnect(struct usb_interface *interface)
{}
EXPORT_SYMBOL_GPL();

#ifdef CONFIG_PM

/*
	Suspend Line 6 device.
*/
int line6_suspend(struct usb_interface *interface, pm_message_t message)
{}
EXPORT_SYMBOL_GPL();

/*
	Resume Line 6 device.
*/
int line6_resume(struct usb_interface *interface)
{}
EXPORT_SYMBOL_GPL();

#endif /* CONFIG_PM */

MODULE_AUTHOR();
MODULE_DESCRIPTION();
MODULE_LICENSE();