[Freeswitch-dev] skypopen.ko compile failed for 2.6.36.4
Hi Giovanni, Seems you do not support yet 2.6.36 kernel? Could you please have a look, maybe it needs a trivial change to compile under 2.6.36 ? root@lab3:/usr/src/freeswitch/src/mod/endpoints/mod_skypopen/oss# make make -C /lib/modules/2.6.36.4/build M=/usr/src/freeswitch/src/mod/endpoints/mod_skypopen/oss LDDINC=/usr/src/freeswitch/src/mod/endpoints/mod_skypopen/oss/../include modules make[1]: Entering directory `/usr/src/linux-headers-2.6.36.4' CC [M] /usr/src/freeswitch/src/mod/endpoints/mod_skypopen/oss/main.o /usr/src/freeswitch/src/mod/endpoints/mod_skypopen/oss/main.c:315: error: unknown field ‘ioctl’ specified in initializer /usr/src/freeswitch/src/mod/endpoints/mod_skypopen/oss/main.c:315: warning: initialization from incompatible pointer type make[2]: *** [/usr/src/freeswitch/src/mod/endpoints/mod_skypopen/oss/main.o] Error 1 make[1]: *** [_module_/usr/src/freeswitch/src/mod/endpoints/mod_skypopen/oss] Error 2 make[1]: Leaving directory `/usr/src/linux-headers-2.6.36.4' make: *** [modules] Error 2 Sincerely, Anton.
IOCTL system in new kernels changed, it's described here http://lwn.net/Articles/119652/ so we change line 315 of main.c of skypopen: Old code .ioctl = skypopen_ioctl new code .compat_ioctl = skypopen_ioctl Than it compiles and loads into the kernel. I'm just going to test if it actually works. sorry for not providing patch, lasy...
Actually new IOCTL should avoid BKL, but it's written that conpat_ioctl should nto use BKL too, if it is not so - the code should be changed to use unlocked_ioct instead to avoid BKL 2011/5/7 Anton VG <anton.vazir@gmail.com>:
IOCTL system in new kernels changed, it's described here
http://lwn.net/Articles/119652/
so we change line 315 of main.c of skypopen:
Old code .ioctl = skypopen_ioctl
new code .compat_ioctl = skypopen_ioctl
Than it compiles and loads into the kernel. I'm just going to test if it actually works.
sorry for not providing patch, lasy...
It works, but somehow strange. FS demo talks sssslllloooowwww, like timing issue..., (do not happen if I call from SIP phone in parallel), and also was OK with previous skypopen version for ALSA. Would be nice if someone could test it too. 2011/5/7 Anton VG <anton.vazir@gmail.com>:
Actually new IOCTL should avoid BKL, but it's written that conpat_ioctl should nto use BKL too, if it is not so - the code should be changed to use unlocked_ioct instead to avoid BKL
2011/5/7 Anton VG <anton.vazir@gmail.com>:
IOCTL system in new kernels changed, it's described here
http://lwn.net/Articles/119652/
so we change line 315 of main.c of skypopen:
Old code .ioctl = skypopen_ioctl
new code .compat_ioctl = skypopen_ioctl
Than it compiles and loads into the kernel. I'm just going to test if it actually works.
sorry for not providing patch, lasy...
Giovanni, Ok, I divided the hrtimer by 2 (main.c, line 95), as shown below, and now it's sounds almost normal, maybe just a slightly faster. in whole fs-demo, skype gone forward for a 1 second. hrtimer_forward(&dev->timer_inq, now, ktime_set(0, SKYPOPEN_SLEEP * 1000000/2)); btw, unlocked_ioctl works too.
Hi Anton, I would not like to add support for kernels that are not adopted by the major distro FS is used on. Adding that support would mean (for me) to compile, install, and use those newer kernels, and maintain the driver under them (and subsequents) and this is a burden I cannot afford. If you are in the mood, please make a patch, test it very deeply, then make it available somewhere (with a minimal of documentation, if needed) and I happily add to the mod_skypopen wikipage a link to it making it clear that's under your responsibility. -giovanni -- Sincerely, Giovanni Maruzzelli Cell : +39-347-2665618
;) Understandable. Those who needs to run that under new kernel will find this mail thread sufficient to fix it. Though, it have a little use, since my test showed that there is some problem with timing, and sound becomes itchy - right now I have no time to look for solution, maybe it's because of getting rid of BKL, maybe not. Personally I've chosen to stick with the ALSA version with patched dummy.c for the time being, that gives no trouble with newer kernels. 2011/5/8 Giovanni Maruzzelli <gmaruzz@gmail.com>:
Hi Anton,
I would not like to add support for kernels that are not adopted by the major distro FS is used on.
Adding that support would mean (for me) to compile, install, and use those newer kernels, and maintain the driver under them (and subsequents) and this is a burden I cannot afford.
If you are in the mood, please make a patch, test it very deeply, then make it available somewhere (with a minimal of documentation, if needed) and I happily add to the mod_skypopen wikipage a link to it making it clear that's under your responsibility.
-giovanni
-- Sincerely,
Giovanni Maruzzelli Cell : +39-347-2665618
participants (2)
-
Anton VG
-
Giovanni Maruzzelli