xref: /linux/drivers/usb/gadget/function/u_uac1.h (revision a1c3be890440a1769ed6f822376a3e3ab0d42994)
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 
8 #ifndef __U_UAC1_H
9 #define __U_UAC1_H
10 
11 #include <linux/usb/composite.h>
12 
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 
22 
23 struct f_uac1_opts {
24 	struct usb_function_instance	func_inst;
25 	int				c_chmask;
26 	int				c_srate;
27 	int				c_ssize;
28 	int				p_chmask;
29 	int				p_srate;
30 	int				p_ssize;
31 	int				req_number;
32 	unsigned			bound:1;
33 
34 	struct mutex			lock;
35 	int				refcnt;
36 };
37 
38 #endif /* __U_UAC1_H */
39