1 diff -Naur mISDN.git.org/drivers/isdn/hardware/mISDN/dsp_cmx.c mISDN.git/drivers/isdn/hardware/mISDN/dsp_cmx.c
2 --- mISDN.git.org/drivers/isdn/hardware/mISDN/dsp_cmx.c 2009-01-22 14:26:03.000000000 +0100
3 +++ mISDN.git/drivers/isdn/hardware/mISDN/dsp_cmx.c 2009-04-04 19:06:14.000000000 +0200
5 * also add delay if requested by PH_SIGNAL
8 -#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 27)
9 - if (dsp->features.unclocked) {
11 if (dsp->features.has_jitter) {
13 dsp->rx_R = (hh->dinfo & CMX_BUFF_MASK);
14 dsp->rx_W = (dsp->rx_R+dsp->cmx_delay) & CMX_BUFF_MASK;
16 @@ -1151,11 +1147,7 @@
19 /* if frame contains time code, write directly */
20 -#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 27)
21 - if (dsp->features.unclocked) {
23 if (dsp->features.has_jitter) {
25 dsp->rx_W = (hh->dinfo & CMX_BUFF_MASK);
27 printk(KERN_DEBUG "%s %08x\n", dsp->inst.name, hh->dinfo);
28 diff -Naur mISDN.git.org/drivers/isdn/hardware/mISDN/dsp.h mISDN.git/drivers/isdn/hardware/mISDN/dsp.h
29 --- mISDN.git.org/drivers/isdn/hardware/mISDN/dsp.h 2009-01-22 14:26:03.000000000 +0100
30 +++ mISDN.git/drivers/isdn/hardware/mISDN/dsp.h 2009-04-04 19:04:43.000000000 +0200
35 -#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 27)
37 int hfc_id; // unique id to identify the chip (or -1)
38 int hfc_dtmf; // set if HFCmulti card supports dtmf
40 int pcm_banks; // number of IO banks of pcm bus
41 int has_jitter; // data is jittered and unsorted
46 struct list_head list;
47 diff -Naur mISDN.git.org/drivers/isdn/hardware/mISDN/dsp_hwec.c mISDN.git/drivers/isdn/hardware/mISDN/dsp_hwec.c
48 --- mISDN.git.org/drivers/isdn/hardware/mISDN/dsp_hwec.c 2009-01-22 14:26:03.000000000 +0100
49 +++ mISDN.git/drivers/isdn/hardware/mISDN/dsp_hwec.c 2009-04-04 19:07:16.000000000 +0200
51 #include <linux/mISDNif.h>
55 -#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 27)
56 -static struct mISDN_dsp_element_arg args[] = {
57 - { "deftaps", "128", "Set the number of taps of cancellation." },
60 -static struct mISDN_dsp_element dsp_hwec_p = {
66 - .num_args = sizeof(args) / sizeof(struct mISDN_dsp_element_arg),
69 -struct mISDN_dsp_element *dsp_hwec = &dsp_hwec_p;
72 static mISDN_dsp_element_arg_t args[] = {
73 { "deftaps", "128", "Set the number of taps of cancellation." },
78 mISDN_dsp_element_t *dsp_hwec = &dsp_hwec_p;
81 void dsp_hwec_enable (dsp_t *dsp, const char *arg)
83 diff -Naur mISDN.git.org/drivers/isdn/hardware/mISDN/dsp_kb1ec.c mISDN.git/drivers/isdn/hardware/mISDN/dsp_kb1ec.c
84 --- mISDN.git.org/drivers/isdn/hardware/mISDN/dsp_kb1ec.c 2009-01-22 14:26:03.000000000 +0100
85 +++ mISDN.git/drivers/isdn/hardware/mISDN/dsp_kb1ec.c 2009-04-04 19:07:35.000000000 +0200
87 dsp_cancel_rx(p, data, len);
90 -#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 27)
91 -static struct mISDN_dsp_element_arg args[] = {
92 - { "deftaps", "128", "Set the number of taps of cancellation." },
93 - { "training", "0", "Enable echotraining (0: disabled, 1: enabled)." },
96 -static struct mISDN_dsp_element dsp_kb1ec = {
100 - .process_tx = process_tx,
101 - .process_rx = process_rx,
102 - .num_args = sizeof(args) / sizeof(struct mISDN_dsp_element_arg),
106 static mISDN_dsp_element_arg_t args[] = {
107 { "deftaps", "128", "Set the number of taps of cancellation." },
108 { "training", "0", "Enable echotraining (0: disabled, 1: enabled)." },
110 .num_args = sizeof(args) / sizeof(mISDN_dsp_element_arg_t),
116 static int __init dsp_kb1ec_init (void)
117 diff -Naur mISDN.git.org/drivers/isdn/hardware/mISDN/dsp_mec2.c mISDN.git/drivers/isdn/hardware/mISDN/dsp_mec2.c
118 --- mISDN.git.org/drivers/isdn/hardware/mISDN/dsp_mec2.c 2009-01-22 14:26:03.000000000 +0100
119 +++ mISDN.git/drivers/isdn/hardware/mISDN/dsp_mec2.c 2009-04-04 19:08:03.000000000 +0200
121 dsp_cancel_rx(p, data, len);
124 -#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 27)
125 -static struct mISDN_dsp_element_arg args[] = {
126 - { "deftaps", "128", "Set the number of taps of cancellation." },
127 - { "training", "0", "Enable echotraining (0: disabled, 1: enabled)." },
130 -static struct mISDN_dsp_element dsp_mec2 = {
134 - .process_tx = process_tx,
135 - .process_rx = process_rx,
136 - .num_args = sizeof(args) / sizeof(struct mISDN_dsp_element_arg),
140 static mISDN_dsp_element_arg_t args[] = {
141 { "deftaps", "128", "Set the number of taps of cancellation." },
142 { "training", "0", "Enable echotraining (0: disabled, 1: enabled)." },
144 .num_args = sizeof(args) / sizeof(mISDN_dsp_element_arg_t),
150 static int __init dsp_mec2_init (void)
151 diff -Naur mISDN.git.org/drivers/isdn/hardware/mISDN/dsp_mg2ec.c mISDN.git/drivers/isdn/hardware/mISDN/dsp_mg2ec.c
152 --- mISDN.git.org/drivers/isdn/hardware/mISDN/dsp_mg2ec.c 2009-01-22 14:26:03.000000000 +0100
153 +++ mISDN.git/drivers/isdn/hardware/mISDN/dsp_mg2ec.c 2009-04-04 19:08:27.000000000 +0200
155 dsp_cancel_rx(p, data, len);
158 -#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 27)
159 -static struct mISDN_dsp_element_arg args[] = {
160 - { "deftaps", "128", "Set the number of taps of cancellation." },
161 - { "training", "0", "Enable echotraining (0: disabled, 1: enabled)." },
164 -static struct mISDN_dsp_element dsp_mg2ec = {
168 - .process_tx = process_tx,
169 - .process_rx = process_rx,
170 - .num_args = sizeof(args) / sizeof(struct mISDN_dsp_element_arg),
174 static mISDN_dsp_element_arg_t args[] = {
175 { "deftaps", "128", "Set the number of taps of cancellation." },
176 { "training", "0", "Enable echotraining (0: disabled, 1: enabled)." },
178 .num_args = sizeof(args) / sizeof(mISDN_dsp_element_arg_t),
184 static int __init dsp_mg2ec_init (void)
185 diff -Naur mISDN.git.org/drivers/isdn/hardware/mISDN/dsp_octwareec.c mISDN.git/drivers/isdn/hardware/mISDN/dsp_octwareec.c
186 --- mISDN.git.org/drivers/isdn/hardware/mISDN/dsp_octwareec.c 2009-01-22 14:26:03.000000000 +0100
187 +++ mISDN.git/drivers/isdn/hardware/mISDN/dsp_octwareec.c 2009-04-04 19:09:07.000000000 +0200
189 dsp_cancel_rx(p, data, len);
192 -#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 27)
193 -static struct mISDN_dsp_element_arg args[] = {
194 - { "deftaps", "128", "Set the number of taps of cancellation." },
195 - { "training", "0", "Enable echotraining (0: disabled, 1: enabled)." },
198 -static struct mISDN_dsp_element dsp_octwareec = {
199 - .name = "octwareec",
202 - .process_tx = process_tx,
203 - .process_rx = process_rx,
204 - .num_args = sizeof(args) / sizeof(struct mISDN_dsp_element_arg),
208 static mISDN_dsp_element_arg_t args[] = {
209 { "deftaps", "128", "Set the number of taps of cancellation." },
210 { "training", "0", "Enable echotraining (0: disabled, 1: enabled)." },
212 .num_args = sizeof(args) / sizeof(mISDN_dsp_element_arg_t),
218 static int __init dsp_octwareec_init (void)
219 diff -Naur mISDN.git.org/drivers/isdn/hardware/mISDN/dsp_oslec.c mISDN.git/drivers/isdn/hardware/mISDN/dsp_oslec.c
220 --- mISDN.git.org/drivers/isdn/hardware/mISDN/dsp_oslec.c 2009-01-22 14:26:03.000000000 +0100
221 +++ mISDN.git/drivers/isdn/hardware/mISDN/dsp_oslec.c 2009-04-04 19:09:34.000000000 +0200
223 dsp_cancel_rx(p, data, len);
226 -#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 27)
227 -static struct mISDN_dsp_element_arg args[] = {
228 - { "deftaps", "128", "Set the number of taps of cancellation." },
229 - { "training", "0", "Enable echotraining (0: disabled, 1: enabled)." },
232 -static struct mISDN_dsp_element dsp_oslec = {
236 - .process_tx = process_tx,
237 - .process_rx = process_rx,
238 - .num_args = sizeof(args) / sizeof(struct mISDN_dsp_element_arg),
242 static mISDN_dsp_element_arg_t args[] = {
243 { "deftaps", "128", "Set the number of taps of cancellation." },
244 { "training", "0", "Enable echotraining (0: disabled, 1: enabled)." },
246 .num_args = sizeof(args) / sizeof(mISDN_dsp_element_arg_t),
252 static int __init dsp_oslec_init (void)
253 diff -Naur mISDN.git.org/drivers/isdn/hardware/mISDN/dsp_pipeline.c mISDN.git/drivers/isdn/hardware/mISDN/dsp_pipeline.c
254 --- mISDN.git.org/drivers/isdn/hardware/mISDN/dsp_pipeline.c 2009-01-22 14:26:03.000000000 +0100
255 +++ mISDN.git/drivers/isdn/hardware/mISDN/dsp_pipeline.c 2009-04-04 19:13:05.000000000 +0200
257 /* uncomment for debugging */
258 /*#define PIPELINE_DEBUG*/
260 -#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 27)
261 -extern struct mISDN_dsp_element *dsp_hwec;
263 extern mISDN_dsp_element_t *dsp_hwec;
266 extern void dsp_hwec_enable (dsp_t *dsp, const char *arg);
267 extern void dsp_hwec_disable (dsp_t *dsp);
269 extern void dsp_hwec_exit (void);
271 typedef struct _dsp_pipeline_entry {
272 -#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 27)
273 - struct mISDN_dsp_element *elem;
275 mISDN_dsp_element_t *elem;
278 struct list_head list;
279 } dsp_pipeline_entry_t;
281 typedef struct _dsp_element_entry {
282 -#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 27)
283 - struct mISDN_dsp_element *elem;
286 -#elif LINUX_VERSION_CODE == KERNEL_VERSION(2, 6, 26)
287 +#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 26)
288 mISDN_dsp_element_t *elem;
295 -#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 27)
296 -static ssize_t attr_show_args (struct device *dev, struct device_attribute *attr, char *buf) {
297 - struct mISDN_dsp_element *elem = dev_get_drvdata(dev);
299 -#elif LINUX_VERSION_CODE == KERNEL_VERSION(2, 6, 26)
300 +#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 26)
301 static ssize_t attr_show_args (struct device *dev, struct device_attribute *attr, char *buf) {
302 mISDN_dsp_element_t *elem = dev_get_drvdata(dev);
308 -#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 27)
309 -static struct device_attribute element_attributes[] = {
310 - __ATTR(args, 0444, attr_show_args, NULL),
313 -int mISDN_dsp_element_register (struct mISDN_dsp_element *elem) {
315 -#elif LINUX_VERSION_CODE == KERNEL_VERSION(2, 6, 26)
316 +#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 26)
317 static struct device_attribute element_attributes[] = {
318 __ATTR(args, 0444, attr_show_args, NULL),
324 -#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 27)
325 -void mISDN_dsp_element_unregister (struct mISDN_dsp_element *elem) {
328 void mISDN_dsp_element_unregister (mISDN_dsp_element_t *elem) {
330 dsp_element_entry_t *entry, *n;
334 char *dup, *tok, *name, *args;
335 dsp_element_entry_t *entry, *n;
336 dsp_pipeline_entry_t *pipeline_entry;
337 -#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 27)
338 - struct mISDN_dsp_element *elem;
340 mISDN_dsp_element_t *elem;
342 u_long elements_flags, pipeline_flags;