4 * DSP-BIOS Bridge driver support functions for TI OMAP processors.
6 * Private node header shared by NODE and DISP.
8 * Copyright (C) 2005-2006 Texas Instruments, Inc.
10 * This package is free software; you can redistribute it and/or modify
11 * it under the terms of the GNU General Public License version 2 as
12 * published by the Free Software Foundation.
14 * THIS PACKAGE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR
15 * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
16 * WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
22 #include <dspbridge/strmdefs.h>
23 #include <dspbridge/nodedefs.h>
24 #include <dspbridge/nldrdefs.h>
26 /* DSP address of node environment structure */
30 * Node create structures
35 u32 max_msgs
; /* Max # of simultaneous messages for node */
36 u32 seg_id
; /* Segment for allocating message buffers */
37 u32 notify_type
; /* Notify type (SEM_post, SWI_post, etc.) */
38 u32 arg_length
; /* Length in 32-bit words of arg data block */
39 u8
*pdata
; /* Argument data for node */
43 u32 buf_size
; /* Size of buffers for SIO stream */
44 u32 num_bufs
; /* max # of buffers in SIO stream at once */
45 u32 seg_id
; /* Memory segment id to allocate buffers */
46 u32 timeout
; /* Timeout for blocking SIO calls */
47 u32 buf_alignment
; /* Buffer alignment */
48 char *sz_device
; /* Device name for stream */
52 struct node_taskargs
{
53 struct node_msgargs node_msg_args
;
58 u32 dsp_heap_res_addr
; /* DSP virtual heap address */
59 u32 dsp_heap_addr
; /* DSP virtual heap address */
60 u32 heap_size
; /* Heap size */
61 u32 gpp_heap_addr
; /* GPP virtual heap address */
62 u32 profile_id
; /* Profile ID */
65 u32 dais_arg
; /* Address of iAlg object */
66 struct node_strmdef
*strm_in_def
;
67 struct node_strmdef
*strm_out_def
;
71 * ======== node_createargs ========
73 struct node_createargs
{
75 struct node_msgargs node_msg_args
;
76 struct node_taskargs task_arg_obj
;
81 * ======== node_get_channel_id ========
83 * Get the channel index reserved for a stream connection between the
84 * host and a node. This index is reserved when node_connect() is called
85 * to connect the node with the host. This index should be passed to
86 * the CHNL_Open function when the stream is actually opened.
88 * hnode: Node object allocated from node_allocate().
89 * dir: Input (DSP_TONODE) or output (DSP_FROMNODE).
90 * index: Stream index.
91 * chan_id: Location to store channel index.
94 * -EFAULT: Invalid hnode.
95 * -EPERM: Not a task or DAIS socket node.
96 * -EINVAL: The node's stream corresponding to index and dir
97 * is not a stream to or from the host.
103 extern int node_get_channel_id(struct node_object
*hnode
,
104 u32 dir
, u32 index
, u32
*chan_id
);
107 * ======== node_get_strm_mgr ========
109 * Get the STRM manager for a node.
111 * hnode: Node allocated with node_allocate().
112 * strm_man: Location to store STRM manager on output.
115 * -EFAULT: Invalid hnode.
120 extern int node_get_strm_mgr(struct node_object
*hnode
,
121 struct strm_mgr
**strm_man
);
124 * ======== node_get_timeout ========
126 * Get the timeout value of a node.
128 * hnode: Node allocated with node_allocate(), or DSP_HGPPNODE.
130 * Node's timeout value.
135 extern u32
node_get_timeout(struct node_object
*hnode
);
138 * ======== node_get_type ========
140 * Get the type (device, message, task, or XDAIS socket) of a node.
142 * hnode: Node allocated with node_allocate(), or DSP_HGPPNODE.
144 * Node type: NODE_DEVICE, NODE_TASK, NODE_XDAIS, or NODE_GPP.
149 extern enum node_type
node_get_type(struct node_object
*hnode
);
152 * ======== get_node_info ========
154 * Get node information without holding semaphore.
156 * hnode: Node allocated with node_allocate(), or DSP_HGPPNODE.
158 * Node info: priority, device owner, no. of streams, execution state
164 extern void get_node_info(struct node_object
*hnode
,
165 struct dsp_nodeinfo
*node_info
);
168 * ======== node_get_load_type ========
170 * Get the load type (dynamic, overlay, static) of a node.
172 * hnode: Node allocated with node_allocate(), or DSP_HGPPNODE.
174 * Node type: NLDR_DYNAMICLOAD, NLDR_OVLYLOAD, NLDR_STATICLOAD
179 extern enum nldr_loadtype
node_get_load_type(struct node_object
*hnode
);
181 #endif /* NODEPRIV_ */