3 #include "../usbaudio.h"
4 #include "usbus428ctldefs.h"
9 #define URBS_AsyncSeq 10
10 #define URB_DataLen_AsyncSeq 32
11 struct snd_usX2Y_AsyncSeq
{
12 struct urb
*urb
[URBS_AsyncSeq
];
16 struct snd_usX2Y_urbSeq
{
22 #include "usx2yhwdeppcm.h"
25 struct snd_usb_audio chip
;
30 unsigned In04IntCalls
;
31 struct snd_usX2Y_urbSeq
*US04
;
32 wait_queue_head_t In04WaitQueue
;
33 struct snd_usX2Y_AsyncSeq AS04
;
37 struct mutex prepare_mutex
;
38 struct us428ctls_sharedmem
*us428ctls_sharedmem
;
40 wait_queue_head_t us428ctls_wait_queue_head
;
41 struct snd_usX2Y_hwdep_pcm_shm
*hwdep_pcm_shm
;
42 struct snd_usX2Y_substream
*subs
[4];
43 struct snd_usX2Y_substream
* volatile prepare_subs
;
44 wait_queue_head_t prepare_wait_queue
;
48 struct snd_usX2Y_substream
{
49 struct usX2Ydev
*usX2Y
;
50 struct snd_pcm_substream
*pcm_substream
;
53 unsigned int maxpacksize
; /* max packet size in bytes */
56 #define state_STOPPED 0
57 #define state_STARTING1 1
58 #define state_STARTING2 2
59 #define state_STARTING3 3
60 #define state_PREPARED 4
61 #define state_PRERUNNING 6
62 #define state_RUNNING 8
64 int hwptr
; /* free frame position in the buffer (only for playback) */
65 int hwptr_done
; /* processed frame position in the buffer */
66 int transfer_done
; /* processed frames since last period update */
68 struct urb
*urb
[NRURBS
]; /* data urb table */
69 struct urb
*completed_urb
;
70 char *tmpbuf
; /* temporary buffer for playback */
74 #define usX2Y(c) ((struct usX2Ydev *)(c)->private_data)
76 int usX2Y_audio_create(struct snd_card
*card
);
78 int usX2Y_AsyncSeq04_init(struct usX2Ydev
*usX2Y
);
79 int usX2Y_In04_init(struct usX2Ydev
*usX2Y
);
81 #define NAME_ALLCAPS "US-X2Y"