Menu

#24 Cumulative patch for rev 104, version 02

open
Driver (16)
5
2015-02-05
2012-02-21
No

Hello everybody,

This is another tiny contribution but it might help : I have applied/carried over a few patches from cr1st1, against truck last revision (104), then used svn diff to make this patch, hence can be applied simply by less technical users (who can't read C code).

* Added flip controls, improved default values handling
From cr1st1, "stk11xx.h, stk11xx-usb.c, stk11xx-v4l.c"
http://sourceforge.net/tracker/index.php?func=detail&aid=3201636&group_id=178178&atid=884193

* Restricted new "install" (since rev. 102), so it does NOT also build
(this should be discouraged as root)
From xaho, "Makefile.standalone"

* Small logging & metadatas improvements
From xaho, "stk11xx.h, stk11xx-usb.c"

Works great here daily under Fedora 16 stable, up to the latest stable kernel to date ()
Using Kopete, VLC, guvcview, Skype and Google video plugin for Firefox.

I will add my updated Fedora 16 Howto to this thread

TODO

I realize there were other contributions posted out there, but had no time to look at and test them so far.
So the following (and probably more) are *NOT* included in the present patch:

* Improved suspend code and freed memory
From cr1st1, "stk11xx-usb.c, stk11xx-v4l.c" @@@@ suspend.patch
http://sourceforge.net/tracker/?func=detail&aid=3201289&group_id=178178&atid=884193

* fixes S_FMT and TRY_SMT ioctl - fixing library segfaults
From cr1st1, "stk11xx-v4l.c" @@@@ stk11xx-v4l.c.patch
http://sourceforge.net/tracker/?func=detail&aid=3200819&group_id=178178&atid=884193

* Check against Peter Stuge's git
http://sourceforge.net/mailarchive/forum.php?thread_name=1302886506-3206-9-git-send-email-peter%40stuge.se&forum_name=syntekdriver-devel

Discussion

  • Xavier Hourcade

    Xavier Hourcade - 2012-02-21

    Cumulative patch for rev 104, version 02

     
  • Xavier Hourcade

    Xavier Hourcade - 2012-02-21

    Fedora 16 Howto

    Status
    3.2.6-3.fc16.x86_64 --> OK
    3.2.5-3.fc16.x86_64 --> OK
    3.2.3-2.fc16.x86_64 --> OK
    3.2.2-1.fc16.x86_64 --> OK
    3.2.1-3.fc16.x86_64 --> OK
    3.1.9-1.fc16.x86_64 --> OK
    3.1.6-2.fc16.x86_64 --> OK
    3.1.2-1.fc16.x86_64 --> OK
    3.1.0-7.fc16.x86_64 --> OK

    Steps
    First time on the system => start at 1, skip 4 5 and 9
    Updating module revision => start at 3
    After each kernel update => start at 3, then 8, 10 and following

    Notation
    $ means "as normal user"
    # means "as root"

    (-- as root --)

    1 Install dev packages
    # yum install ctags doxygen gcc kernel-devel patch subversion

    Notes
    Required packages
    "subversion" to obtain and manage the module source
    "gcc" and "kernel-devel" to build the module
    Optional packages
    "ctags" to avoid any (non-fatal) build errors
    "doxygen" to generate the documentation
    "patch" to apply the suggested cumulative patch
    See also
    http://fedoraproject.org/wiki/Docs/CustomKernel#Building_Only_Kernel_Modules_.28Out_Of_Tree_Modules.29

    (-- now as normal user --)

    2 Get Syntek driver source from its svn repository
    $ mkdir ~/hard-webcam_syntek-sourceforge
    $ cd ~/hard-webcam_syntek-sourceforge
    $ svn co -r 104 https://syntekdriver.svn.sourceforge.net/svnroot/syntekdriver/trunk/driver

    Accept permanently sourceforge SVN''s current fingerprint
    94:74:b3:a9:54:ce:dc:e5:0d:d6:cf:86:b1:40:5a:48:b9:ea:15:de
    which can be verified using any modern browser (see SSL certificate) at
    https://syntekdriver.svn.sourceforge.net/svnroot/syntekdriver/

    3 Get into driver directory
    $ cd ~/hard-webcam_syntek-sourceforge/driver

    4 Check if new revisions are available, eg. latest 3 log entries
    $ svn log -l 3

    5 Update Syntek driver source to eg. rev 104 and read README file!
    $ svn up -r 104 && svn revert *
    $ xdg-open README

    6 Get and apply cumulative patch to source tree
    $ wget https://sourceforge.net/tracker/download.php?group_id=178178&atid=884193&file_id=436367&aid=3490085
    $ patch -p0 -i rev-104.patches-02

    7 Generate documentation (optional), save and open it
    $ make -f Makefile.standalone doc
    (lots of warnings, can be ignored)
    $ cp -a ../doxygen ../rev-104+patches-02_doc
    $ xdg-open ../rev-104+patches-02_doc/html/index.html
    $ make -f Makefile.standalone cleandoc

    8 Compile kernel module
    $ make -f Makefile.standalone driver

    (-- now as root --)

    9 Check whether previous module version is loaded, unload it
    # lsmod | grep stk11xx
    stk11xx 145286 0
    videodev 97776 1 stk11xx
    # rmmod stk11xx
    # dmesg | tail -n 20
    [ 4225.942869] stk11xx: usb_stk11xx_exit: Syntek USB2.0 webcam driver shutdown
    [ 4225.942879] usbcore: deregistering interface driver usb_stk11xx_driver
    [ 4225.942916] stk11xx: Syntek USB2.0 Camera disconnected
    [ 4225.942938] stk11xx: Syntek USB2.0 Camera release resources video device /dev/video0

    10 Install and load the new kernel module in the kernel tree
    # cd /home/YOURUSER/hard-webcam_syntek-sourceforge/driver/
    # make -f Makefile.standalone install
    # chmod 744 /lib/modules/`uname -r`/extra/stk11xx.ko

    This places a copy of file "stk11xx.ko" in /lib/modules/`uname -r`/extra
    then it updates system modules dep & map files cf. depmod
    then it changes permissions to allow users executing eg. modinfo

    11 Now load it
    # modprobe stk11xx

    Webcam's activity led just blinked

    (-- now as normal user again --)

    12 Check module infos

    $ dmesg | tail -n 20

    [ if you did NOT patch, you should see : ]

    [ 4361.653215] stk11xx: Syntek USB2.0 webcam driver startup
    [ 4361.653218] stk11xx: Copyright(c) 2006-2009 Nicolas VIVIEN
    [ 4361.653248] stk11xx: Syntek USB2.0 - STK-1135 based webcam found.
    [ 4361.653250] stk11xx: Syntek AVStream USB2.0 1.3M WebCam - Product ID 0x6A31.
    [ 4361.653252] stk11xx: Release: 0005
    [ 4361.653254] stk11xx: Number of interfaces : 1
    [ 4361.653779] stk11xx: Initialize USB2.0 Syntek Camera
    [ 4361.763238] stk11xx: Check device return error (0x0201 = 0C) !
    [ 4361.823840] stk11xx: Syntek USB2.0 Camera is ready
    [ 4361.825404] stk11xx: Syntek USB2.0 Camera is now controlling video device /dev/video0
    [ 4361.825486] usbcore: registered new interface driver usb_stk11xx_driver
    [ 4361.825492] stk11xx: v2.2.0 : Syntek USB Video Camera

    [ if you DID patch, you should see : ]

    [ 750.505078] Linux media interface: v0.10
    [ 750.507733] Linux video capture interface: v2.00
    [ 750.515440] stk11xx: Syntek USB Video Camera driver 2.2.0 (0x020200, rev.104 & patches 02) startup
    [ 750.515444] stk11xx: Copyright(c) 2006-2011 Nicolas VIVIEN
    [ 750.515446] stk11xx: http://sourceforge.net/projects/syntekdriver/
    [ 750.515478] stk11xx: Syntek USB2.0 - STK-1135 based webcam found.
    [ 750.515480] stk11xx: Syntek AVStream USB2.0 1.3M WebCam - Product ID 0x6A31.
    [ 750.515483] stk11xx: Release: 0005
    [ 750.515484] stk11xx: Number of interfaces : 1
    [ 750.515973] stk11xx: Initialize USB2.0 Syntek Camera
    [ 750.624294] stk11xx: Check device return error (0x0201 = 0C) !
    [ 750.684936] stk11xx: Syntek USB2.0 Camera is ready
    [ 750.686650] stk11xx: Syntek USB2.0 Camera is now controlling video device /dev/video0
    [ 750.686740] usbcore: registered new interface driver usb_stk11xx_driver

    The "Check device return error" message may be ignored.

    $ modinfo stk11xx

    [ if you did NOT patch, you should see : ]

    filename: /lib/modules/3.2.6-3.fc16.x86_64/extra/stk11xx.ko
    description: Syntek USB Video Camera
    author: Nicolas VIVIEN
    license: GPL
    alias: usb:v05E1p0501d*dc*dsc*dp*ic*isc*ip*
    [...]

    [ if you DID patch, you should see : ]

    filename: /lib/modules/3.2.6-3.fc16.x86_64/extra/stk11xx.ko
    url: http://sourceforge.net/projects/syntekdriver/
    version: 2.2.0 (0x020200, rev.104 & patches 02)
    description: Syntek USB Video Camera
    author: Nicolas VIVIEN
    license: GPL
    srcversion: EE9F347CA01477ED1F1FC9A
    alias: usb:v05E1p0501d*dc*dsc*dp*ic*isc*ip*
    [...]

    [ then : ]

    depends: videodev
    vermagic: 3.2.6-3.fc16.x86_64 SMP mod_unload
    parm: fps:Frames per second [5-30] (int)
    parm: hflip:Horizontal image flip (int)
    parm: vflip:Vertical image flip (int)
    parm: brightness:Brightness setting (int)
    parm: whiteness:Whiteness setting (int)
    parm: colour:Colour setting (int)
    parm: contrast:Contrast setting (int)
    parm: norm:Norm setting (0=NTSC, 1=PAL) (int)

    12 Keep the module safe, clean-up build tree
    (backup to a sibling directory named after revision, patch no. and kernel version)

    [ if you did NOT patch, do : ]

    $ mkdir ../rev-104_no-patches_kmod-`uname -r`
    $ cp stk11xx.ko ../rev-104_no-patches_kmod-`uname -r`

    [ if you DID patch, do : ]

    $ mkdir ../rev-104+patches-02_kmod-`uname -r`
    $ cp stk11xx.ko ../rev-104+patches-02_kmod-`uname -r`

    [ then: ]

    Clean-up temp compilation files in driver directory
    $ make -f Makefile.standalone clean

    13 Test the kernel module

    VLC captures the video stream fine (from "/dev/video0" here, see dmesg output above).
    Start Kopete, Settings>Configure (takes a long time to open)
    hit the Video tab and smile to yourself, "this is a start".
    Flips should now work as well as automatic corrections.
    guvcview, Google Talk plugin & Skype just work
    Double-check after reboot, led blinks twice before login screen, all work.

    Thanks again Nicolas et al !

     
  • Xavier Hourcade

    Xavier Hourcade - 2012-02-21
    • labels: --> Driver
    • assigned_to: nobody --> nicklas79
     

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.