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