Repository navigation
Expand file tree
/
Copy pathschedule.h
More file actions
56 lines (46 loc) · 1.45 KB
/
Copy pathschedule.h
File metadata and controls
56 lines (46 loc) · 1.45 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
/* SPDX-License-Identifier: BSD-3-Clause
*
* Copyright(c) 2016 Intel Corporation. All rights reserved.
*
* Author: Liam Girdwood <liam.r.girdwood@linux.intel.com>
* Keyon Jie <yang.jie@linux.intel.com>
*/
/**
* @file sof/ipc/schedule.h
* @brief Host IPC message dispatch and scheduling task interface.
* @ingroup scheduling_api ipc4_api
*/
#ifndef __SOF_IPC_SCHEDULE_H__
#define __SOF_IPC_SCHEDULE_H__
#include <rtos/task.h>
#include <rtos/sof.h>
#include <stdbool.h>
#include <stdint.h>
/** \addtogroup scheduling_api
* @{
*/
/** @brief Scheduling period for host IPC worker task in microseconds. */
#define IPC_PERIOD_USEC 100
struct ipc;
/**
* @brief Retrieve IPC command processing deadline.
* @param[in] data Task structure context pointer.
* @return Task deadline timestamp (@ref SOF_TASK_DEADLINE_NOW).
*/
static inline uint64_t ipc_task_deadline(void *data)
{
/* TODO: Currently it's a workaround to execute IPC tasks ASAP.
* In the future IPCs should have a cycle budget and deadline
* should be calculated based on that value. This means every
* IPC should have its own maximum number of cycles that is required
* to finish processing. This will allow us to calculate task deadline.
*/
return SOF_TASK_DEADLINE_NOW;
}
/**
* @brief Schedule processing of the next pending IPC command received from host.
* @param[in,out] ipc Global IPC subsystem context pointer.
*/
void ipc_schedule_process(struct ipc *ipc);
/** @}*/
#endif