Commit | Line | Data |
---|---|---|
705ececd | 1 | /* |
e1a164d7 | 2 | * Line6 Linux USB driver - 0.9.1beta |
705ececd | 3 | * |
1027f476 | 4 | * Copyright (C) 2004-2010 Markus Grabner (grabner@icg.tugraz.at) |
705ececd MG |
5 | * |
6 | * This program is free software; you can redistribute it and/or | |
7 | * modify it under the terms of the GNU General Public License as | |
8 | * published by the Free Software Foundation, version 2. | |
9 | * | |
10 | */ | |
11 | ||
12 | #ifndef DUMPREQUEST_H | |
13 | #define DUMPREQUEST_H | |
14 | ||
705ececd MG |
15 | #include <linux/usb.h> |
16 | #include <linux/wait.h> | |
705ececd MG |
17 | #include <sound/core.h> |
18 | ||
705ececd MG |
19 | enum { |
20 | LINE6_DUMP_NONE, | |
21 | LINE6_DUMP_CURRENT | |
22 | }; | |
23 | ||
705ececd MG |
24 | struct line6_dump_reqbuf { |
25 | /** | |
26 | Buffer for dump requests. | |
27 | */ | |
28 | unsigned char *buffer; | |
29 | ||
30 | /** | |
31 | Size of dump request. | |
32 | */ | |
33 | size_t length; | |
34 | }; | |
35 | ||
36 | /** | |
37 | Provides the functionality to request channel/model/... dump data from a | |
38 | Line6 device. | |
39 | */ | |
40 | struct line6_dump_request { | |
41 | /** | |
42 | Wait queue for access to program dump data. | |
43 | */ | |
44 | wait_queue_head_t wait; | |
45 | ||
46 | /** | |
47 | Indicates an unfinished program dump request. | |
48 | 0: no dump | |
49 | 1: dump current settings | |
50 | Other device-specific values are also allowed. | |
51 | */ | |
52 | int in_progress; | |
53 | ||
705ececd MG |
54 | /** |
55 | Dump request buffers | |
56 | */ | |
57 | struct line6_dump_reqbuf reqbufs[1]; | |
58 | }; | |
59 | ||
60 | extern void line6_dump_finished(struct line6_dump_request *l6dr); | |
a49e4838 | 61 | extern int line6_dump_request_async(struct line6_dump_request *l6dr, |
1027f476 | 62 | struct usb_line6 *line6, int num, int dest); |
705ececd MG |
63 | extern void line6_dump_started(struct line6_dump_request *l6dr, int dest); |
64 | extern void line6_dumpreq_destruct(struct line6_dump_request *l6dr); | |
65 | extern void line6_dumpreq_destructbuf(struct line6_dump_request *l6dr, int num); | |
a49e4838 GKH |
66 | extern int line6_dumpreq_init(struct line6_dump_request *l6dr, const void *buf, |
67 | size_t len); | |
68 | extern int line6_dumpreq_initbuf(struct line6_dump_request *l6dr, | |
69 | const void *buf, size_t len, int num); | |
705ececd | 70 | extern void line6_invalidate_current(struct line6_dump_request *l6dr); |
1027f476 MG |
71 | extern void line6_dump_wait(struct line6_dump_request *l6dr); |
72 | extern int line6_dump_wait_interruptible(struct line6_dump_request *l6dr); | |
73 | extern int line6_dump_wait_timeout(struct line6_dump_request *l6dr, | |
74 | long timeout); | |
705ececd | 75 | |
705ececd | 76 | #endif |