From edad00b3c06d0f574f6d607cebfb3e96a9832979 Mon Sep 17 00:00:00 2001 From: Matthew Fredrickson Date: Fri, 2 Oct 2009 16:31:58 +0000 Subject: 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 --- drivers/dahdi/voicebus/GpakCust.c | 13 +++++-------- drivers/dahdi/voicebus/GpakCust.h | 1 - 2 files changed, 5 insertions(+), 9 deletions(-) (limited to 'drivers/dahdi/voicebus') 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; -- cgit v1.2.3