diff options
author | Andreas Eversberg <andreas@eversberg.eu> | 2008-09-28 07:01:01 -0400 |
---|---|---|
committer | Karsten Keil <kkeil@suse.de> | 2009-01-09 16:44:28 -0500 |
commit | 87c5fa1bb42624254a2013cbbc3b170d6017f5d6 (patch) | |
tree | 49772208b9e511d233e6b715b44fb4062fe1760f /drivers/isdn/mISDN | |
parent | 1b36c78f26bfa74c1782be98acb827afa95c3b0c (diff) |
mISDN: Add different different timer settings for hfc-pci
- Poll-timer can now be set from 8 to 256 samples, depending on your kernel.
- If default or 128 is used, the normal controller's clock is used as before.
Usage: modprobe hfcpci poll=XXX
- Added some debug code for dsp buffer size. (CMX_DELAY_DEBUG)
Signed-off-by: Andreas Eversberg <andreas@eversberg.eu>
Signed-off-by: Karsten Keil <kkeil@suse.de>
Diffstat (limited to 'drivers/isdn/mISDN')
-rw-r--r-- | drivers/isdn/mISDN/dsp_cmx.c | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/drivers/isdn/mISDN/dsp_cmx.c b/drivers/isdn/mISDN/dsp_cmx.c index efe4c7430e6d..02f643456b16 100644 --- a/drivers/isdn/mISDN/dsp_cmx.c +++ b/drivers/isdn/mISDN/dsp_cmx.c | |||
@@ -137,6 +137,7 @@ | |||
137 | /* #define CMX_CONF_DEBUG */ | 137 | /* #define CMX_CONF_DEBUG */ |
138 | 138 | ||
139 | /*#define CMX_DEBUG * massive read/write pointer output */ | 139 | /*#define CMX_DEBUG * massive read/write pointer output */ |
140 | /*#define CMX_DELAY_DEBUG * gives rx-buffer delay overview */ | ||
140 | /*#define CMX_TX_DEBUG * massive read/write on tx-buffer with content */ | 141 | /*#define CMX_TX_DEBUG * massive read/write on tx-buffer with content */ |
141 | 142 | ||
142 | static inline int | 143 | static inline int |
@@ -1135,6 +1136,25 @@ dsp_cmx_conf(struct dsp *dsp, u32 conf_id) | |||
1135 | return 0; | 1136 | return 0; |
1136 | } | 1137 | } |
1137 | 1138 | ||
1139 | #ifdef CMX_DELAY_DEBUG | ||
1140 | int delaycount; | ||
1141 | static void | ||
1142 | showdelay(struct dsp *dsp, int samples, int delay) | ||
1143 | { | ||
1144 | char bar[] = "--------------------------------------------------|"; | ||
1145 | int sdelay; | ||
1146 | |||
1147 | delaycount += samples; | ||
1148 | if (delaycount < 8000) | ||
1149 | return; | ||
1150 | delaycount = 0; | ||
1151 | |||
1152 | sdelay = delay * 50 / (dsp_poll << 2); | ||
1153 | |||
1154 | printk(KERN_DEBUG "DELAY (%s) %3d >%s\n", dsp->name, delay, | ||
1155 | sdelay > 50 ? "..." : bar + 50 - sdelay); | ||
1156 | } | ||
1157 | #endif | ||
1138 | 1158 | ||
1139 | /* | 1159 | /* |
1140 | * audio data is received from card | 1160 | * audio data is received from card |
@@ -1256,6 +1276,9 @@ dsp_cmx_receive(struct dsp *dsp, struct sk_buff *skb) | |||
1256 | 1276 | ||
1257 | /* increase write-pointer */ | 1277 | /* increase write-pointer */ |
1258 | dsp->rx_W = ((dsp->rx_W+len) & CMX_BUFF_MASK); | 1278 | dsp->rx_W = ((dsp->rx_W+len) & CMX_BUFF_MASK); |
1279 | #ifdef CMX_DELAY_DEBUG | ||
1280 | showdelay(dsp, len, (dsp->rx_W-dsp->rx_R) & CMX_BUFF_MASK); | ||
1281 | #endif | ||
1259 | } | 1282 | } |
1260 | 1283 | ||
1261 | 1284 | ||