usbaudioctl.h 2.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364
  1. enum{
  2. Undef = 0x80000000,
  3. Play = 0, /* for USB Streaming Terminal K.Okamoto */
  4. Record = 1, /* for USB Streaming Terminal K.Okamoto */
  5. masterRecAGC, /* feature ID for master record AGC function K.Okamoto */
  6. masterRecMute, /* feature IDs for master record mute function K.Okamoto */
  7. LRRecVol, /* feature ID for master record L/R volume for Mic, LineIN */
  8. LRPlayVol, /* Left/Right volume for speaker, no master volume */
  9. masterPlayMute, /* feature ID for master play mute for Speaker, K.Okamoto */
  10. masterPlayVol, /* feature ID for master play volume control function */
  11. };
  12. typedef struct Audiocontrol Audiocontrol;
  13. struct Audiocontrol {
  14. char *name;
  15. uchar readable;
  16. uchar settable;
  17. uchar chans; /* 0 is master, non-zero is bitmap */
  18. long value[9]; /* 0 is master; value[0] == Undef -> all values Undef */
  19. long min, max, step;
  20. };
  21. typedef struct FeatureAttr FeatureAttr; /* K.Okamoto */
  22. struct FeatureAttr {
  23. int id;
  24. uchar readable;
  25. uchar settable;
  26. uchar chans;
  27. long value[9];
  28. long min, max, step;
  29. };
  30. typedef struct MasterVol MasterVol; /* K.Okamoto */
  31. struct MasterVol { /* K.Okamoto */
  32. long min;
  33. long max;
  34. long step;
  35. long value;
  36. };
  37. extern Audiocontrol controls[2][Ncontrol];
  38. extern int endpt[2];
  39. extern int interface[2];
  40. extern int featureid[2]; /* current Play/Record Feature ID */
  41. extern int selectorid[2];
  42. extern int selector; /* K.Okamoto */
  43. extern int mixerid; /* K.Okamoto */
  44. extern int buttonendpt;
  45. int ctlparse(char *s, Audiocontrol *c, long *v);
  46. void ctlevent(void);
  47. int getspecialcontrol(Audiocontrol *c, int rec, int ctl, int req, long *value);
  48. int setselector(int); /* added by K.Okamoto */
  49. int initmixer(void); /* added by K.Okamoto */
  50. int getmasterValue(int, int, int, int, int, long*); /* added by K.Okamoto */
  51. int getchannelVol(int, int, int, int, int, uchar, long*); /* added by K.okamoto */
  52. int setmasterValue(Audiocontrol*, int, int, int, int, int, long*); /* K.Okamoto */
  53. int setchannelVol(Audiocontrol*, int, int, int, int, int, long*); /* K.Okamoto */
  54. int printValue(Audiocontrol*, int req, long*); /* K.Okamoto */
  55. #pragma varargck type "A" Audiocontrol*