diff options
author | Noe Rubinstein <nrubinstein@proformatique.com> | 2010-12-24 15:41:18 +0100 |
---|---|---|
committer | Noe Rubinstein <nrubinstein@proformatique.com> | 2010-12-24 15:41:18 +0100 |
commit | 85fd3be00b20552f8c8785f93e4dd25fe4669be6 (patch) | |
tree | 8b92d4fb6d37b2f31733cf0fccd1902e2d19ed4b /tdm/xivo_tdm_api.h | |
parent | d3abe0006137f4c626e1ad27fe3eb76f9eacdcf8 (diff) |
update TDM driver with xilun's changes
Diffstat (limited to 'tdm/xivo_tdm_api.h')
-rw-r--r-- | tdm/xivo_tdm_api.h | 44 |
1 files changed, 15 insertions, 29 deletions
diff --git a/tdm/xivo_tdm_api.h b/tdm/xivo_tdm_api.h index 9191653..e9f5206 100644 --- a/tdm/xivo_tdm_api.h +++ b/tdm/xivo_tdm_api.h @@ -7,15 +7,10 @@ /* XXX matches with ICP_HSSDRV_PORT_LE89316_MEGREZ_PROTO_XIVO_CONFIG */ #define LE89316_MEGREZ_PROTO_XIVO_CONFIG (5) -/* fixed for now: */ +/* fixed: */ #define XIVO_TDM_TS_NUM (32) - -/* for audio propagation, xivo_tdm_cb will be called every ms (hopefully...) */ -struct xivo_tdm_tick_cb_struct { - void (*tick)(void *data); - void *tick_data; -}; +#define XIVO_TDM_VOICE_CHUNK_SZ (8) struct xivo_tdm_port; @@ -36,6 +31,12 @@ int xivo_tdm_config_port( struct xivo_tdm_port* xtp, unsigned int port_config); +/* will be called back after port 0 has been configured */ +void xivo_tdm_register_port0_configured( + struct xivo_tdm_port* xtp, + void (*port0_configured)(void *), + void *port0_configured_data); + /* hardirq: no -- softirq: no -- user: yes */ void xivo_tdm_register_port0_started( struct xivo_tdm_port* xtp, @@ -45,31 +46,16 @@ void xivo_tdm_register_port0_started( /* hardirq: no -- softirq: no -- user: yes */ int xivo_tdm_start_chans( struct xivo_tdm_port* xtp, - u32 chans, - struct xivo_tdm_tick_cb_struct *cb_struct); // optional, can be null + u8 ** const readchunk_ptrs[XIVO_TDM_TS_NUM], + u8 ** const writechunk_ptrs[XIVO_TDM_TS_NUM], + void (*txrx)(void *), + void *txrx_data); +/* hardirq: no -- softirq: no -- user: yes */ void xivo_tdm_stop_chans( struct xivo_tdm_port* xtp); - -/* If cb_struct is NULL, the user has to regularly call - * xivo_tdm_receive(), xivo_tdm_transmit() and xivo_tdm_tick() - */ - -/* 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); +/* hardirq: no -- softirq: no -- user: yes */ +void xivo_tdm_shutdown(void); #endif /* XIVO_TDM_API_H */ |