Ruslan Bilovol | 0591bc2 | 2017-06-18 16:23:54 +0300 | [diff] [blame] | 1 | /* |
| 2 | * u_uac1.h - Utility definitions for UAC1 function |
| 3 | * |
| 4 | * Copyright (C) 2016 Ruslan Bilovol <ruslan.bilovol@gmail.com> |
| 5 | * |
| 6 | * This program is free software; you can redistribute it and/or modify |
| 7 | * it under the terms of the GNU General Public License version 2 as |
| 8 | * published by the Free Software Foundation. |
| 9 | */ |
| 10 | |
| 11 | #ifndef __U_UAC1_H |
| 12 | #define __U_UAC1_H |
| 13 | |
| 14 | #include <linux/usb/composite.h> |
| 15 | |
| 16 | #define UAC1_OUT_EP_MAX_PACKET_SIZE 200 |
| 17 | #define UAC1_DEF_CCHMASK 0x3 |
| 18 | #define UAC1_DEF_CSRATE 48000 |
| 19 | #define UAC1_DEF_CSSIZE 2 |
| 20 | #define UAC1_DEF_PCHMASK 0x3 |
| 21 | #define UAC1_DEF_PSRATE 48000 |
| 22 | #define UAC1_DEF_PSSIZE 2 |
| 23 | #define UAC1_DEF_REQ_NUM 2 |
| 24 | |
| 25 | |
| 26 | struct f_uac1_opts { |
| 27 | struct usb_function_instance func_inst; |
| 28 | int c_chmask; |
| 29 | int c_srate; |
| 30 | int c_ssize; |
| 31 | int p_chmask; |
| 32 | int p_srate; |
| 33 | int p_ssize; |
| 34 | int req_number; |
| 35 | unsigned bound:1; |
| 36 | |
| 37 | struct mutex lock; |
| 38 | int refcnt; |
| 39 | }; |
| 40 | |
| 41 | #endif /* __U_UAC1_H */ |