[svn-commits] rmeyerriecks: linux/trunk r9100 - /linux/trunk/drivers/dahdi/wctdm24xxp/base.c
SVN commits to the Digium repositories
svn-commits at lists.digium.com
Fri Aug 6 15:10:36 CDT 2010
Author: rmeyerriecks
Date: Fri Aug 6 15:10:25 2010
New Revision: 9100
URL: http://svnview.digium.com/svn/dahdi?view=rev&rev=9100
Log:
wctdm24xp: Replaced alawoverride with companding
Added the module parameter "companding" to eventually replace
the current alawoverride parameter. Added some deprecated messages
so current users will know to move over before we remove it entirely.
dahdi-673
Modified:
linux/trunk/drivers/dahdi/wctdm24xxp/base.c
Modified: linux/trunk/drivers/dahdi/wctdm24xxp/base.c
URL: http://svnview.digium.com/svn/dahdi/linux/trunk/drivers/dahdi/wctdm24xxp/base.c?view=diff&rev=9100&r1=9099&r2=9100
==============================================================================
--- linux/trunk/drivers/dahdi/wctdm24xxp/base.c (original)
+++ linux/trunk/drivers/dahdi/wctdm24xxp/base.c Fri Aug 6 15:10:25 2010
@@ -231,6 +231,7 @@
static char *opermode = "FCC";
static int fxshonormode = 0;
static int alawoverride = 0;
+static char *companding = "ulaw";
static int fxotxgain = 0;
static int fxorxgain = 0;
static int fxstxgain = 0;
@@ -2637,7 +2638,7 @@
wait_just_a_bit(HZ/10);
/* Enable PCM, ulaw */
- if (alawoverride) {
+ if (!strcasecmp(companding, "alaw")) {
wctdm_setreg(wc, card, 33, 0x20);
} else {
wctdm_setreg(wc, card, 33, 0x28);
@@ -2871,7 +2872,7 @@
}
#endif
- if (alawoverride)
+ if (!strcasecmp(companding, "alaw"))
wctdm_setreg(wc, card, 1, 0x20);
else
wctdm_setreg(wc, card, 1, 0x28);
@@ -3801,7 +3802,7 @@
s->span.manufacturer = "Digium";
strncpy(s->span.devicetype, wc->desc->name, sizeof(s->span.devicetype) - 1);
- if (alawoverride) {
+ if (!strcasecmp(companding, "alaw")) {
s->span.deflaw = DAHDI_LAW_ALAW;
if (first) {
dev_info(&wc->vb.pdev->dev, "ALAW override parameter detected. Device will be operating in ALAW\n");
@@ -3811,7 +3812,8 @@
/* BRIs are in A-law */
s->span.deflaw = DAHDI_LAW_ALAW;
} else {
- /* Analog mods are ulaw unless alawoverride is used */
+ /* Analog mods are ulaw unless modparam
+ companding="alaw" is used */
s->span.deflaw = DAHDI_LAW_MULAW;
}
@@ -3950,7 +3952,7 @@
/* Setup convergence rate */
reg = wctdm_vpm_in(wc,x,0x20);
reg &= 0xE0;
- if (alawoverride) {
+ if (!strcasecmp(companding, "alaw")) {
if (!x)
dev_info(&wc->vb.pdev->dev, "VPM: A-law mode\n");
reg |= 0x01;
@@ -4889,7 +4891,6 @@
return ret;
}
-
create_sysfs_files(wc);
voicebus_lock_latency(&wc->vb);
@@ -4900,6 +4901,13 @@
wc->mods_per_board = NUM_MODULES;
wc->pos = i;
wc->txident = 1;
+
+ if (alawoverride) {
+ companding = "alaw";
+ dev_info(&wc->vb.pdev->dev, "The module parameter alawoverride"\
+ " has been deprecated. Please use the "\
+ "parameter companding=alaw instead");
+ }
for (i = 0; i < NUM_MODULES; i++) {
wc->flags[i] = wc->desc->flags;
@@ -5254,7 +5262,6 @@
module_param(battdebounce, uint, 0600);
module_param(battalarm, uint, 0600);
module_param(battthresh, uint, 0600);
-module_param(alawoverride, int, 0400);
module_param(nativebridge, int, 0600);
module_param(fxotxgain, int, 0600);
module_param(fxorxgain, int, 0600);
@@ -5297,6 +5304,14 @@
module_param(forceload, int, 0600);
MODULE_PARM_DESC(forceload, "Set to 1 in order to force an FPGA reload after power on (currently only for HA8/HB8 cards).");
+module_param(alawoverride, int, 0400);
+MODULE_PARM_DESC(alawoverride, "This option has been deprecated. Please use"\
+ "the parameter \"companding\" instead");
+
+module_param(companding, charp, 0400);
+MODULE_PARM_DESC(companding, "Change the companding to \"alaw\" or \"ulaw\""\
+ "(ulaw by default)");
+
MODULE_DESCRIPTION("VoiceBus Driver for Wildcard Analog and Hybrid Cards");
MODULE_AUTHOR("Digium Incorporated <support at digium.com>");
MODULE_ALIAS("wctdm8xxp");
More information about the svn-commits
mailing list