summaryrefslogtreecommitdiff
path: root/wcfxo.c
diff options
context:
space:
mode:
authormarkster <markster@5390a7c7-147a-4af0-8ec9-7488f05a26cb>2004-01-31 22:25:10 +0000
committermarkster <markster@5390a7c7-147a-4af0-8ec9-7488f05a26cb>2004-01-31 22:25:10 +0000
commitc65716fcb2bd551b135a75471282c218faed1b29 (patch)
treee91202fab09ac509d7747b10f9886b6b17a9fedb /wcfxo.c
parentf78e1e5d455e68b70edf21743a36e01dc9b1027b (diff)
Minor FXO adjustments for gain adjustments
git-svn-id: http://svn.digium.com/svn/zaptel/trunk@304 5390a7c7-147a-4af0-8ec9-7488f05a26cb
Diffstat (limited to 'wcfxo.c')
-rwxr-xr-xwcfxo.c17
1 files changed, 15 insertions, 2 deletions
diff --git a/wcfxo.c b/wcfxo.c
index 4e3fd79..4956a51 100755
--- a/wcfxo.c
+++ b/wcfxo.c
@@ -172,6 +172,9 @@ static struct wcfxo_desc wcx100p = { "Wildcard X100P",
static struct wcfxo_desc wcx101p = { "Wildcard X101P",
FLAG_USE_XTAL | FLAG_DOUBLE_CLOCK };
+static struct wcfxo_desc generic = { "Generic Clone",
+ FLAG_USE_XTAL | FLAG_DOUBLE_CLOCK };
+
static struct wcfxo *ifaces[WC_MAX_IFACES];
static void wcfxo_release(struct wcfxo *wc);
@@ -182,6 +185,8 @@ static int monitor = 0;
static int quiet = 0;
+static int boost = 0;
+
static int opermode = 0;
static struct fxo_mode {
@@ -766,6 +771,7 @@ static int wcfxo_init_daa(struct wcfxo *wc)
{
/* This must not be called in an interrupt */
/* We let things settle for a bit */
+ unsigned char reg15;
// set_current_state(TASK_INTERRUPTIBLE);
// schedule_timeout(10);
@@ -802,12 +808,17 @@ static int wcfxo_init_daa(struct wcfxo *wc)
/* Wait a couple of jiffies for our writes to finish */
set_current_state(TASK_INTERRUPTIBLE);
schedule_timeout(1 + (ZT_CHUNKSIZE * HZ) / 800);
-
+ reg15 = 0x0;
/* Go ahead and attenuate transmit signal by 6 db */
if (quiet) {
printk("wcfxo: Attenuating transmit signal for quiet operation\n");
- wcfxo_setreg(wc, 0xf, 0x10);
+ reg15 |= (quiet & 0x3) << 4;
+ }
+ if (boost) {
+ printk("wcfxo: Boosting receive signal\n");
+ reg15 |= (boost & 0x3);
}
+ wcfxo_setreg(wc, 0xf, reg15);
/* Didn't get it right. Register 9 is still garbage */
if (wc->readregs[0x9] != 0x89)
return -1;
@@ -963,6 +974,7 @@ static void __devexit wcfxo_remove_one(struct pci_dev *pdev)
static struct pci_device_id wcfxo_pci_tbl[] __devinitdata = {
{ 0xe159, 0x0001, 0x8085, PCI_ANY_ID, 0, 0, (unsigned long) &wcx101p },
+ { 0xe159, 0x0001, 0x8086, PCI_ANY_ID, 0, 0, (unsigned long) &generic },
{ 0x1057, 0x5608, PCI_ANY_ID, PCI_ANY_ID, 0, 0, (unsigned long) &wcx100p },
};
@@ -998,6 +1010,7 @@ static void __exit wcfxo_cleanup(void)
MODULE_PARM(debug, "i");
MODULE_PARM(quiet, "i");
+MODULE_PARM(boost, "i");
MODULE_PARM(monitor, "i");
MODULE_PARM(opermode, "i");
MODULE_DESCRIPTION("Wildcard X100P Zaptel Driver");