Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Data Structures | Macros | Enumerations | Functions
node.c File Reference
#include <linux/types.h>
#include <linux/bitmap.h>
#include <linux/list.h>
#include <dspbridge/host_os.h>
#include <dspbridge/dbdefs.h>
#include <dspbridge/memdefs.h>
#include <dspbridge/proc.h>
#include <dspbridge/strm.h>
#include <dspbridge/sync.h>
#include <dspbridge/ntfy.h>
#include <dspbridge/cmm.h>
#include <dspbridge/cod.h>
#include <dspbridge/dev.h>
#include <dspbridge/msg.h>
#include <dspbridge/dbdcd.h>
#include <dspbridge/disp.h>
#include <dspbridge/rms_sh.h>
#include <dspbridge/dspdefs.h>
#include <dspbridge/dspioctl.h>
#include <dspbridge/uuidutil.h>
#include <dspbridge/nodepriv.h>
#include <dspbridge/node.h>
#include <dspbridge/dmm.h>
#include <dspbridge/dbll.h>
#include <dspbridge/nldr.h>
#include <dspbridge/drv.h>
#include <dspbridge/resourcecleanup.h>
#include <_tiomap.h>
#include <dspbridge/dspdeh.h>

Go to the source code of this file.

Data Structures

struct  node_mgr
 
struct  stream_chnl
 
struct  node_object
 

Macros

#define HOSTPREFIX   "/host"
 
#define PIPEPREFIX   "/dbpipe"
 
#define MAX_INPUTS(h)   ((h)->dcd_props.obj_data.node_obj.ndb_props.num_input_streams)
 
#define MAX_OUTPUTS(h)   ((h)->dcd_props.obj_data.node_obj.ndb_props.num_output_streams)
 
#define NODE_GET_PRIORITY(h)   ((h)->prio)
 
#define NODE_SET_PRIORITY(hnode, prio)   ((hnode)->prio = prio)
 
#define NODE_SET_STATE(hnode, state)   ((hnode)->node_state = state)
 
#define MAXPIPES   100 /* Max # of /pipe connections (CSL limit) */
 
#define MAXDEVSUFFIXLEN   2 /* Max(Log base 10 of MAXPIPES, MAXSTREAMS) */
 
#define PIPENAMELEN   (sizeof(PIPEPREFIX) + MAXDEVSUFFIXLEN)
 
#define HOSTNAMELEN   (sizeof(HOSTPREFIX) + MAXDEVSUFFIXLEN)
 
#define MAXDEVNAMELEN   32 /* dsp_ndbprops.ac_name size */
 
#define CREATEPHASE   1
 
#define EXECUTEPHASE   2
 
#define DELETEPHASE   3
 
#define DEFAULTBUFSIZE   32
 
#define DEFAULTNBUFS   2
 
#define DEFAULTSEGID   0
 
#define DEFAULTALIGNMENT   0
 
#define DEFAULTTIMEOUT   10000
 
#define RMSQUERYSERVER   0
 
#define RMSCONFIGURESERVER   1
 
#define RMSCREATENODE   2
 
#define RMSEXECUTENODE   3
 
#define RMSDELETENODE   4
 
#define RMSCHANGENODEPRIORITY   5
 
#define RMSREADMEMORY   6
 
#define RMSWRITEMEMORY   7
 
#define RMSCOPY   8
 
#define MAXTIMEOUT   2000
 
#define NUMRMSFXNS   9
 
#define PWR_TIMEOUT   500 /* default PWR timeout in msec */
 
#define STACKSEGLABEL   "L1DSRAM_HEAP" /* Label for DSP Stack Segment Addr */
 

Enumerations

enum  connecttype { NOTCONNECTED = 0, NODECONNECT, HOSTCONNECT, DEVICECONNECT }
 

Functions

enum node_state node_get_state (void *hnode)
 
int node_allocate (struct proc_object *hprocessor, const struct dsp_uuid *node_uuid, const struct dsp_cbdata *pargs, const struct dsp_nodeattrin *attr_in, struct node_res_object **noderes, struct process_context *pr_ctxt)
 
DBAPI node_alloc_msg_buf (struct node_object *hnode, u32 usize, struct dsp_bufferattr *pattr, u8 **pbuffer)
 
int node_change_priority (struct node_object *hnode, s32 prio)
 
int node_connect (struct node_object *node1, u32 stream1, struct node_object *node2, u32 stream2, struct dsp_strmattr *pattrs, struct dsp_cbdata *conn_param)
 
int node_create (struct node_object *hnode)
 
int node_create_mgr (struct node_mgr **node_man, struct dev_object *hdev_obj)
 
int node_delete (struct node_res_object *noderes, struct process_context *pr_ctxt)
 
int node_delete_mgr (struct node_mgr *hnode_mgr)
 
int node_enum_nodes (struct node_mgr *hnode_mgr, void **node_tab, u32 node_tab_size, u32 *pu_num_nodes, u32 *pu_allocated)
 
int node_free_msg_buf (struct node_object *hnode, u8 *pbuffer, struct dsp_bufferattr *pattr)
 
int node_get_attr (struct node_object *hnode, struct dsp_nodeattr *pattr, u32 attr_size)
 
int node_get_channel_id (struct node_object *hnode, u32 dir, u32 index, u32 *chan_id)
 
int node_get_message (struct node_object *hnode, struct dsp_msg *message, u32 utimeout)
 
int node_get_nldr_obj (struct node_mgr *hnode_mgr, struct nldr_object **nldr_ovlyobj)
 
int node_get_strm_mgr (struct node_object *hnode, struct strm_mgr **strm_man)
 
enum nldr_loadtype node_get_load_type (struct node_object *hnode)
 
u32 node_get_timeout (struct node_object *hnode)
 
enum node_type node_get_type (struct node_object *hnode)
 
void node_on_exit (struct node_object *hnode, s32 node_status)
 
int node_pause (struct node_object *hnode)
 
int node_put_message (struct node_object *hnode, const struct dsp_msg *pmsg, u32 utimeout)
 
int node_register_notify (struct node_object *hnode, u32 event_mask, u32 notify_type, struct dsp_notification *hnotification)
 
int node_run (struct node_object *hnode)
 
int node_terminate (struct node_object *hnode, int *pstatus)
 
void get_node_info (struct node_object *hnode, struct dsp_nodeinfo *node_info)
 
int node_get_uuid_props (void *hprocessor, const struct dsp_uuid *node_uuid, struct dsp_ndbprops *node_props)
 

Macro Definition Documentation

#define CREATEPHASE   1

Definition at line 88 of file node.c.

#define DEFAULTALIGNMENT   0

Definition at line 100 of file node.c.

#define DEFAULTBUFSIZE   32

Definition at line 97 of file node.c.

#define DEFAULTNBUFS   2

Definition at line 98 of file node.c.

#define DEFAULTSEGID   0

Definition at line 99 of file node.c.

#define DEFAULTTIMEOUT   10000

Definition at line 101 of file node.c.

#define DELETEPHASE   3

Definition at line 90 of file node.c.

#define EXECUTEPHASE   2

Definition at line 89 of file node.c.

#define HOSTNAMELEN   (sizeof(HOSTPREFIX) + MAXDEVSUFFIXLEN)

Definition at line 85 of file node.c.

#define HOSTPREFIX   "/host"

Definition at line 69 of file node.c.

#define MAX_INPUTS (   h)    ((h)->dcd_props.obj_data.node_obj.ndb_props.num_input_streams)

Definition at line 72 of file node.c.

#define MAX_OUTPUTS (   h)    ((h)->dcd_props.obj_data.node_obj.ndb_props.num_output_streams)

Definition at line 74 of file node.c.

#define MAXDEVNAMELEN   32 /* dsp_ndbprops.ac_name size */

Definition at line 87 of file node.c.

#define MAXDEVSUFFIXLEN   2 /* Max(Log base 10 of MAXPIPES, MAXSTREAMS) */

Definition at line 82 of file node.c.

#define MAXPIPES   100 /* Max # of /pipe connections (CSL limit) */

Definition at line 81 of file node.c.

#define MAXTIMEOUT   2000

Definition at line 112 of file node.c.

#define NODE_GET_PRIORITY (   h)    ((h)->prio)

Definition at line 77 of file node.c.

#define NODE_SET_PRIORITY (   hnode,
  prio 
)    ((hnode)->prio = prio)

Definition at line 78 of file node.c.

#define NODE_SET_STATE (   hnode,
  state 
)    ((hnode)->node_state = state)

Definition at line 79 of file node.c.

#define NUMRMSFXNS   9

Definition at line 114 of file node.c.

#define PIPENAMELEN   (sizeof(PIPEPREFIX) + MAXDEVSUFFIXLEN)

Definition at line 84 of file node.c.

#define PIPEPREFIX   "/dbpipe"

Definition at line 70 of file node.c.

#define PWR_TIMEOUT   500 /* default PWR timeout in msec */

Definition at line 116 of file node.c.

#define RMSCHANGENODEPRIORITY   5

Definition at line 108 of file node.c.

#define RMSCONFIGURESERVER   1

Definition at line 104 of file node.c.

#define RMSCOPY   8

Definition at line 111 of file node.c.

#define RMSCREATENODE   2

Definition at line 105 of file node.c.

#define RMSDELETENODE   4

Definition at line 107 of file node.c.

#define RMSEXECUTENODE   3

Definition at line 106 of file node.c.

#define RMSQUERYSERVER   0

Definition at line 103 of file node.c.

#define RMSREADMEMORY   6

Definition at line 109 of file node.c.

#define RMSWRITEMEMORY   7

Definition at line 110 of file node.c.

#define STACKSEGLABEL   "L1DSRAM_HEAP" /* Label for DSP Stack Segment Addr */

Definition at line 118 of file node.c.

Enumeration Type Documentation

Enumerator:
NOTCONNECTED 
NODECONNECT 
HOSTCONNECT 
DEVICECONNECT 

Definition at line 167 of file node.c.

Function Documentation

void get_node_info ( struct node_object hnode,
struct dsp_nodeinfo node_info 
)

Definition at line 2680 of file node.c.

DBAPI node_alloc_msg_buf ( struct node_object hnode,
u32  usize,
struct dsp_bufferattr pattr,
u8 **  pbuffer 
)

Definition at line 684 of file node.c.

int node_allocate ( struct proc_object hprocessor,
const struct dsp_uuid node_uuid,
const struct dsp_cbdata pargs,
const struct dsp_nodeattrin attr_in,
struct node_res_object **  noderes,
struct process_context pr_ctxt 
)

Definition at line 286 of file node.c.

int node_change_priority ( struct node_object hnode,
s32  prio 
)

Definition at line 765 of file node.c.

int node_connect ( struct node_object node1,
u32  stream1,
struct node_object node2,
u32  stream2,
struct dsp_strmattr pattrs,
struct dsp_cbdata conn_param 
)

Definition at line 823 of file node.c.

int node_create ( struct node_object hnode)

Definition at line 1106 of file node.c.

int node_create_mgr ( struct node_mgr **  node_man,
struct dev_object hdev_obj 
)

Definition at line 1264 of file node.c.

int node_delete ( struct node_res_object noderes,
struct process_context pr_ctxt 
)

Definition at line 1367 of file node.c.

int node_delete_mgr ( struct node_mgr hnode_mgr)

Definition at line 1528 of file node.c.

int node_enum_nodes ( struct node_mgr hnode_mgr,
void **  node_tab,
u32  node_tab_size,
u32 pu_num_nodes,
u32 pu_allocated 
)

Definition at line 1543 of file node.c.

int node_free_msg_buf ( struct node_object hnode,
u8 pbuffer,
struct dsp_bufferattr pattr 
)

Definition at line 1579 of file node.c.

int node_get_attr ( struct node_object hnode,
struct dsp_nodeattr pattr,
u32  attr_size 
)

Definition at line 1616 of file node.c.

int node_get_channel_id ( struct node_object hnode,
u32  dir,
u32  index,
u32 chan_id 
)

Definition at line 1656 of file node.c.

enum nldr_loadtype node_get_load_type ( struct node_object hnode)

Definition at line 1802 of file node.c.

int node_get_message ( struct node_object hnode,
struct dsp_msg message,
u32  utimeout 
)

Definition at line 1694 of file node.c.

int node_get_nldr_obj ( struct node_mgr hnode_mgr,
struct nldr_object **  nldr_ovlyobj 
)

Definition at line 1767 of file node.c.

enum node_state node_get_state ( void hnode)

Definition at line 273 of file node.c.

int node_get_strm_mgr ( struct node_object hnode,
struct strm_mgr **  strm_man 
)

Definition at line 1786 of file node.c.

u32 node_get_timeout ( struct node_object hnode)

Definition at line 1817 of file node.c.

enum node_type node_get_type ( struct node_object hnode)

Definition at line 1832 of file node.c.

int node_get_uuid_props ( void hprocessor,
const struct dsp_uuid node_uuid,
struct dsp_ndbprops node_props 
)

Definition at line 2819 of file node.c.

void node_on_exit ( struct node_object hnode,
s32  node_status 
)

Definition at line 1852 of file node.c.

int node_pause ( struct node_object hnode)

Definition at line 1878 of file node.c.

int node_put_message ( struct node_object hnode,
const struct dsp_msg pmsg,
u32  utimeout 
)

Definition at line 1958 of file node.c.

int node_register_notify ( struct node_object hnode,
u32  event_mask,
u32  notify_type,
struct dsp_notification hnotification 
)

Definition at line 2053 of file node.c.

int node_run ( struct node_object hnode)

Definition at line 2104 of file node.c.

int node_terminate ( struct node_object hnode,
int pstatus 
)

Definition at line 2221 of file node.c.