[dahdi-commits] tzafrir: linux/trunk r10372 - /linux/trunk/drivers/dahdi/xpp/card_fxs.c
SVN commits to the DAHDI project
dahdi-commits at lists.digium.com
Wed Dec 7 13:22:08 CST 2011
Author: tzafrir
Date: Wed Dec 7 13:22:04 2011
New Revision: 10372
URL: http://svnview.digium.com/svn/dahdi?view=rev&rev=10372
Log:
xpp: FXS: mwi and search_fsk fixes
* We must not block PCM during from 'search_fsk_pattern' channels.
* We must vmwi_search() not only on FXS_LINE_POL_ACTIVE, but also during
'neon_blinking' -- so we notice the message to turn it off.
* Also added 'search_fsk_pattern' and neon_blinking to /proc/.../fxs_info
Signed-off-by: Oron Peled <oron.peled at xorcom.com>
Acked-by: : Tzafrir Cohen <tzafrir.cohen at xorcom.com>
Modified:
linux/trunk/drivers/dahdi/xpp/card_fxs.c
Modified: linux/trunk/drivers/dahdi/xpp/card_fxs.c
URL: http://svnview.digium.com/svn/dahdi/linux/trunk/drivers/dahdi/xpp/card_fxs.c?view=diff&rev=10372&r1=10371&r2=10372
==============================================================================
--- linux/trunk/drivers/dahdi/xpp/card_fxs.c (original)
+++ linux/trunk/drivers/dahdi/xpp/card_fxs.c Wed Dec 7 13:22:04 2011
@@ -134,6 +134,7 @@
xpp_line_t want_dtmf_events; /* what dahdi want */
xpp_line_t want_dtmf_mute; /* what dahdi want */
xpp_line_t prev_key_down; /* DTMF down sets the bit */
+ xpp_line_t neon_blinking;
struct timeval prev_key_time[CHANNELS_PERXPD];
int led_counter[NUM_LEDS][CHANNELS_PERXPD];
int ohttimer[CHANNELS_PERXPD];
@@ -564,12 +565,16 @@
*/
static void __do_mute_dtmf(xpd_t *xpd, int pos, bool muteit)
{
+ struct FXS_priv_data *priv;
+
+ priv = xpd->priv;
LINE_DBG(SIGNAL, xpd, pos, "%s\n", (muteit) ? "MUTE" : "UNMUTE");
if(muteit)
BIT_SET(PHONEDEV(xpd).mute_dtmf, pos);
else
BIT_CLR(PHONEDEV(xpd).mute_dtmf, pos);
- CALL_PHONE_METHOD(card_pcm_recompute, xpd, 0); /* already spinlocked */
+ /* already spinlocked */
+ CALL_PHONE_METHOD(card_pcm_recompute, xpd, priv->search_fsk_pattern);
}
static int set_vm_led_mode(xbus_t *xbus, xpd_t *xpd, int pos,
@@ -584,6 +589,7 @@
if (VMWI_NEON(priv, pos) && msg_waiting) {
/* A write to register 0x40 will now turn on/off the VM led */
LINE_DBG(SIGNAL, xpd, pos, "NEON\n");
+ BIT_SET(priv->neon_blinking, pos);
ret += SLIC_INDIRECT_REQUEST(xbus, xpd, pos, SLIC_WRITE, 0x16, 0xE8, 0x03);
ret += SLIC_INDIRECT_REQUEST(xbus, xpd, pos, SLIC_WRITE, 0x15, 0xEF, 0x7B);
ret += SLIC_INDIRECT_REQUEST(xbus, xpd, pos, SLIC_WRITE, 0x14, 0x9F, 0x00);
@@ -618,6 +624,7 @@
} else {
/* A write to register 0x40 will now turn on/off the ringer */
LINE_DBG(SIGNAL, xpd, pos, "RINGER\n");
+ BIT_CLR(priv->neon_blinking, pos);
ret += SLIC_INDIRECT_REQUEST(xbus, xpd, pos, SLIC_WRITE, 0x16, 0x00, 0x00);
ret += SLIC_INDIRECT_REQUEST(xbus, xpd, pos, SLIC_WRITE, 0x15, 0x77, 0x01);
@@ -877,7 +884,8 @@
if (IS_SET(PHONEDEV(xpd).digital_inputs | PHONEDEV(xpd).digital_outputs, pos))
return 0; /* Nothing to do */
oht_pcm(xpd, pos, 1); /* Get ready of VMWI FSK tones */
- if(priv->lasttxhook[pos] == FXS_LINE_POL_ACTIVE) {
+ if (priv->lasttxhook[pos] == FXS_LINE_POL_ACTIVE ||
+ IS_SET(priv->neon_blinking, pos)) {
priv->ohttimer[pos] = val;
priv->idletxhookstate[pos] = FXS_LINE_POL_OHTRANS;
vmwi_search(xpd, pos, 1);
@@ -1060,7 +1068,8 @@
priv = xpd->priv;
BUG_ON(!priv);
for_each_line(xpd, i) {
- if (priv->lasttxhook[i] == FXS_LINE_RING) {
+ if (priv->lasttxhook[i] == FXS_LINE_RING &&
+ !IS_SET(priv->neon_blinking, i)) {
/* RINGing, prepare for OHT */
priv->ohttimer[i] = OHT_TIMER;
priv->idletxhookstate[i] = FXS_LINE_POL_OHTRANS;
@@ -1514,11 +1523,13 @@
spin_lock_irqsave(&xpd->lock, flags);
priv = xpd->priv;
BUG_ON(!priv);
- len += sprintf(page + len, "%-8s %-10s %-10s %-10s\n",
+ len += sprintf(page + len, "%-8s %-10s %-10s %-10s %-10s %-10s\n",
"Channel",
"idletxhookstate",
"lasttxhook",
- "ohttimer"
+ "ohttimer",
+ "neon_blinking",
+ "search_fsk_pattern"
);
for_each_line(xpd, i) {
char pref;
@@ -1529,12 +1540,14 @@
pref = 'I';
else
pref = ' ';
- len += sprintf(page + len, "%c%7d %10d %10d %10d\n",
+ len += sprintf(page + len, "%c%7d %10d %10d %10d %10d %10d\n",
pref,
i,
priv->idletxhookstate[i],
priv->lasttxhook[i],
- priv->ohttimer[i]
+ priv->ohttimer[i],
+ IS_SET(priv->neon_blinking, i),
+ IS_SET(priv->search_fsk_pattern, i)
);
}
len += sprintf(page + len, "\n");
More information about the dahdi-commits
mailing list