Web lists-archives.org

[Spca50x-devs] [PATCH] Experimental _modular_ version of gspcav1




Hi ppl ;)

Attached patch make from gspcav1-20060925 (01.00.04) modular version of this driver with full identical functionality.
All previous  versions of spca5xx/gspca AFAIK  has a monolithic architecture. If you are used only one web-cam, driver was
contain many dead code and data (two huge static arrays in spca561 Huffman decoder as example) for other unused web-cams.
It was dark side of 220 supported devices ;)  For example size of last (01.00.04) version gspca in memory ~600Kb
For modern desktop computers it is not so significant (for example it is ~1% memory of my notebook ;)), but it may be sense
for embedded devices. I just split gspca code on some modules.

Brief gspcav1-modular architecture:
-  gscpa_core.ko: (gspca_core.c, decoders/decoders.c)
  Content all common functions, video device control functions, partly content decoders and etc.
  static __devinitdata struct usb_device_id device_table[] splited on few separated tables (bridge specific)  
  and it tables moved to  bridge specific (sub)modules.
  
  USB device tables,  registration/deregistration of USB devices, bridge specific initialization/controls data/code and part of decoders 
  moved to 9 (same as dir structure) independent bridge specific submodules.
  - vimicro.ko:  for ZC3XX bridge 
  - transvision.ko:  for TV8532 bridge
  - sunplusjpeg.ko: for SPCA533,SPCA536,SPCA504,SPCA504B,SPCA504C,SPCA500 bridges
  - sunplus.ko: for SPCA501, SPCA505,SPCA506,SPCA508,SPCA561 bridges
  - sonix.ko: for SONIX, SN9CXX bridges
  - pixart.ko: for PAC207 bridge
  - marssemi.ko: for MR97311 bridge
  - etoms.ko: for ET61xx51 bridge
  - conexant.ko: for CX11646 bridge

For work need gspca_core module (~100Kb) and one (or more if you have some cams) of 9 bridge specific submodules.

I was successfully play with Creative Live! Cam Notebook Pro (ZC3XX bridge) and Labtec Webcam Plus (SPCA561 bridge)
Both works separate and  together  ;) 

Test&Enjoy ;)

PS: Ignore huge WARNING: "gspca_xxx" [xxxxx.ko] undefined!  please 
       I have no time to correct it ;) All should work.

  -- 
Regards,
Serge A. Suchkov
--
Just because everything is different doesn't mean anything has
changed.
		-- Irene Peter

Attachment: gspcav1-modular.diff.bz2
Description: BZip2 compressed data

-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys -- and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Spca50x-devs mailing list
Spca50x-devs@xxxxxxxxxxxxxxxxxxxxx
https://lists.sourceforge.net/lists/listinfo/spca50x-devs