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 * This program is free software; you can redistribute it and/or modify 13 * it under the terms of the GNU General Public License version 2 as 14 * published by the Free Software Foundation. 15 */ 16 17 #ifndef U_UAC2_H 18 #define U_UAC2_H 19 20 #include <linux/usb/composite.h> 21 22 #define UAC2_DEF_PCHMASK 0x3 23 #define UAC2_DEF_PSRATE 48000 24 #define UAC2_DEF_PSSIZE 2 25 #define UAC2_DEF_CCHMASK 0x3 26 #define UAC2_DEF_CSRATE 64000 27 #define UAC2_DEF_CSSIZE 2 28 #define UAC2_DEF_REQ_NUM 2 29 30 struct f_uac2_opts { 31 struct usb_function_instance func_inst; 32 int p_chmask; 33 int p_srate; 34 int p_ssize; 35 int c_chmask; 36 int c_srate; 37 int c_ssize; 38 int req_number; 39 bool bound; 40 41 struct mutex lock; 42 int refcnt; 43 }; 44 45 #endif 46