diff options
author | Matthew Fredrickson <creslin@digium.com> | 2009-10-02 16:31:58 +0000 |
---|---|---|
committer | Matthew Fredrickson <creslin@digium.com> | 2009-10-02 16:31:58 +0000 |
commit | cacbb9c00e47f03865ea7577b483a6e5d04b3c68 (patch) | |
tree | 74df9558f4d5f54c6a03a8d0630d1355f2e0bf83 /drivers/dahdi/wcte12xp | |
parent | d9cbcbf06e08045b234cd933b2db124b5367ed8e (diff) |
Implement API update to do per-channel companding selection for VPMADT032
git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@7309 a0bf4364-ded3-4de4-8d8a-66a801d63aff
Diffstat (limited to 'drivers/dahdi/wcte12xp')
-rw-r--r-- | drivers/dahdi/wcte12xp/base.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/drivers/dahdi/wcte12xp/base.c b/drivers/dahdi/wcte12xp/base.c index 8e031fe..dfd37cc 100644 --- a/drivers/dahdi/wcte12xp/base.c +++ b/drivers/dahdi/wcte12xp/base.c @@ -258,7 +258,7 @@ inline void cmd_decipher_vpmadt032(struct t1 *wc, unsigned char *readchunk) } } -static int config_vpmadt032(struct vpmadt032 *vpm) +static int config_vpmadt032(struct vpmadt032 *vpm, struct t1 *wc) { int res, channel; GpakPortConfig_t portconfig = {0}; @@ -352,6 +352,7 @@ static int config_vpmadt032(struct vpmadt032 *vpm) vpm->curecstate[channel].nlp_type = vpm->options.vpmnlptype; vpm->curecstate[channel].nlp_threshold = vpm->options.vpmnlpthresh; vpm->curecstate[channel].nlp_max_suppress = vpm->options.vpmnlpmaxsupp; + vpm->curecstate[channel].companding = (wc->spantype == TYPE_T1) ? ADT_COMP_ULAW : ADT_COMP_ALAW; memcpy(&vpm->desiredecstate[channel], &vpm->curecstate[channel], sizeof(vpm->curecstate[channel])); vpm->setchanconfig_from_state(vpm, channel, &chanconfig); @@ -1364,6 +1365,7 @@ static int t1_hardware_post_init(struct t1 *wc) options.vpmnlptype = vpmnlptype; options.vpmnlpthresh = vpmnlpthresh; options.vpmnlpmaxsupp = vpmnlpmaxsupp; + options.channels = (wc->spantype == TYPE_T1) ? 24 : 32; wc->vpmadt032 = vpmadt032_alloc(&options, wc->name); if (!wc->vpmadt032) @@ -1371,7 +1373,6 @@ static int t1_hardware_post_init(struct t1 *wc) wc->vpmadt032->context = wc; wc->vpmadt032->setchanconfig_from_state = setchanconfig_from_state; - wc->vpmadt032->span = &wc->span; res = vpmadt032_init(wc->vpmadt032, wc->vb); if (res) { @@ -1380,7 +1381,7 @@ static int t1_hardware_post_init(struct t1 *wc) return -EIO; } - config_vpmadt032(wc->vpmadt032); + config_vpmadt032(wc->vpmadt032, wc); set_span_devicetype(wc); module_printk("VPM present and operational (Firmware version %x)\n", wc->vpmadt032->version); |