aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/sound/usb/line6/midibuf.h
diff options
context:
space:
mode:
authorTakashi Iwai <tiwai@suse.de>2015-01-12 22:29:57 +0100
committerTakashi Iwai <tiwai@suse.de>2015-01-12 22:29:57 +0100
commit61864d844c296933d40c02683252bbea5193b101 (patch)
treeaf106a2061e9b33dfbffdf761406cf5ff890ba2d /sound/usb/line6/midibuf.h
parentstaging: line6: Make *_disconnect() functions static (diff)
downloadwireguard-linux-61864d844c296933d40c02683252bbea5193b101.tar.xz
wireguard-linux-61864d844c296933d40c02683252bbea5193b101.zip
ALSA: move line6 usb driver into sound/usb
Promote line6 driver from staging to sound/usb/line6 directory, and maintain through sound subsystem tree. This commit just moves the code and adapts Makefile / Kconfig. The further renames and misc cleanups will follow. Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'sound/usb/line6/midibuf.h')
-rw-r--r--sound/usb/line6/midibuf.h38
1 files changed, 38 insertions, 0 deletions
diff --git a/sound/usb/line6/midibuf.h b/sound/usb/line6/midibuf.h
new file mode 100644
index 000000000000..707482b940e4
--- /dev/null
+++ b/sound/usb/line6/midibuf.h
@@ -0,0 +1,38 @@
+/*
+ * Line6 Linux USB driver - 0.9.1beta
+ *
+ * Copyright (C) 2004-2010 Markus Grabner (grabner@icg.tugraz.at)
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License as
+ * published by the Free Software Foundation, version 2.
+ *
+ */
+
+#ifndef MIDIBUF_H
+#define MIDIBUF_H
+
+struct midi_buffer {
+ unsigned char *buf;
+ int size;
+ int split;
+ int pos_read, pos_write;
+ int full;
+ int command_prev;
+};
+
+extern int line6_midibuf_bytes_used(struct midi_buffer *mb);
+extern int line6_midibuf_bytes_free(struct midi_buffer *mb);
+extern void line6_midibuf_destroy(struct midi_buffer *mb);
+extern int line6_midibuf_ignore(struct midi_buffer *mb, int length);
+extern int line6_midibuf_init(struct midi_buffer *mb, int size, int split);
+extern int line6_midibuf_read(struct midi_buffer *mb, unsigned char *data,
+ int length);
+extern void line6_midibuf_reset(struct midi_buffer *mb);
+extern int line6_midibuf_skip_message(struct midi_buffer *mb,
+ unsigned short mask);
+extern void line6_midibuf_status(struct midi_buffer *mb);
+extern int line6_midibuf_write(struct midi_buffer *mb, unsigned char *data,
+ int length);
+
+#endif