1 /* SPDX-License-Identifier: BSD-3-Clause 2 * Copyright(c) 2010-2015 Intel Corporation 3 */ 4 5 #ifndef THREAD_H_ 6 #define THREAD_H_ 7 8 #include "app.h" 9 #include "pipeline_be.h" 10 11 enum thread_msg_req_type { 12 THREAD_MSG_REQ_PIPELINE_ENABLE = 0, 13 THREAD_MSG_REQ_PIPELINE_DISABLE, 14 THREAD_MSG_REQ_HEADROOM_READ, 15 THREAD_MSG_REQS 16 }; 17 18 struct thread_msg_req { 19 enum thread_msg_req_type type; 20 }; 21 22 struct thread_msg_rsp { 23 int status; 24 }; 25 26 /* 27 * PIPELINE ENABLE 28 */ 29 struct thread_pipeline_enable_msg_req { 30 enum thread_msg_req_type type; 31 32 uint32_t pipeline_id; 33 void *be; 34 pipeline_be_op_run f_run; 35 pipeline_be_op_timer f_timer; 36 uint64_t timer_period; 37 }; 38 39 struct thread_pipeline_enable_msg_rsp { 40 int status; 41 }; 42 43 /* 44 * PIPELINE DISABLE 45 */ 46 struct thread_pipeline_disable_msg_req { 47 enum thread_msg_req_type type; 48 49 uint32_t pipeline_id; 50 }; 51 52 struct thread_pipeline_disable_msg_rsp { 53 int status; 54 }; 55 56 /* 57 * THREAD HEADROOM 58 */ 59 struct thread_headroom_read_msg_req { 60 enum thread_msg_req_type type; 61 }; 62 63 struct thread_headroom_read_msg_rsp { 64 int status; 65 66 double headroom_ratio; 67 }; 68 69 #endif /* THREAD_H_ */ 70