~ [ source navigation ] ~ [ diff markup ] ~ [ identifier search ] ~

TOMOYO Linux Cross Reference
Linux/sound/usb/usx2y/usbusx2y.h

Version: ~ [ linux-5.2-rc6 ] ~ [ linux-5.1.15 ] ~ [ linux-5.0.21 ] ~ [ linux-4.20.17 ] ~ [ linux-4.19.56 ] ~ [ linux-4.18.20 ] ~ [ linux-4.17.19 ] ~ [ linux-4.16.18 ] ~ [ linux-4.15.18 ] ~ [ linux-4.14.130 ] ~ [ linux-4.13.16 ] ~ [ linux-4.12.14 ] ~ [ linux-4.11.12 ] ~ [ linux-4.10.17 ] ~ [ linux-4.9.183 ] ~ [ linux-4.8.17 ] ~ [ linux-4.7.10 ] ~ [ linux-4.6.7 ] ~ [ linux-4.5.7 ] ~ [ linux-4.4.183 ] ~ [ linux-4.3.6 ] ~ [ linux-4.2.8 ] ~ [ linux-4.1.52 ] ~ [ linux-4.0.9 ] ~ [ linux-3.19.8 ] ~ [ linux-3.18.140 ] ~ [ linux-3.17.8 ] ~ [ linux-3.16.69 ] ~ [ linux-3.15.10 ] ~ [ linux-3.14.79 ] ~ [ linux-3.13.11 ] ~ [ linux-3.12.74 ] ~ [ linux-3.11.10 ] ~ [ linux-3.10.108 ] ~ [ linux-3.9.11 ] ~ [ linux-3.8.13 ] ~ [ linux-3.7.10 ] ~ [ linux-3.6.11 ] ~ [ linux-3.5.7 ] ~ [ linux-3.4.113 ] ~ [ linux-3.3.8 ] ~ [ linux-3.2.102 ] ~ [ linux-3.1.10 ] ~ [ linux-3.0.101 ] ~ [ linux-2.6.39.4 ] ~ [ linux-2.6.38.8 ] ~ [ linux-2.6.37.6 ] ~ [ linux-2.6.36.4 ] ~ [ linux-2.6.35.14 ] ~ [ linux-2.6.34.15 ] ~ [ linux-2.6.33.20 ] ~ [ linux-2.6.32.71 ] ~ [ linux-2.6.0 ] ~ [ linux-2.4.37.11 ] ~ [ unix-v6-master ] ~ [ ccs-tools-1.8.5 ] ~ [ policy-sample ] ~
Architecture: ~ [ i386 ] ~ [ alpha ] ~ [ m68k ] ~ [ mips ] ~ [ ppc ] ~ [ sparc ] ~ [ sparc64 ] ~

  1 #ifndef USBUSX2Y_H
  2 #define USBUSX2Y_H
  3 #include "../usbaudio.h"
  4 #include "../midi.h"
  5 #include "usbus428ctldefs.h" 
  6 
  7 #define NRURBS          2       
  8 
  9 
 10 #define URBS_AsyncSeq 10
 11 #define URB_DataLen_AsyncSeq 32
 12 struct snd_usX2Y_AsyncSeq {
 13         struct urb      *urb[URBS_AsyncSeq];
 14         char            *buffer;
 15 };
 16 
 17 struct snd_usX2Y_urbSeq {
 18         int     submitted;
 19         int     len;
 20         struct urb      *urb[0];
 21 };
 22 
 23 #include "usx2yhwdeppcm.h"
 24 
 25 struct usX2Ydev {
 26         struct usb_device       *dev;
 27         int                     card_index;
 28         int                     stride;
 29         struct urb              *In04urb;
 30         void                    *In04Buf;
 31         char                    In04Last[24];
 32         unsigned                In04IntCalls;
 33         struct snd_usX2Y_urbSeq *US04;
 34         wait_queue_head_t       In04WaitQueue;
 35         struct snd_usX2Y_AsyncSeq       AS04;
 36         unsigned int            rate,
 37                                 format;
 38         int                     chip_status;
 39         struct mutex            prepare_mutex;
 40         struct us428ctls_sharedmem      *us428ctls_sharedmem;
 41         int                     wait_iso_frame;
 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;
 49         int                     pcm_devs;
 50 };
 51 
 52 
 53 struct snd_usX2Y_substream {
 54         struct usX2Ydev *usX2Y;
 55         struct snd_pcm_substream *pcm_substream;
 56 
 57         int                     endpoint;               
 58         unsigned int            maxpacksize;            /* max packet size in bytes */
 59 
 60         atomic_t                state;
 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
 68 
 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 */
 72 
 73         struct urb              *urb[NRURBS];   /* data urb table */
 74         struct urb              *completed_urb;
 75         char                    *tmpbuf;                        /* temporary buffer for playback */
 76 };
 77 
 78 
 79 #define usX2Y(c) ((struct usX2Ydev *)(c)->private_data)
 80 
 81 int usX2Y_audio_create(struct snd_card *card);
 82 
 83 int usX2Y_AsyncSeq04_init(struct usX2Ydev *usX2Y);
 84 int usX2Y_In04_init(struct usX2Ydev *usX2Y);
 85 
 86 #define NAME_ALLCAPS "US-X2Y"
 87 
 88 #endif
 89 

~ [ source navigation ] ~ [ diff markup ] ~ [ identifier search ] ~

kernel.org | git.kernel.org | LWN.net | Project Home | Wiki (Japanese) | Wiki (English) | SVN repository | Mail admin

Linux® is a registered trademark of Linus Torvalds in the United States and other countries.
TOMOYO® is a registered trademark of NTT DATA CORPORATION.

osdn.jp