3 #include "../usbaudio.h"
5 #include "usbus428ctldefs.h"
10 #define URBS_AsyncSeq 10
11 #define URB_DataLen_AsyncSeq 32
12 struct snd_usX2Y_AsyncSeq
{
13 struct urb
*urb
[URBS_AsyncSeq
];
17 struct snd_usX2Y_urbSeq
{
23 #include "usx2yhwdeppcm.h"
26 struct usb_device
*dev
;
32 unsigned In04IntCalls
;
33 struct snd_usX2Y_urbSeq
*US04
;
34 wait_queue_head_t In04WaitQueue
;
35 struct snd_usX2Y_AsyncSeq AS04
;
39 struct mutex prepare_mutex
;
40 struct us428ctls_sharedmem
*us428ctls_sharedmem
;
42 wait_queue_head_t us428ctls_wait_queue_head
;
43 struct snd_usX2Y_hwdep_pcm_shm
*hwdep_pcm_shm
;
44 struct snd_usX2Y_substream
*subs
[4];
45 struct snd_usX2Y_substream
* volatile prepare_subs
;
46 wait_queue_head_t prepare_wait_queue
;
47 struct list_head midi_list
;
48 struct list_head pcm_list
;
53 struct snd_usX2Y_substream
{
54 struct usX2Ydev
*usX2Y
;
55 struct snd_pcm_substream
*pcm_substream
;
58 unsigned int maxpacksize
; /* max packet size in bytes */
61 #define state_STOPPED 0
62 #define state_STARTING1 1
63 #define state_STARTING2 2
64 #define state_STARTING3 3
65 #define state_PREPARED 4
66 #define state_PRERUNNING 6
67 #define state_RUNNING 8
69 int hwptr
; /* free frame position in the buffer (only for playback) */
70 int hwptr_done
; /* processed frame position in the buffer */
71 int transfer_done
; /* processed frames since last period update */
73 struct urb
*urb
[NRURBS
]; /* data urb table */
74 struct urb
*completed_urb
;
75 char *tmpbuf
; /* temporary buffer for playback */
79 #define usX2Y(c) ((struct usX2Ydev *)(c)->private_data)
81 int usX2Y_audio_create(struct snd_card
*card
);
83 int usX2Y_AsyncSeq04_init(struct usX2Ydev
*usX2Y
);
84 int usX2Y_In04_init(struct usX2Ydev
*usX2Y
);
86 #define NAME_ALLCAPS "US-X2Y"