1 /*
2  * dspchnl.h
3  *
4  * DSP-BIOS Bridge driver support functions for TI OMAP processors.
5  *
6  * Declares the upper edge channel class library functions required by
7  * all Bridge driver / DSP API driver interface tables. These functions are
8  * implemented by every class of Bridge channel library.
9  *
10  * Notes:
11  *   The function comment headers reside in dspdefs.h.
12  *
13  * Copyright (C) 2005-2006 Texas Instruments, Inc.
14  *
15  * This package is free software; you can redistribute it and/or modify
16  * it under the terms of the GNU General Public License version 2 as
17  * published by the Free Software Foundation.
18  *
19  * THIS PACKAGE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR
20  * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
21  * WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
22  */
23 
24 #ifndef DSPCHNL_
25 #define DSPCHNL_
26 
27 extern int bridge_chnl_create(struct chnl_mgr **channel_mgr,
28 				     struct dev_object *hdev_obj,
29 				     const struct chnl_mgrattrs
30 				     *mgr_attrts);
31 
32 extern int bridge_chnl_destroy(struct chnl_mgr *hchnl_mgr);
33 
34 extern int bridge_chnl_open(struct chnl_object **chnl,
35 				   struct chnl_mgr *hchnl_mgr,
36 				   s8 chnl_mode,
37 				   u32 ch_id,
38 				   const struct chnl_attr
39 				   *pattrs);
40 
41 extern int bridge_chnl_close(struct chnl_object *chnl_obj);
42 
43 extern int bridge_chnl_add_io_req(struct chnl_object *chnl_obj,
44 				      void *host_buf,
45 				      u32 byte_size, u32 buf_size,
46 				      u32 dw_dsp_addr, u32 dw_arg);
47 
48 extern int bridge_chnl_get_ioc(struct chnl_object *chnl_obj,
49 				   u32 timeout, struct chnl_ioc *chan_ioc);
50 
51 extern int bridge_chnl_cancel_io(struct chnl_object *chnl_obj);
52 
53 extern int bridge_chnl_flush_io(struct chnl_object *chnl_obj,
54 				    u32 timeout);
55 
56 extern int bridge_chnl_get_info(struct chnl_object *chnl_obj,
57 				    struct chnl_info *channel_info);
58 
59 extern int bridge_chnl_get_mgr_info(struct chnl_mgr *hchnl_mgr,
60 					u32 ch_id, struct chnl_mgrinfo
61 					*mgr_info);
62 
63 extern int bridge_chnl_idle(struct chnl_object *chnl_obj,
64 				   u32 timeout, bool flush_data);
65 
66 extern int bridge_chnl_register_notify(struct chnl_object *chnl_obj,
67 					   u32 event_mask,
68 					   u32 notify_type,
69 					   struct dsp_notification
70 					   *hnotification);
71 
72 #endif /* DSPCHNL_ */
73