summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorShaun Ruffell <sruffell@digium.com>2009-05-15 21:40:15 +0000
committerShaun Ruffell <sruffell@digium.com>2009-05-15 21:40:15 +0000
commit790c433699404a8a00d92fb9a50ee22925e4fc3a (patch)
treed081a55f575636c54fa2faa8c39974bea1a88ef8
parent310bac31d7f749181d6ae50edf3a51be6453940f (diff)
voicebus: Make the enable/disable echocan messages debug again.
I accidentally changed to print everytime. They should only be printed if DEBUG_ECHOCAN is specified in the debug module parameter. git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@6625 a0bf4364-ded3-4de4-8d8a-66a801d63aff
-rw-r--r--drivers/dahdi/voicebus/GpakCust.c13
1 files changed, 9 insertions, 4 deletions
diff --git a/drivers/dahdi/voicebus/GpakCust.c b/drivers/dahdi/voicebus/GpakCust.c
index 72319c8..33ac2b0 100644
--- a/drivers/dahdi/voicebus/GpakCust.c
+++ b/drivers/dahdi/voicebus/GpakCust.c
@@ -225,9 +225,12 @@ static int vpmadt032_enable_ec(struct vpmadt032 *vpm, int channel)
} else {
control = EnableMuLawSwCompanding;
}
- printk(KERN_DEBUG "Enabling ecan on channel: %d (%s)\n", channel,
- ((control == EnableMuLawSwCompanding) ?
- "MuLaw" : "ALaw"));
+ if (vpm->options.debug | DEBUG_ECHOCAN) {
+ const char *law;
+ law = (control == EnableMuLawSwCompanding) ? "MuLaw" : "ALaw";
+ printk(KERN_DEBUG "Enabling ecan on channel: %d (%s)\n",
+ channel, law);
+ }
res = gpakAlgControl(vpm->dspid, channel, control, &pstatus);
if (res) {
printk(KERN_WARNING "Unable to set SW Companding on " \
@@ -242,7 +245,9 @@ static int vpmadt032_disable_ec(struct vpmadt032 *vpm, int channel)
int res;
GPAK_AlgControlStat_t pstatus;
- printk(KERN_DEBUG "Disabling ecan on channel: %d\n", channel);
+ if (vpm->options.debug | DEBUG_ECHOCAN)
+ printk(KERN_DEBUG "Disabling ecan on channel: %d\n", channel);
+
res = gpakAlgControl(vpm->dspid, channel, BypassSwCompanding, &pstatus);
if (res) {
printk(KERN_WARNING "Unable to disable sw companding on " \