xref: /OK3568_Linux_fs/kernel/sound/pci/asihpi/hpimsginit.h (revision 4882a59341e53eb6f0b4789bf948001014eff981)
1*4882a593Smuzhiyun /* SPDX-License-Identifier: GPL-2.0-only */
2*4882a593Smuzhiyun /******************************************************************************
3*4882a593Smuzhiyun 
4*4882a593Smuzhiyun     AudioScience HPI driver
5*4882a593Smuzhiyun     Copyright (C) 1997-2011  AudioScience Inc. <support@audioscience.com>
6*4882a593Smuzhiyun 
7*4882a593Smuzhiyun 
8*4882a593Smuzhiyun  Hardware Programming Interface (HPI) Utility functions
9*4882a593Smuzhiyun 
10*4882a593Smuzhiyun  (C) Copyright AudioScience Inc. 2007
11*4882a593Smuzhiyun *******************************************************************************/
12*4882a593Smuzhiyun /* Initialise response headers, or msg/response pairs.
13*4882a593Smuzhiyun Note that it is valid to just init a response e.g. when a lower level is
14*4882a593Smuzhiyun preparing a response to a message.
15*4882a593Smuzhiyun However, when sending a message, a matching response buffer must always be
16*4882a593Smuzhiyun prepared.
17*4882a593Smuzhiyun */
18*4882a593Smuzhiyun 
19*4882a593Smuzhiyun #ifndef _HPIMSGINIT_H_
20*4882a593Smuzhiyun #define _HPIMSGINIT_H_
21*4882a593Smuzhiyun 
22*4882a593Smuzhiyun void hpi_init_response(struct hpi_response *phr, u16 object, u16 function,
23*4882a593Smuzhiyun 	u16 error);
24*4882a593Smuzhiyun 
25*4882a593Smuzhiyun void hpi_init_message_response(struct hpi_message *phm,
26*4882a593Smuzhiyun 	struct hpi_response *phr, u16 object, u16 function);
27*4882a593Smuzhiyun 
28*4882a593Smuzhiyun void hpi_init_responseV1(struct hpi_response_header *phr, u16 size,
29*4882a593Smuzhiyun 	u16 object, u16 function);
30*4882a593Smuzhiyun 
31*4882a593Smuzhiyun void hpi_init_message_responseV1(struct hpi_message_header *phm, u16 msg_size,
32*4882a593Smuzhiyun 	struct hpi_response_header *phr, u16 res_size, u16 object,
33*4882a593Smuzhiyun 	u16 function);
34*4882a593Smuzhiyun 
35*4882a593Smuzhiyun #endif				/* _HPIMSGINIT_H_ */
36