2020-03-28 18:11:15 +07:00
|
|
|
/* SPDX-License-Identifier: GPL-2.0 */
|
2014-07-23 00:58:30 +07:00
|
|
|
/*
|
|
|
|
* u_uac2.h
|
|
|
|
*
|
|
|
|
* Utility definitions for UAC2 function
|
|
|
|
*
|
|
|
|
* Copyright (c) 2014 Samsung Electronics Co., Ltd.
|
|
|
|
* http://www.samsung.com
|
|
|
|
*
|
2018-12-13 20:24:57 +07:00
|
|
|
* Author: Andrzej Pietrasiewicz <andrzejtp2010@gmail.com>
|
2014-07-23 00:58:30 +07:00
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef U_UAC2_H
|
|
|
|
#define U_UAC2_H
|
|
|
|
|
|
|
|
#include <linux/usb/composite.h>
|
|
|
|
|
2014-07-23 00:58:34 +07:00
|
|
|
#define UAC2_DEF_PCHMASK 0x3
|
|
|
|
#define UAC2_DEF_PSRATE 48000
|
|
|
|
#define UAC2_DEF_PSSIZE 2
|
|
|
|
#define UAC2_DEF_CCHMASK 0x3
|
|
|
|
#define UAC2_DEF_CSRATE 64000
|
|
|
|
#define UAC2_DEF_CSSIZE 2
|
2017-01-04 09:19:23 +07:00
|
|
|
#define UAC2_DEF_REQ_NUM 2
|
2014-07-23 00:58:34 +07:00
|
|
|
|
2014-07-23 00:58:30 +07:00
|
|
|
struct f_uac2_opts {
|
|
|
|
struct usb_function_instance func_inst;
|
|
|
|
int p_chmask;
|
|
|
|
int p_srate;
|
|
|
|
int p_ssize;
|
|
|
|
int c_chmask;
|
|
|
|
int c_srate;
|
|
|
|
int c_ssize;
|
2017-01-04 09:19:23 +07:00
|
|
|
int req_number;
|
2014-07-23 00:58:30 +07:00
|
|
|
bool bound;
|
2014-07-23 00:58:35 +07:00
|
|
|
|
|
|
|
struct mutex lock;
|
|
|
|
int refcnt;
|
2014-07-23 00:58:30 +07:00
|
|
|
};
|
|
|
|
|
|
|
|
#endif
|