aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorAndreas Eversberg <andreas@eversberg.eu>2008-08-03 04:36:53 -0400
committerKarsten Keil <kkeil@suse.de>2009-01-09 16:44:23 -0500
commit190f71d9d8516fea4db01ba86ddfad5738a92703 (patch)
treec43aa64bc1708125263c5a4e8d3dffb3a651baf6 /drivers
parent8dd2f36f317569665e454268a2677cfba3e848f1 (diff)
mISDN: Add some debug option for clock problems
Add a new debug bit for clock problems. Signed-off-by: Andreas Eversberg <andreas@eversberg.eu> Signed-off-by: Karsten Keil <kkeil@suse.de>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/isdn/mISDN/dsp.h1
-rw-r--r--drivers/isdn/mISDN/dsp_cmx.c16
2 files changed, 10 insertions, 7 deletions
diff --git a/drivers/isdn/mISDN/dsp.h b/drivers/isdn/mISDN/dsp.h
index ded948069335..98a33c58f091 100644
--- a/drivers/isdn/mISDN/dsp.h
+++ b/drivers/isdn/mISDN/dsp.h
@@ -15,6 +15,7 @@
15#define DEBUG_DSP_TONE 0x0020 15#define DEBUG_DSP_TONE 0x0020
16#define DEBUG_DSP_BLOWFISH 0x0040 16#define DEBUG_DSP_BLOWFISH 0x0040
17#define DEBUG_DSP_DELAY 0x0100 17#define DEBUG_DSP_DELAY 0x0100
18#define DEBUG_DSP_CLOCK 0x0200
18#define DEBUG_DSP_DTMFCOEFF 0x8000 /* heavy output */ 19#define DEBUG_DSP_DTMFCOEFF 0x8000 /* heavy output */
19 20
20/* options may be: 21/* options may be:
diff --git a/drivers/isdn/mISDN/dsp_cmx.c b/drivers/isdn/mISDN/dsp_cmx.c
index fc8ea41ae6a2..93fb819c5203 100644
--- a/drivers/isdn/mISDN/dsp_cmx.c
+++ b/drivers/isdn/mISDN/dsp_cmx.c
@@ -1192,7 +1192,7 @@ dsp_cmx_receive(struct dsp *dsp, struct sk_buff *skb)
1192 * we set our new read pointer, and write silence to buffer 1192 * we set our new read pointer, and write silence to buffer
1193 */ 1193 */
1194 if (((dsp->rx_W-dsp->rx_R) & CMX_BUFF_MASK) >= CMX_BUFF_HALF) { 1194 if (((dsp->rx_W-dsp->rx_R) & CMX_BUFF_MASK) >= CMX_BUFF_HALF) {
1195 if (dsp_debug & DEBUG_DSP_CMX) 1195 if (dsp_debug & DEBUG_DSP_CLOCK)
1196 printk(KERN_DEBUG 1196 printk(KERN_DEBUG
1197 "cmx_receive(dsp=%lx): UNDERRUN (or overrun the " 1197 "cmx_receive(dsp=%lx): UNDERRUN (or overrun the "
1198 "maximum delay), adjusting read pointer! " 1198 "maximum delay), adjusting read pointer! "
@@ -1218,7 +1218,7 @@ dsp_cmx_receive(struct dsp *dsp, struct sk_buff *skb)
1218 if (dsp->cmx_delay) 1218 if (dsp->cmx_delay)
1219 if (((dsp->rx_W - dsp->rx_R) & CMX_BUFF_MASK) >= 1219 if (((dsp->rx_W - dsp->rx_R) & CMX_BUFF_MASK) >=
1220 (dsp->cmx_delay << 1)) { 1220 (dsp->cmx_delay << 1)) {
1221 if (dsp_debug & DEBUG_DSP_CMX) 1221 if (dsp_debug & DEBUG_DSP_CLOCK)
1222 printk(KERN_DEBUG 1222 printk(KERN_DEBUG
1223 "cmx_receive(dsp=%lx): OVERRUN (because " 1223 "cmx_receive(dsp=%lx): OVERRUN (because "
1224 "twice the delay is reached), adjusting " 1224 "twice the delay is reached), adjusting "
@@ -1374,8 +1374,9 @@ dsp_cmx_send_member(struct dsp *dsp, int len, s32 *c, int members)
1374 r = (r+1) & CMX_BUFF_MASK; 1374 r = (r+1) & CMX_BUFF_MASK;
1375 } 1375 }
1376 if (r != rr) { 1376 if (r != rr) {
1377 printk(KERN_DEBUG "%s: buffer empty\n", 1377 if (dsp_debug & DEBUG_DSP_CLOCK)
1378 __func__); 1378 printk(KERN_DEBUG "%s: RX empty\n",
1379 __func__);
1379 memset(d, dsp_silence, (rr-r)&CMX_BUFF_MASK); 1380 memset(d, dsp_silence, (rr-r)&CMX_BUFF_MASK);
1380 } 1381 }
1381 /* -> if echo is enabled */ 1382 /* -> if echo is enabled */
@@ -1724,7 +1725,7 @@ dsp_cmx_send(void *arg)
1724 * the delay is greater dsp_poll 1725 * the delay is greater dsp_poll
1725 */ 1726 */
1726 if (delay > dsp_poll && !dsp->cmx_delay) { 1727 if (delay > dsp_poll && !dsp->cmx_delay) {
1727 if (dsp_debug & DEBUG_DSP_CMX) 1728 if (dsp_debug & DEBUG_DSP_CLOCK)
1728 printk(KERN_DEBUG 1729 printk(KERN_DEBUG
1729 "%s lowest rx_delay of %d bytes for" 1730 "%s lowest rx_delay of %d bytes for"
1730 " dsp %s are now removed.\n", 1731 " dsp %s are now removed.\n",
@@ -1755,7 +1756,7 @@ dsp_cmx_send(void *arg)
1755 * have enabled tx_dejitter 1756 * have enabled tx_dejitter
1756 */ 1757 */
1757 if (delay > dsp_poll && dsp->tx_dejitter) { 1758 if (delay > dsp_poll && dsp->tx_dejitter) {
1758 if (dsp_debug & DEBUG_DSP_CMX) 1759 if (dsp_debug & DEBUG_DSP_CLOCK)
1759 printk(KERN_DEBUG 1760 printk(KERN_DEBUG
1760 "%s lowest tx_delay of %d bytes for" 1761 "%s lowest tx_delay of %d bytes for"
1761 " dsp %s are now removed.\n", 1762 " dsp %s are now removed.\n",
@@ -1821,7 +1822,8 @@ dsp_cmx_transmit(struct dsp *dsp, struct sk_buff *skb)
1821 if (space < skb->len) { 1822 if (space < skb->len) {
1822 /* write to the space we have left */ 1823 /* write to the space we have left */
1823 ww = (ww - 1) & CMX_BUFF_MASK; /* end one byte prior tx_R */ 1824 ww = (ww - 1) & CMX_BUFF_MASK; /* end one byte prior tx_R */
1824 printk(KERN_DEBUG "%s: buffer overflow\n", __func__); 1825 if (dsp_debug & DEBUG_DSP_CLOCK)
1826 printk(KERN_DEBUG "%s: TX overflow\n", __func__);
1825 } else 1827 } else
1826 /* write until all byte are copied */ 1828 /* write until all byte are copied */
1827 ww = (w + skb->len) & CMX_BUFF_MASK; 1829 ww = (w + skb->len) & CMX_BUFF_MASK;