1 /** 2 * Copyright (c) 2019, The Linux Foundation. All rights reserved. 3 * 4 * Redistribution and use in source and binary forms, with or without 5 * modification, are permitted provided that the following conditions are 6 * met: 7 * * Redistributions of source code must retain the above copyright 8 * notice, this list of conditions and the following disclaimer. 9 * * Redistributions in binary form must reproduce the above 10 * copyright notice, this list of conditions and the following 11 * disclaimer in the documentation and/or other materials provided 12 * with the distribution. 13 * * Neither the name of The Linux Foundation nor the names of its 14 * contributors may be used to endorse or promote products derived 15 * from this software without specific prior written permission. 16 * 17 * THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESS OR IMPLIED 18 * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF 19 * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT 20 * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS 21 * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 22 * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 23 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR 24 * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, 25 * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE 26 * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN 27 * IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 28 */ 29 30 #ifndef _ADSP_LISTENER_H 31 #define _ADSP_LISTENER_H 32 #include "AEEStdDef.h" 33 #ifndef __QAIC_HEADER 34 #define __QAIC_HEADER(ff) ff 35 #endif //__QAIC_HEADER 36 37 #ifndef __QAIC_HEADER_EXPORT 38 #define __QAIC_HEADER_EXPORT 39 #endif // __QAIC_HEADER_EXPORT 40 41 #ifndef __QAIC_HEADER_ATTRIBUTE 42 #define __QAIC_HEADER_ATTRIBUTE 43 #endif // __QAIC_HEADER_ATTRIBUTE 44 45 #ifndef __QAIC_IMPL 46 #define __QAIC_IMPL(ff) ff 47 #endif //__QAIC_IMPL 48 49 #ifndef __QAIC_IMPL_EXPORT 50 #define __QAIC_IMPL_EXPORT 51 #endif // __QAIC_IMPL_EXPORT 52 53 #ifndef __QAIC_IMPL_ATTRIBUTE 54 #define __QAIC_IMPL_ATTRIBUTE 55 #endif // __QAIC_IMPL_ATTRIBUTE 56 #ifdef __cplusplus 57 extern "C" { 58 #endif 59 #define _const_adsp_listener_handle 3 60 typedef struct _adsp_listener_buffer__seq_uint8 _adsp_listener_buffer__seq_uint8; 61 typedef _adsp_listener_buffer__seq_uint8 adsp_listener_buffer; 62 struct _adsp_listener_buffer__seq_uint8 { 63 uint8* data; 64 int dataLen; 65 }; 66 typedef uint32 adsp_listener_remote_handle; 67 typedef uint32 adsp_listener_invoke_ctx; 68 __QAIC_HEADER_EXPORT int __QAIC_HEADER(adsp_listener_next_invoke)(adsp_listener_invoke_ctx prevCtx, int prevResult, const adsp_listener_buffer* outBufs, int outBufsLen, adsp_listener_invoke_ctx* ctx, adsp_listener_remote_handle* handle, uint32* sc, adsp_listener_buffer* inBuffers, int inBuffersLen, int* inBufLenReq, int inBufLenReqLen, int* routBufLenReq, int routBufLenReqLen) __QAIC_HEADER_ATTRIBUTE; 69 __QAIC_HEADER_EXPORT int __QAIC_HEADER(adsp_listener_invoke_get_in_bufs)(adsp_listener_invoke_ctx ctx, adsp_listener_buffer* inBuffers, int inBuffersLen) __QAIC_HEADER_ATTRIBUTE; 70 __QAIC_HEADER_EXPORT int __QAIC_HEADER(adsp_listener_init)(void) __QAIC_HEADER_ATTRIBUTE; 71 __QAIC_HEADER_EXPORT int __QAIC_HEADER(adsp_listener_init2)(void) __QAIC_HEADER_ATTRIBUTE; 72 __QAIC_HEADER_EXPORT int __QAIC_HEADER(adsp_listener_next2)(adsp_listener_invoke_ctx prevCtx, int prevResult, const uint8* prevbufs, int prevbufsLen, adsp_listener_invoke_ctx* ctx, adsp_listener_remote_handle* handle, uint32* sc, uint8* bufs, int bufsLen, int* bufsLenReq) __QAIC_HEADER_ATTRIBUTE; 73 __QAIC_HEADER_EXPORT int __QAIC_HEADER(adsp_listener_get_in_bufs2)(adsp_listener_invoke_ctx ctx, int offset, uint8* bufs, int bufsLen, int* bufsLenReq) __QAIC_HEADER_ATTRIBUTE; 74 #ifdef __cplusplus 75 } 76 #endif 77 #endif //_ADSP_LISTENER_H 78