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 | edad00b3c06d0f574f6d607cebfb3e96a9832979 (patch) | |
tree | 74df9558f4d5f54c6a03a8d0630d1355f2e0bf83 /drivers/dahdi/voicebus | |
parent | 2baba3425563c7293163d711e481516ae2b59246 (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/voicebus')
-rw-r--r-- | drivers/dahdi/voicebus/GpakCust.c | 13 | ||||
-rw-r--r-- | drivers/dahdi/voicebus/GpakCust.h | 1 |
2 files changed, 5 insertions, 9 deletions
diff --git a/drivers/dahdi/voicebus/GpakCust.c b/drivers/dahdi/voicebus/GpakCust.c index ca85e5d..0f113e6 100644 --- a/drivers/dahdi/voicebus/GpakCust.c +++ b/drivers/dahdi/voicebus/GpakCust.c @@ -218,13 +218,10 @@ static int vpmadt032_enable_ec(struct vpmadt032 *vpm, int channel) GPAK_AlgControlStat_t pstatus; GpakAlgCtrl_t control; - if (vpm->span) { - control = (DAHDI_LAW_ALAW == vpm->span->deflaw) ? - EnableALawSwCompanding : - EnableMuLawSwCompanding; - } else { - control = EnableMuLawSwCompanding; - } + control = (ADT_COMP_ALAW == vpm->desiredecstate[channel].companding) ? + EnableALawSwCompanding : + EnableMuLawSwCompanding; + if (vpm->options.debug & DEBUG_ECHOCAN) { const char *law; law = (control == EnableMuLawSwCompanding) ? "MuLaw" : "ALaw"; @@ -282,7 +279,7 @@ static void vpmadt032_bh(struct work_struct *data) * looking for ones where the desired state does not match the current * state. */ - for (channel = 0; channel < vpm->span->channels; channel++) { + for (channel = 0; channel < vpm->options.channels; channel++) { GPAK_AlgControlStat_t pstatus; int res = 1; curstate = &vpm->curecstate[channel]; diff --git a/drivers/dahdi/voicebus/GpakCust.h b/drivers/dahdi/voicebus/GpakCust.h index 0546bfb..9c84df7 100644 --- a/drivers/dahdi/voicebus/GpakCust.h +++ b/drivers/dahdi/voicebus/GpakCust.h @@ -108,7 +108,6 @@ struct GpakChannelConfig; #define MAX_CHANNELS_PER_SPAN 32 struct vpmadt032 { void *context; - const struct dahdi_span *span; struct work_struct work; struct workqueue_struct *wq; int dspid; |