audioctl.h 1005 B

12345678910111213141516171819202122232425262728293031323334353637
  1. /*
  2. * This file is part of the UCB release of Plan 9. It is subject to the license
  3. * terms in the LICENSE file found in the top-level directory of this
  4. * distribution and at http://akaros.cs.berkeley.edu/files/Plan9License. No
  5. * part of the UCB release of Plan 9, including this file, may be copied,
  6. * modified, propagated, or distributed except according to the terms contained
  7. * in the LICENSE file.
  8. */
  9. enum{
  10. Undef = 0x80000000,
  11. Play = 0,
  12. Record = 1,
  13. };
  14. typedef struct Audiocontrol Audiocontrol;
  15. struct Audiocontrol {
  16. char *name;
  17. uint8_t readable;
  18. uint8_t settable;
  19. uint8_t chans; /* 0 is master, non-zero is bitmap */
  20. int32_t value[8]; /* 0 is master; value[0] == Undef -> all values Undef */
  21. int32_t min, max, step;
  22. };
  23. extern Audiocontrol controls[2][Ncontrol];
  24. extern int endpt[2];
  25. extern int interface[2];
  26. extern int featureid[2];
  27. extern int selectorid[2];
  28. extern int mixerid[2];
  29. extern int buttonendpt;
  30. int ctlparse(char *s, Audiocontrol *c, int32_t *v);
  31. void ctlevent(void);