Greg Kroah-Hartman | 5fd54ac | 2017-11-03 11:28:30 +0100 | [diff] [blame] | 1 | // SPDX-License-Identifier: GPL-2.0 |
Andrzej Pietrasiewicz | f8f93d2 | 2014-07-22 19:58:30 +0200 | [diff] [blame] | 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> |
Andrzej Pietrasiewicz | f8f93d2 | 2014-07-22 19:58:30 +0200 | [diff] [blame] | 11 | */ |
| 12 | |
| 13 | #ifndef U_UAC2_H |
| 14 | #define U_UAC2_H |
| 15 | |
| 16 | #include <linux/usb/composite.h> |
| 17 | |
Andrzej Pietrasiewicz | 065a107 | 2014-07-22 19:58:34 +0200 | [diff] [blame] | 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 |
Peter Chen | e92b9d4 | 2017-01-04 10:19:23 +0800 | [diff] [blame] | 24 | #define UAC2_DEF_REQ_NUM 2 |
Andrzej Pietrasiewicz | 065a107 | 2014-07-22 19:58:34 +0200 | [diff] [blame] | 25 | |
Andrzej Pietrasiewicz | f8f93d2 | 2014-07-22 19:58:30 +0200 | [diff] [blame] | 26 | struct f_uac2_opts { |
| 27 | struct usb_function_instance func_inst; |
| 28 | int p_chmask; |
| 29 | int p_srate; |
| 30 | int p_ssize; |
| 31 | int c_chmask; |
| 32 | int c_srate; |
| 33 | int c_ssize; |
Peter Chen | e92b9d4 | 2017-01-04 10:19:23 +0800 | [diff] [blame] | 34 | int req_number; |
Andrzej Pietrasiewicz | f8f93d2 | 2014-07-22 19:58:30 +0200 | [diff] [blame] | 35 | bool bound; |
Andrzej Pietrasiewicz | 3aeea3c | 2014-07-22 19:58:35 +0200 | [diff] [blame] | 36 | |
| 37 | struct mutex lock; |
| 38 | int refcnt; |
Andrzej Pietrasiewicz | f8f93d2 | 2014-07-22 19:58:30 +0200 | [diff] [blame] | 39 | }; |
| 40 | |
| 41 | #endif |