[BACK]Return to dev.h CVS log [TXT][DIR] Up to [local] / src / usr.bin / aucat

Diff for /src/usr.bin/aucat/Attic/dev.h between version 1.35 and 1.36

version 1.35, 2012/03/23 11:59:54 version 1.36, 2012/04/11 06:05:43
Line 28 
Line 28 
         /*          /*
          * desired parameters           * desired parameters
          */           */
         unsigned reqmode;                       /* mode */          unsigned int reqmode;                   /* mode */
         struct aparams reqipar, reqopar;        /* parameters */          struct aparams reqipar, reqopar;        /* parameters */
         unsigned reqbufsz;                      /* buffer size */          unsigned int reqbufsz;                  /* buffer size */
         unsigned reqround;                      /* block size */          unsigned int reqround;                  /* block size */
         unsigned hold;                          /* hold the device open ? */          unsigned int hold;                              /* hold the device open ? */
         unsigned autovol;                       /* auto adjust playvol ? */          unsigned int autovol;                   /* auto adjust playvol ? */
         unsigned autostart;                     /* don't wait for MMC start */          unsigned int autostart;                 /* don't wait for MMC start */
         unsigned refcnt;                        /* number of openers */          unsigned int refcnt;                    /* number of openers */
 #define DEV_NMAX        16                      /* max number of devices */  #define DEV_NMAX        16                      /* max number of devices */
         unsigned num;                           /* serial number */          unsigned int num;                               /* serial number */
 #define DEV_CLOSED      0                       /* closed */  #define DEV_CLOSED      0                       /* closed */
 #define DEV_INIT        1                       /* stopped */  #define DEV_INIT        1                       /* stopped */
 #define DEV_START       2                       /* ready to start */  #define DEV_START       2                       /* ready to start */
 #define DEV_RUN         3                       /* started */  #define DEV_RUN         3                       /* started */
         unsigned pstate;                        /* on of DEV_xxx */          unsigned int pstate;                    /* on of DEV_xxx */
         char *path;                             /* sio path */          char *path;                             /* sio path */
   
         /*          /*
          * actual parameters and runtime state (i.e. once opened)           * actual parameters and runtime state (i.e. once opened)
          */           */
         unsigned mode;                          /* bitmap of MODE_xxx */          unsigned int mode;                              /* bitmap of MODE_xxx */
         unsigned bufsz, round, rate;          unsigned int bufsz, round, rate;
         struct aparams ipar, opar;          struct aparams ipar, opar;
         struct aproc *mix, *sub, *submon;          struct aproc *mix, *sub, *submon;
         struct aproc *rec, *play, *mon;          struct aproc *rec, *play, *mon;
         struct aproc *midi;          struct aproc *midi;
         struct devctl {          struct devctl {
                 struct devctl *next;                  struct devctl *next;
                 unsigned mode;                  unsigned int mode;
                 char *path;                  char *path;
         } *ctl_list;          } *ctl_list;
   
         /* volume control and MMC/MTC */          /* volume control and MMC/MTC */
 #define CTL_NSLOT       8  #define CTL_NSLOT       8
 #define CTL_NAMEMAX     8  #define CTL_NAMEMAX     8
         unsigned serial;          unsigned int serial;
         struct ctl_slot {          struct ctl_slot {
                 struct ctl_ops {                  struct ctl_ops {
                         void (*vol)(void *, unsigned);                          void (*vol)(void *, unsigned int);
                         void (*start)(void *);                          void (*start)(void *);
                         void (*stop)(void *);                          void (*stop)(void *);
                         void (*loc)(void *, unsigned);                          void (*loc)(void *, unsigned int);
                         void (*quit)(void *);                          void (*quit)(void *);
                 } *ops;                  } *ops;
                 void *arg;                  void *arg;
                 unsigned unit;                  unsigned int unit;
                 char name[CTL_NAMEMAX];                  char name[CTL_NAMEMAX];
                 unsigned serial;                  unsigned int serial;
                 unsigned vol;                  unsigned int vol;
                 unsigned tstate;                  unsigned int tstate;
         } slot[CTL_NSLOT];          } slot[CTL_NSLOT];
 #define CTL_OFF         0                       /* ignore MMC messages */  #define CTL_OFF         0                       /* ignore MMC messages */
 #define CTL_STOP        1                       /* stopped, can't start */  #define CTL_STOP        1                       /* stopped, can't start */
 #define CTL_START       2                       /* attempting to start */  #define CTL_START       2                       /* attempting to start */
 #define CTL_RUN         3                       /* started */  #define CTL_RUN         3                       /* started */
         unsigned tstate;                        /* one of above */          unsigned int tstate;                    /* one of above */
         unsigned origin;                        /* MTC start time */          unsigned int origin;                    /* MTC start time */
         unsigned master;                        /* master volume controller */          unsigned int master;                    /* master volume controller */
 };  };
   
 extern struct dev *dev_list;  extern struct dev *dev_list;
Line 98 
Line 98 
 void dev_del(struct dev *);  void dev_del(struct dev *);
 void dev_wakeup(struct dev *);  void dev_wakeup(struct dev *);
 void dev_drain(struct dev *);  void dev_drain(struct dev *);
 struct dev *dev_new(char *, unsigned, unsigned, unsigned, unsigned, unsigned);  struct dev *dev_new(char *, unsigned int, unsigned int,
 void dev_adjpar(struct dev *, unsigned, struct aparams *, struct aparams *);      unsigned int, unsigned int, unsigned int);
 int  devctl_add(struct dev *, char *, unsigned);  void dev_adjpar(struct dev *, unsigned int,
       struct aparams *, struct aparams *);
   int  devctl_add(struct dev *, char *, unsigned int);
 void dev_midiattach(struct dev *, struct abuf *, struct abuf *);  void dev_midiattach(struct dev *, struct abuf *, struct abuf *);
 unsigned dev_roundof(struct dev *, unsigned);  unsigned int dev_roundof(struct dev *, unsigned int);
 int dev_getpos(struct dev *);  int dev_getpos(struct dev *);
 void dev_attach(struct dev *, char *, unsigned,  void dev_attach(struct dev *, char *, unsigned int,
     struct abuf *, struct aparams *, unsigned,      struct abuf *, struct aparams *, unsigned int,
     struct abuf *, struct aparams *, unsigned,      struct abuf *, struct aparams *, unsigned int,
     unsigned, int);      unsigned int, int);
 void dev_setvol(struct dev *, struct abuf *, int);  void dev_setvol(struct dev *, struct abuf *, int);
   
 void dev_slotdbg(struct dev *, int);  void dev_slotdbg(struct dev *, int);
 int  dev_slotnew(struct dev *, char *, struct ctl_ops *, void *, int);  int  dev_slotnew(struct dev *, char *, struct ctl_ops *, void *, int);
 void dev_slotdel(struct dev *, int);  void dev_slotdel(struct dev *, int);
 void dev_slotvol(struct dev *, int, unsigned);  void dev_slotvol(struct dev *, int, unsigned int);
   
 int  dev_slotstart(struct dev *, int);  int  dev_slotstart(struct dev *, int);
 void dev_slotstop(struct dev *, int);  void dev_slotstop(struct dev *, int);
 void dev_mmcstart(struct dev *);  void dev_mmcstart(struct dev *);
 void dev_mmcstop(struct dev *);  void dev_mmcstop(struct dev *);
 void dev_loc(struct dev *, unsigned);  void dev_loc(struct dev *, unsigned int);
 void dev_master(struct dev *, unsigned);  void dev_master(struct dev *, unsigned int);
   
 #endif /* !define(DEV_H) */  #endif /* !define(DEV_H) */

Legend:
Removed from v.1.35  
changed lines
  Added in v.1.36