diff options
Diffstat (limited to 'tdm/xivo_tdm_api.h')
-rw-r--r-- | tdm/xivo_tdm_api.h | 45 |
1 files changed, 45 insertions, 0 deletions
diff --git a/tdm/xivo_tdm_api.h b/tdm/xivo_tdm_api.h new file mode 100644 index 0000000..ce0d448 --- /dev/null +++ b/tdm/xivo_tdm_api.h @@ -0,0 +1,45 @@ +#ifndef XIVO_TDM_API_H +#define XIVO_TDM_API_H + +/* XXX matches with ICP_HSSDRV_PORT_XHFC_MEGREZ_PROTO_XIVO_CONFIG */ +#define XHFC_MEGREZ_PROTO_XIVO_CONFIG 4 + +struct xivo_tdm_port; + +/* TDM port allocation + * Returns a xivo_tdm_port pointer if available, else NULL. */ +/* hardirq: no -- softirq: no -- user: yes */ +struct xivo_tdm_port *xivo_tdm_get_port(int tdm_port_num); + +/* TDM port release */ +/* hardirq: no -- softirq: no -- user: yes */ +void xivo_tdm_put_port(struct xivo_tdm_port *); + +/* TDM port config + startup */ +/* hardirq: no -- softirq: no -- user: yes */ +int xivo_tdm_config_port( + struct xivo_tdm_port* xtp, + unsigned int port_config); + +/* hardirq: no -- softirq: no -- user: yes */ +int xivo_tdm_start_chans( + struct xivo_tdm_port* xtp, + u32 chans); + +/* hardirq: yes -- softirq: yes -- user: yes */ +void xivo_tdm_receive( + struct xivo_tdm_port* xtp, + const unsigned int cnum, + u8 samples[8]); + +/* hardirq: yes -- softirq: yes -- user: yes */ +void xivo_tdm_transmit( + struct xivo_tdm_port* xtp, + const unsigned int cnum, + const u8 samples[8]); + +/* hardirq: yes -- softirq: yes -- user: yes */ +void xivo_tdm_tick( + struct xivo_tdm_port* xtp); + +#endif /* XIVO_TDM_API_H */ |