u_uac2.h 868 B

123456789101112131415161718192021222324252627282930313233343536373839404142
  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. struct f_uac2_opts {
  25. struct usb_function_instance func_inst;
  26. int p_chmask;
  27. int p_srate;
  28. int p_ssize;
  29. int c_chmask;
  30. int c_srate;
  31. int c_ssize;
  32. bool bound;
  33. struct mutex lock;
  34. int refcnt;
  35. };
  36. #endif