u_uac1.h 753 B

1234567891011121314151617181920212223242526272829303132333435363738
  1. // SPDX-License-Identifier: GPL-2.0
  2. /*
  3. * u_uac1.h - Utility definitions for UAC1 function
  4. *
  5. * Copyright (C) 2016 Ruslan Bilovol <ruslan.bilovol@gmail.com>
  6. */
  7. #ifndef __U_UAC1_H
  8. #define __U_UAC1_H
  9. #include <linux/usb/composite.h>
  10. #define UAC1_OUT_EP_MAX_PACKET_SIZE 200
  11. #define UAC1_DEF_CCHMASK 0x3
  12. #define UAC1_DEF_CSRATE 48000
  13. #define UAC1_DEF_CSSIZE 2
  14. #define UAC1_DEF_PCHMASK 0x3
  15. #define UAC1_DEF_PSRATE 48000
  16. #define UAC1_DEF_PSSIZE 2
  17. #define UAC1_DEF_REQ_NUM 2
  18. struct f_uac1_opts {
  19. struct usb_function_instance func_inst;
  20. int c_chmask;
  21. int c_srate;
  22. int c_ssize;
  23. int p_chmask;
  24. int p_srate;
  25. int p_ssize;
  26. int req_number;
  27. unsigned bound:1;
  28. struct mutex lock;
  29. int refcnt;
  30. };
  31. #endif /* __U_UAC1_H */