u_uac2.h 761 B

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. // SPDX-License-Identifier: GPL-2.0
  2. /*
  3. * u_uac2.h
  4. *
  5. * Utility definitions for UAC2 function
  6. *
  7. * Copyright (c) 2014 Samsung Electronics Co., Ltd.
  8. * http://www.samsung.com
  9. *
  10. * Author: Andrzej Pietrasiewicz <andrzej.p@samsung.com>
  11. */
  12. #ifndef U_UAC2_H
  13. #define U_UAC2_H
  14. #include <linux/usb/composite.h>
  15. #define UAC2_DEF_PCHMASK 0x3
  16. #define UAC2_DEF_PSRATE 48000
  17. #define UAC2_DEF_PSSIZE 2
  18. #define UAC2_DEF_CCHMASK 0x3
  19. #define UAC2_DEF_CSRATE 64000
  20. #define UAC2_DEF_CSSIZE 2
  21. #define UAC2_DEF_REQ_NUM 2
  22. struct f_uac2_opts {
  23. struct usb_function_instance func_inst;
  24. int p_chmask;
  25. int p_srate;
  26. int p_ssize;
  27. int c_chmask;
  28. int c_srate;
  29. int c_ssize;
  30. int req_number;
  31. bool bound;
  32. struct mutex lock;
  33. int refcnt;
  34. };
  35. #endif