diff options
author | Noe Rubinstein <nrubinstein@proformatique.com> | 2010-12-16 14:27:36 +0100 |
---|---|---|
committer | Noe Rubinstein <nrubinstein@proformatique.com> | 2010-12-16 14:27:36 +0100 |
commit | 544191cd245ae3e4df07f257f89114233a0bae9e (patch) | |
tree | 987739e8905ef100c34cae3587dbc45336cb36cb /xivovp | |
parent | d211c83eed1dbf83e004a842ce3aa8bf1766b310 (diff) |
disables audio in xivo_vp
#ifdef AUDIO
#endif
Diffstat (limited to 'xivovp')
-rw-r--r-- | xivovp/base.c | 21 |
1 files changed, 20 insertions, 1 deletions
diff --git a/xivovp/base.c b/xivovp/base.c index 39abd43..7095e21 100644 --- a/xivovp/base.c +++ b/xivovp/base.c @@ -9,7 +9,9 @@ #include <tdm/xivo_tdm_api.h> +#ifdef AUDIO #define XIVO_VE890_TDM_PORT 1 +#endif #include "vp_api.h" #include "EVB_Le71HR8921G_rev_E_2M048.h" @@ -47,11 +49,12 @@ MODULE_PARM_DESC(traces_vanish, enum xivovp_line_type { FXS_LINE = 0, FXO_LINE = 1 }; - #define FXS_TIMESLOT (1) #define FXO_TIMESLOT (3) +#ifdef AUDIO #define TS_MASK ((1u << FXS_TIMESLOT) | (1u << FXO_TIMESLOT)) +#endif struct xivovp_line { @@ -81,9 +84,12 @@ static struct xivovp { Vp890DeviceObjectType ve890_dev_obj; VpDevCtxType dev_ctx; +#ifdef AUDIO struct xivo_tdm_port *tdm_port; +#endif } xivovp; +#ifdef AUDIO static void xivovp_receive_and_transmit(void *data) { (void) data; @@ -102,6 +108,7 @@ static void xivovp_receive_and_transmit(void *data) xivo_tdm_transmit(xivovp.tdm_port, FXO_TIMESLOT, xivovp.chans[FXO_LINE]->writechunk); } +#endif /* Shouldn't there be something better there? TOTHINK */ static struct xivovp_line* xivovp_line_from_ctx(VpLineCtxType* line_ctx) @@ -548,7 +555,9 @@ span_init(void) static int xivovp_init(void) { +#ifdef AUDIO int rc; +#endif init_timer(&xivovp.vp_tick_timer); xivovp.vp_tick_timer.function = vp_tick; @@ -557,6 +566,7 @@ xivovp_init(void) xivovp.line[FXS_LINE].type = FXS_LINE; xivovp.line[FXO_LINE].type = FXO_LINE; +#ifdef AUDIO xivovp.tdm_port = xivo_tdm_get_port(XIVO_VE890_TDM_PORT); if (!xivovp.tdm_port) { printk(KERN_ERR "%s: could not get Ve890 TDM port\n", __func__); @@ -571,6 +581,7 @@ xivovp_init(void) xivovp.tdm_port = NULL; return rc; } +#endif return 0; } @@ -578,10 +589,12 @@ xivovp_init(void) static void xivovp_cleanup(void) { +#ifdef AUDIO if (xivovp.tdm_port) { xivo_tdm_put_port(xivovp.tdm_port); xivovp.tdm_port = NULL; } +#endif } static int @@ -654,9 +667,11 @@ vp_init(void) return rc; } +#ifdef AUDIO /* process context */ static void xivovp_port0_started_cb(void *data); +#endif static int test_evb_ve890_init(void) @@ -685,11 +700,13 @@ test_evb_ve890_init(void) goto err_dahdi_init; } +#ifdef AUDIO /* UGLY EVIL HACK */ xivo_tdm_register_port0_started( xivovp.tdm_port, xivovp_port0_started_cb, NULL); +#endif mod_timer(&xivovp.vp_tick_timer, jiffies + VP_TICK_JIFFIES); @@ -705,6 +722,7 @@ test_evb_ve890_init(void) return rc; } +#ifdef AUDIO /* process context */ static void xivovp_port0_started_cb(void *data) @@ -719,6 +737,7 @@ xivovp_port0_started_cb(void *data) /* XXX */ (void) xivo_tdm_start_chans( xivovp.tdm_port, TS_MASK, &tick_cb); } +#endif static void test_evb_ve890_exit(void) |