u_uac1.h 907 B

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. /*
  2. * u_uac1.h - Utility definitions for UAC1 function
  3. *
  4. * Copyright (C) 2016 Ruslan Bilovol <ruslan.bilovol@gmail.com>
  5. *
  6. * This program is free software; you can redistribute it and/or modify
  7. * it under the terms of the GNU General Public License version 2 as
  8. * published by the Free Software Foundation.
  9. */
  10. #ifndef __U_UAC1_H
  11. #define __U_UAC1_H
  12. #include <linux/usb/composite.h>
  13. #define UAC1_OUT_EP_MAX_PACKET_SIZE 200
  14. #define UAC1_DEF_CCHMASK 0x3
  15. #define UAC1_DEF_CSRATE 48000
  16. #define UAC1_DEF_CSSIZE 2
  17. #define UAC1_DEF_PCHMASK 0x3
  18. #define UAC1_DEF_PSRATE 48000
  19. #define UAC1_DEF_PSSIZE 2
  20. #define UAC1_DEF_REQ_NUM 2
  21. struct f_uac1_opts {
  22. struct usb_function_instance func_inst;
  23. int c_chmask;
  24. int c_srate;
  25. int c_ssize;
  26. int p_chmask;
  27. int p_srate;
  28. int p_ssize;
  29. int req_number;
  30. unsigned bound:1;
  31. struct mutex lock;
  32. int refcnt;
  33. };
  34. #endif /* __U_UAC1_H */