Linux kernel & device driver programming

Cross-Referenced Linux and Device Driver Code

[ source navigation ] [ diff markup ] [ identifier search ] [ freetext search ] [ file search ]
Version: [ 2.6.11.8 ] [ 2.6.25 ] [ 2.6.25.8 ] [ 2.6.31.13 ] Architecture: [ i386 ]
  1 Linux Driver for HRT Pixelsmart 512-8-PCI
  2 =========================================
  3 
  4 [ About this driver: ]
  5 
  6 This is a device driver for the High Resolution Technologies
  7 Pixelsmart 512-8 frame grabber. It was originally written as
  8 a project for Dr. Ted Baker's Linux Kernel Programming class,
  9 summer semester 2003, at Florida State University.
 10 
 11 It was merged from two drivers, originally written by two
 12 teams of students:
 13  1) Brett W. Thompson, Gilberto Morejon, and Alex Rudnick
 14  2) Veena Adityan and Arthi Gokarn
 15 
 16 It has been tested under 2.6 and requires i2c-core.
 17 
 18 There is a special ioctl for mmap()'ing the device's memory directly. The
 19 intention is for a user process to implement features the driver doesn't
 20 support.
 21 
 22 This ioctl is called IOC_HRT_GET_MAGIC_MMAP_OFFSET. It returns
 23 a magic number which the user program then passes as the offset parameter
 24 to mmap(), e.g.:
 25 
 26         int offset = ioctl(fd, IOC_HRT_GET_MAGIC_MMAP_OFFSET, 0);
 27         char *mem = mmap(NULL, 0x4000, PROT_READ | PROT_WRITE,
 28                          MAP_SHARED, fd, offset);
 29 
 30 After these two system calls, the user program will have direct access
 31 to the card's memory via the mem pointer.
 32 
 33 The VIDIOC_G_CROP and VIDIOC_S_CROP ioctl's are supported to set a 
 34 "region of interest", that is, a rectangle within the frame that the user
 35 program is interested in. Currently, however, it doesn't work very well
 36 (see "Known problems" section below).
 37 
 38 [ Usage: ]
 39 
 40 If you're using kernel 2.6, first rename Makefile-2.6 to Makefile:
 41 
 42   mv Makefile-2.6 Makefile
 43 
 44 And execute:
 45 
 46   make -C /path/to/linux-2.6.0 SUBDIRS=$PWD modules
 47 
 48 And finally, load it:
 49 
 50   insmod hrt.ko
 51 
 52 [ Performance: ]
 53 
 54 The driver has been tested with two cards in the same machine.
 55 
 56 Testing was conducted primarily via hrtdemo, a GTK/SDL program that
 57 Alex Rudnick wrote for this project.
 58 
 59 In testing on the 400 MHz development machine, hrtdemo displays
 60 approximately 13 FPS under 2.4 and almost 16 FPS under 2.6. Without
 61 displaying anything (just a loop with read()), a maximum of 23.5 FPS
 62 was obtained under 2.4.
 63 
 64 [ Known problems: ]
 65 
 66 Unfortunately, currently there are strange bugs with regards to setting
 67 the region of interest. If the width parameter is not a multiple of four,
 68 the image is skewed. If the left parameter is not a multiple of four,
 69 vertical white lines appear.
 70 
 71 xawtv compatability is questionable. It seems to work fine if it's using
 72 read(), but if the window size changes at all (e.g., hitting 'f' to toggle
 73 fullscreen mode) while using streaming, frames seem to stop coming. This
 74 is after modifying xawtv to ignore a reference count which would cause it
 75 to display "waiting for a free buffer" and hang.
 76 
 77 If you solve any of these problems or just want to make a
 78 suggestion about a possible cause, *please* email Brett at
 79 thompson@cs.fsu.edu. :)
 80 
 81 [ Questions? Problems? ]
 82 
 83 Email Brett W. Thompson at thompson@cs.fsu.edu with questions
 84 or problems.
  This page was automatically generated by the LXR engine.