[svn-commits] tzafrir: branch linux/2.6 r10576 - /linux/branches/2.6/drivers/dahdi/xpp/

SVN commits to the Digium repositories svn-commits at lists.digium.com
Wed Mar 21 15:35:35 CDT 2012


Author: tzafrir
Date: Wed Mar 21 15:35:33 2012
New Revision: 10576

URL: http://svnview.digium.com/svn/dahdi?view=rev&rev=10576
Log:
xpp: FXS: added a 'lower_ringing_noise' parameter

* Adds a new parameter, 'lower_ringing_noise', to module xpd_fxs.

* Makes the "power-down" behaviour that was added
  in upstream svn r10478, switchable in runtime.

* By default (false), makes the vbat_h behave like it did
  before the power-down change.
  - I.e: vbat_h is held throughout the ringing period (during
    both ring-up/ring-down)
  - So this patch revert part of r10478

* When switched to true, activate the "power-down" behaviour.
  - I.e: vbat_h follows the ring-up/ring-down.
  - This behaviour lowers the noise caused by group ringing of
    FXS channels in the same unit, but causes problems with CallerID.

Signed-off-by: Oron Peled <oron.peled at xorcom.com>
Acked-by: Tzafrir Cohen <tzafrir.cohen at xorcom.com>

Origin: http://svnview.digium.com/svn/dahdi?view=rev&rev=10574

Modified:
    linux/branches/2.6/drivers/dahdi/xpp/card_fxs.c

Modified: linux/branches/2.6/drivers/dahdi/xpp/card_fxs.c
URL: http://svnview.digium.com/svn/dahdi/linux/branches/2.6/drivers/dahdi/xpp/card_fxs.c?view=diff&rev=10576&r1=10575&r2=10576
==============================================================================
--- linux/branches/2.6/drivers/dahdi/xpp/card_fxs.c (original)
+++ linux/branches/2.6/drivers/dahdi/xpp/card_fxs.c Wed Mar 21 15:35:33 2012
@@ -42,6 +42,8 @@
 
 static DEF_PARM_BOOL(vmwi_ioctl, 1, 0644, "Asterisk support VMWI notification via ioctl");
 static DEF_PARM_BOOL(ring_trapez, 0, 0664, "Use trapezoid ring type");
+static DEF_PARM_BOOL(lower_ringing_noise, 0, 0664,
+		"Lower ringing noise (may loose CallerID)");
 
 /* Signaling is opposite (fxo signalling for fxs card) */
 #if 1
@@ -184,14 +186,21 @@
 
 static int linefeed_control(xbus_t *xbus, xpd_t *xpd, lineno_t chan, enum fxs_state value)
 {
-	struct FXS_priv_data	*priv;
-	bool want_vbat_h = (value == FXS_LINE_RING) ? 1 : 0;
-
-	priv = xpd->priv;
+	struct FXS_priv_data *priv;
+	bool want_vbat_h;
+
+	priv = xpd->priv;
+	/*
+	 * Should we drop vbat_h only during actuall ring?
+	 *   - It would lower the noise caused to other channels by
+	 *     group ringing
+	 *   - But it may also stop CallerID from passing through the SLIC
+	 */
+	want_vbat_h = value == FXS_LINE_RING;
+	if (lower_ringing_noise || want_vbat_h)
+		do_chan_power(xbus, xpd, chan, want_vbat_h);
 	LINE_DBG(SIGNAL, xpd, chan, "value=0x%02X\n", value);
 	priv->lasttxhook[chan] = value;
-	if (IS_SET(priv->vbat_h, chan) != want_vbat_h)
-		do_chan_power(xbus, xpd, chan, want_vbat_h);
 	return SLIC_DIRECT_REQUEST(xbus, xpd, chan, SLIC_WRITE, 0x40, value);
 }
 
@@ -672,6 +681,7 @@
 	msgs = PHONEDEV(xpd).msg_waiting[pos];
 	LINE_DBG(SIGNAL, xpd, pos, "%s\n", (msgs) ? "ON" : "OFF");
 	set_vm_led_mode(xbus, xpd, pos, msgs);
+	do_chan_power(xbus, xpd, pos, msgs > 0);
 	linefeed_control(xbus, xpd, pos, (msgs > 0) ?
 			FXS_LINE_RING : priv->idletxhookstate[pos]);
 }
@@ -708,6 +718,7 @@
 	LINE_DBG(SIGNAL, xpd, chan, "%s\n", (on)?"on":"off");
 	priv = xpd->priv;
 	set_vm_led_mode(xbus, xpd, chan, 0);
+	do_chan_power(xbus, xpd, chan, on);	/* Power up (for ring) */
 	ret = linefeed_control(xbus, xpd, chan, value);
 	if(on) {
 		MARK_BLINK(priv, chan, LED_GREEN, LED_BLINK_RING);




More information about the svn-commits mailing list