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 utimeout
; /* 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 udsp_heap_res_addr
; /* DSP virtual heap address */
59 u32 udsp_heap_addr
; /* DSP virtual heap address */
60 u32 heap_size
; /* Heap size */
61 u32 ugpp_heap_addr
; /* GPP virtual heap address */
62 u32 profile_id
; /* Profile ID */
65 u32 ul_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.
99 * node_init(void) called.
104 extern int node_get_channel_id(struct node_object
*hnode
,
105 u32 dir
, u32 index
, OUT u32
*chan_id
);
108 * ======== node_get_strm_mgr ========
110 * Get the STRM manager for a node.
112 * hnode: Node allocated with node_allocate().
113 * strm_man: Location to store STRM manager on output.
116 * -EFAULT: Invalid hnode.
121 extern int node_get_strm_mgr(struct node_object
*hnode
,
122 struct strm_mgr
**strm_man
);
125 * ======== node_get_timeout ========
127 * Get the timeout value of a node.
129 * hnode: Node allocated with node_allocate(), or DSP_HGPPNODE.
131 * Node's timeout value.
136 extern u32
node_get_timeout(struct node_object
*hnode
);
139 * ======== node_get_type ========
141 * Get the type (device, message, task, or XDAIS socket) of a node.
143 * hnode: Node allocated with node_allocate(), or DSP_HGPPNODE.
145 * Node type: NODE_DEVICE, NODE_TASK, NODE_XDAIS, or NODE_GPP.
150 extern enum node_type
node_get_type(struct node_object
*hnode
);
153 * ======== get_node_info ========
155 * Get node information without holding semaphore.
157 * hnode: Node allocated with node_allocate(), or DSP_HGPPNODE.
159 * Node info: priority, device owner, no. of streams, execution state
165 extern void get_node_info(struct node_object
*hnode
,
166 struct dsp_nodeinfo
*node_info
);
169 * ======== node_get_load_type ========
171 * Get the load type (dynamic, overlay, static) of a node.
173 * hnode: Node allocated with node_allocate(), or DSP_HGPPNODE.
175 * Node type: NLDR_DYNAMICLOAD, NLDR_OVLYLOAD, NLDR_STATICLOAD
180 extern enum nldr_loadtype
node_get_load_type(struct node_object
*hnode
);
182 #endif /* NODEPRIV_ */