| 1 |
|
| 2 |
|
| 3 |
|
| 4 |
|
| 5 |
|
| 6 |
#ifndef U_MIDI2_H |
| 7 |
#define U_MIDI2_H |
| 8 |
|
| 9 |
#include <linux/usb/composite.h> |
| 10 |
#include <sound/asound.h> |
| 11 |
|
| 12 |
struct f_midi2_opts; |
| 13 |
struct f_midi2_ep_opts; |
| 14 |
struct f_midi2_block_opts; |
| 15 |
|
| 16 |
|
| 17 |
struct f_midi2_block_info { |
| 18 |
unsigned int direction; |
| 19 |
unsigned int first_group; |
| 20 |
unsigned int num_groups; |
| 21 |
unsigned int midi1_first_group; |
| 22 |
unsigned int midi1_num_groups; |
| 23 |
unsigned int ui_hint; |
| 24 |
unsigned int midi_ci_version; |
| 25 |
unsigned int sysex8_streams; |
| 26 |
unsigned int is_midi1; |
| 27 |
bool active; |
| 28 |
const char *name; |
| 29 |
}; |
| 30 |
|
| 31 |
|
| 32 |
struct f_midi2_ep_info { |
| 33 |
unsigned int protocol_caps; |
| 34 |
unsigned int protocol; |
| 35 |
unsigned int manufacturer; |
| 36 |
unsigned int family; |
| 37 |
unsigned int model; |
| 38 |
unsigned int sw_revision; |
| 39 |
|
| 40 |
const char *ep_name; |
| 41 |
const char *product_id; |
| 42 |
}; |
| 43 |
|
| 44 |
struct f_midi2_card_info { |
| 45 |
bool process_ump; |
| 46 |
bool static_block; |
| 47 |
unsigned int req_buf_size; |
| 48 |
unsigned int num_reqs; |
| 49 |
const char *iface_name; |
| 50 |
}; |
| 51 |
|
| 52 |
struct f_midi2_block_opts { |
| 53 |
struct config_group group; |
| 54 |
unsigned int id; |
| 55 |
struct f_midi2_block_info info; |
| 56 |
struct f_midi2_ep_opts *ep; |
| 57 |
}; |
| 58 |
|
| 59 |
struct f_midi2_ep_opts { |
| 60 |
struct config_group group; |
| 61 |
unsigned int index; |
| 62 |
struct f_midi2_ep_info info; |
| 63 |
struct f_midi2_block_opts *blks[SNDRV_UMP_MAX_BLOCKS]; |
| 64 |
struct f_midi2_opts *opts; |
| 65 |
}; |
| 66 |
|
| 67 |
#define MAX_UMP_EPS 4 |
| 68 |
#define MAX_CABLES 16 |
| 69 |
|
| 70 |
struct f_midi2_opts { |
| 71 |
struct usb_function_instance func_inst; |
| 72 |
struct mutex lock; |
| 73 |
int refcnt; |
| 74 |
|
| 75 |
struct f_midi2_card_info info; |
| 76 |
|
| 77 |
unsigned int num_eps; |
| 78 |
struct f_midi2_ep_opts *eps[MAX_UMP_EPS]; |
| 79 |
}; |
| 80 |
|
| 81 |
#endif |