u_uac2.h 915 B

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  1. /*
  2. * u_uac2.h
  3. *
  4. * Utility definitions for UAC2 function
  5. *
  6. * Copyright (c) 2014 Samsung Electronics Co., Ltd.
  7. * http://www.samsung.com
  8. *
  9. * Author: Andrzej Pietrasiewicz <andrzej.p@samsung.com>
  10. *
  11. * This program is free software; you can redistribute it and/or modify
  12. * it under the terms of the GNU General Public License version 2 as
  13. * published by the Free Software Foundation.
  14. */
  15. #ifndef U_UAC2_H
  16. #define U_UAC2_H
  17. #include <linux/usb/composite.h>
  18. #define UAC2_DEF_PCHMASK 0x3
  19. #define UAC2_DEF_PSRATE 48000
  20. #define UAC2_DEF_PSSIZE 2
  21. #define UAC2_DEF_CCHMASK 0x3
  22. #define UAC2_DEF_CSRATE 64000
  23. #define UAC2_DEF_CSSIZE 2
  24. #define UAC2_DEF_REQ_NUM 2
  25. struct f_uac2_opts {
  26. struct usb_function_instance func_inst;
  27. int p_chmask;
  28. int p_srate;
  29. int p_ssize;
  30. int c_chmask;
  31. int c_srate;
  32. int c_ssize;
  33. int req_number;
  34. bool bound;
  35. struct mutex lock;
  36. int refcnt;
  37. };
  38. #endif