.. | .. |
---|
8 | 8 | #define NRURBS 2 |
---|
9 | 9 | |
---|
10 | 10 | |
---|
11 | | -#define URBS_AsyncSeq 10 |
---|
12 | | -#define URB_DataLen_AsyncSeq 32 |
---|
13 | | -struct snd_usX2Y_AsyncSeq { |
---|
14 | | - struct urb *urb[URBS_AsyncSeq]; |
---|
| 11 | +#define URBS_ASYNC_SEQ 10 |
---|
| 12 | +#define URB_DATA_LEN_ASYNC_SEQ 32 |
---|
| 13 | +struct snd_usx2y_async_seq { |
---|
| 14 | + struct urb *urb[URBS_ASYNC_SEQ]; |
---|
15 | 15 | char *buffer; |
---|
16 | 16 | }; |
---|
17 | 17 | |
---|
18 | | -struct snd_usX2Y_urbSeq { |
---|
| 18 | +struct snd_usx2y_urb_seq { |
---|
19 | 19 | int submitted; |
---|
20 | 20 | int len; |
---|
21 | | - struct urb *urb[0]; |
---|
| 21 | + struct urb *urb[]; |
---|
22 | 22 | }; |
---|
23 | 23 | |
---|
24 | 24 | #include "usx2yhwdeppcm.h" |
---|
25 | 25 | |
---|
26 | | -struct usX2Ydev { |
---|
| 26 | +struct usx2ydev { |
---|
27 | 27 | struct usb_device *dev; |
---|
28 | 28 | int card_index; |
---|
29 | 29 | int stride; |
---|
30 | | - struct urb *In04urb; |
---|
31 | | - void *In04Buf; |
---|
32 | | - char In04Last[24]; |
---|
33 | | - unsigned In04IntCalls; |
---|
34 | | - struct snd_usX2Y_urbSeq *US04; |
---|
35 | | - wait_queue_head_t In04WaitQueue; |
---|
36 | | - struct snd_usX2Y_AsyncSeq AS04; |
---|
| 30 | + struct urb *in04_urb; |
---|
| 31 | + void *in04_buf; |
---|
| 32 | + char in04_last[24]; |
---|
| 33 | + unsigned in04_int_calls; |
---|
| 34 | + struct snd_usx2y_urb_seq *us04; |
---|
| 35 | + wait_queue_head_t in04_wait_queue; |
---|
| 36 | + struct snd_usx2y_async_seq as04; |
---|
37 | 37 | unsigned int rate, |
---|
38 | 38 | format; |
---|
39 | 39 | int chip_status; |
---|
.. | .. |
---|
41 | 41 | struct us428ctls_sharedmem *us428ctls_sharedmem; |
---|
42 | 42 | int wait_iso_frame; |
---|
43 | 43 | wait_queue_head_t us428ctls_wait_queue_head; |
---|
44 | | - struct snd_usX2Y_hwdep_pcm_shm *hwdep_pcm_shm; |
---|
45 | | - struct snd_usX2Y_substream *subs[4]; |
---|
46 | | - struct snd_usX2Y_substream * volatile prepare_subs; |
---|
| 44 | + struct snd_usx2y_hwdep_pcm_shm *hwdep_pcm_shm; |
---|
| 45 | + struct snd_usx2y_substream *subs[4]; |
---|
| 46 | + struct snd_usx2y_substream * volatile prepare_subs; |
---|
47 | 47 | wait_queue_head_t prepare_wait_queue; |
---|
48 | 48 | struct list_head midi_list; |
---|
49 | 49 | struct list_head pcm_list; |
---|
.. | .. |
---|
51 | 51 | }; |
---|
52 | 52 | |
---|
53 | 53 | |
---|
54 | | -struct snd_usX2Y_substream { |
---|
55 | | - struct usX2Ydev *usX2Y; |
---|
| 54 | +struct snd_usx2y_substream { |
---|
| 55 | + struct usx2ydev *usx2y; |
---|
56 | 56 | struct snd_pcm_substream *pcm_substream; |
---|
57 | 57 | |
---|
58 | 58 | int endpoint; |
---|
59 | 59 | unsigned int maxpacksize; /* max packet size in bytes */ |
---|
60 | 60 | |
---|
61 | 61 | atomic_t state; |
---|
62 | | -#define state_STOPPED 0 |
---|
63 | | -#define state_STARTING1 1 |
---|
64 | | -#define state_STARTING2 2 |
---|
65 | | -#define state_STARTING3 3 |
---|
66 | | -#define state_PREPARED 4 |
---|
67 | | -#define state_PRERUNNING 6 |
---|
68 | | -#define state_RUNNING 8 |
---|
| 62 | +#define STATE_STOPPED 0 |
---|
| 63 | +#define STATE_STARTING1 1 |
---|
| 64 | +#define STATE_STARTING2 2 |
---|
| 65 | +#define STATE_STARTING3 3 |
---|
| 66 | +#define STATE_PREPARED 4 |
---|
| 67 | +#define STATE_PRERUNNING 6 |
---|
| 68 | +#define STATE_RUNNING 8 |
---|
69 | 69 | |
---|
70 | 70 | int hwptr; /* free frame position in the buffer (only for playback) */ |
---|
71 | 71 | int hwptr_done; /* processed frame position in the buffer */ |
---|
.. | .. |
---|
77 | 77 | }; |
---|
78 | 78 | |
---|
79 | 79 | |
---|
80 | | -#define usX2Y(c) ((struct usX2Ydev *)(c)->private_data) |
---|
| 80 | +#define usx2y(c) ((struct usx2ydev *)(c)->private_data) |
---|
81 | 81 | |
---|
82 | | -int usX2Y_audio_create(struct snd_card *card); |
---|
| 82 | +int usx2y_audio_create(struct snd_card *card); |
---|
83 | 83 | |
---|
84 | | -int usX2Y_AsyncSeq04_init(struct usX2Ydev *usX2Y); |
---|
85 | | -int usX2Y_In04_init(struct usX2Ydev *usX2Y); |
---|
| 84 | +int usx2y_async_seq04_init(struct usx2ydev *usx2y); |
---|
| 85 | +int usx2y_in04_init(struct usx2ydev *usx2y); |
---|
86 | 86 | |
---|
87 | 87 | #define NAME_ALLCAPS "US-X2Y" |
---|
88 | 88 | |
---|