3 #include "../usbaudio.h"
4 #include "usbus428ctldefs.h"
9 #define URBS_AsyncSeq 10
10 #define URB_DataLen_AsyncSeq 32
12 struct urb* urb[URBS_AsyncSeq];
14 } snd_usX2Y_AsyncSeq_t;
22 typedef struct snd_usX2Y_substream snd_usX2Y_substream_t;
23 #include "usx2yhwdeppcm.h"
31 unsigned In04IntCalls;
32 snd_usX2Y_urbSeq_t *US04;
33 wait_queue_head_t In04WaitQueue;
34 snd_usX2Y_AsyncSeq_t AS04;
38 struct semaphore prepare_mutex;
39 us428ctls_sharedmem_t *us428ctls_sharedmem;
41 wait_queue_head_t us428ctls_wait_queue_head;
42 snd_usX2Y_hwdep_pcm_shm_t *hwdep_pcm_shm;
43 snd_usX2Y_substream_t *subs[4];
44 snd_usX2Y_substream_t * volatile prepare_subs;
45 wait_queue_head_t prepare_wait_queue;
49 struct snd_usX2Y_substream {
51 snd_pcm_substream_t *pcm_substream;
54 unsigned int maxpacksize; /* max packet size in bytes */
57 #define state_STOPPED 0
58 #define state_STARTING1 1
59 #define state_STARTING2 2
60 #define state_STARTING3 3
61 #define state_PREPARED 4
62 #define state_PRERUNNING 6
63 #define state_RUNNING 8
65 int hwptr; /* free frame position in the buffer (only for playback) */
66 int hwptr_done; /* processed frame position in the buffer */
67 int transfer_done; /* processed frames since last period update */
69 struct urb *urb[NRURBS]; /* data urb table */
70 struct urb *completed_urb;
71 char *tmpbuf; /* temporary buffer for playback */
75 #define usX2Y(c) ((usX2Ydev_t*)(c)->private_data)
77 int usX2Y_audio_create(snd_card_t* card);
79 int usX2Y_AsyncSeq04_init(usX2Ydev_t* usX2Y);
80 int usX2Y_In04_init(usX2Ydev_t* usX2Y);
82 #define NAME_ALLCAPS "US-X2Y"