Changeset 4063
- Timestamp:
- 10/14/07 17:47:10 (1 year ago)
- Files:
-
- ivtv/branches/1.0/ChangeLog (modified) (1 diff)
- ivtv/branches/1.0/README (modified) (1 diff)
- ivtv/branches/1.0/README.v4l-dvb (added)
- ivtv/branches/1.0/doc/README.install (modified) (3 diffs)
- ivtv/branches/1.0/doc/README.ivtvfb (modified) (1 diff)
- ivtv/branches/1.0/doc/README.utils (modified) (1 diff)
- ivtv/branches/1.0/driver/Makefile (modified) (1 diff)
- ivtv/branches/1.0/driver/ivtv-svnrelease.h (added)
- ivtv/branches/1.0/driver/ivtvfb.c (modified) (1 diff)
- ivtv/branches/1.0/utils/README.X11 (deleted)
- ivtv/branches/1.0/utils/ivtvfbctl.c (deleted)
- ivtv/branches/1.0/utils/v4l2-ctl.cpp (modified) (11 diffs)
- ivtv/branches/1.0/v4l-cx2341x-init.mpg (deleted)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
ivtv/branches/1.0/ChangeLog
r4030 r4063 1 1 IVTV changes: 2 2 3 1.0.3 development snapshot 3 1.0.3 release 4 - Rename ivtv-fb to ivtvfb for naming consistency. 5 - Test return value of unregister_framebuffer. 6 - Removed the v4l-cx2341x-init.mpg file as it's now part of the firmware.tar.gz 7 package. 4 8 5 9 1.0.2 release ivtv/branches/1.0/README
r4031 r4063 12 12 13 13 14 NOTE: These drivers and tools are for use with kernel 2.6.22, for older kernels15 see www.ivtvdriver.org.14 NOTE: These drivers and tools are for use with kernels 2.6.22 and 2.6.23, 15 for older kernels see www.ivtvdriver.org. 16 16 17 17 ivtv/branches/1.0/doc/README.install
r4031 r4063 77 77 With any luck you'll see a picture (or more likely static) and hear some sound. 78 78 79 You can now use ivtvctl to set the input (s-video, audio etc) and ivtv-tune to79 You can now use v4l2-ctl to set the input (s-video, audio etc) and ivtv-tune to 80 80 select a channel. 81 81 … … 83 83 modprobe ivtvfb 84 84 85 Check the output from dmesg as this will show you which fb device ivtvfb has 86 grabbed; e.g. in a system already using the vesafb module may show: 87 fb1: iTVC15 TV out frame buffer device 85 This can result in a black screen as nothing is being shown. 88 86 89 This value is what you need in your XF86Config-4/xorg.conf. 87 v4l2-ctl allows you to change the alpha (transparency) settings: 90 88 91 This can result in a black screen as nothing is being shown. 92 ivtvfbctl allows you to change the alpha (transparency) settings: 93 ivtvfbctl /dev/fb1 -noglobalalpha -nolocalalpha 89 v4l2-ctl -d /dev/video16 --set-fmt-output-overlay global_alpha=0 90 94 91 would turn off the fb display (clearest possible video) 95 92 96 ivtvfbctl /dev/fb1 -globalalpha -localalpha -alpha 50 93 v4l2-ctl -d /dev/video16 --set-fmt-output-overlay global_alpha=50 94 97 95 would set the framebuffer to be transparency level 50 over the video. 98 96 … … 106 104 --------------- 107 105 remove the video generating module and start it with a testcard image: 108 rmmod saa7127 109 modprobe saa7127 test_image=1 106 rmmod ivtv saa7127 107 modprobe saa7127 test_image=1 108 modprobe ivtv 110 109 111 110 You should see 8 coloured bars on the screen. 112 111 113 112 Then restore normal operation: 114 rmmod saa7127 115 modprobe saa7127 113 rmmod ivtv saa7127 114 modprobe saa7127 115 modprobe ivtv 116 116 117 117 ivtv/branches/1.0/doc/README.ivtvfb
r4031 r4063 1 Instructions for making ivtvfb work with XFree86: 2 Add the following sections and parts thereof to /etc/X11/XF86Config: 3 <<<<<<<<<<<<<<<<<<<<<<<<<<<<<< 4 # NOTE: The monitor section is obtainable by running: 5 # fbset -fb /dev/fb1 -x 6 # (or /dev/fbX for whatever framebuffer ivtvfb is on 7 # as discussed in install.txt) 8 # 9 Section "Monitor" 10 Identifier "NTSC Monitor" 11 HorizSync 10-68 12 VertRefresh 25-120 1 How to prevent the console from using the framebuffer 2 ===================================================== 13 3 14 Mode "720x480" 15 # D: 23.831 MHz, H: 29.788 kHz, V: 59.936 Hz 16 DotClock 23.832 17 HTimings 720 775 799 800 18 VTimings 480 494 496 497 19 Flags "-HSync" "-VSync" 20 EndMode 21 EndSection 4 By default when you load ivtvfb the framebuffer is used for the console 5 output. Unfortunately, this is usually very annoying since this makes it 6 hard to unload ivtvfb. 22 7 23 # Uncomment the following for PAL 24 #Section "Monitor" 25 # Identifier "PAL Monitor" 26 # HorizSync 10-68 27 # VertRefresh 20-120 28 # 29 # Mode "720x576" 30 # # D: 23.720 MHz, H: 29.650 kHz, V: 50.001 Hz 31 # DotClock 23.72 32 # HTimings 720 775 799 800 33 # VTimings 576 590 592 593 34 # Flags "-HSync" "-VSync" 35 # EndMode 36 #EndSection 8 You can prevent this by adding a magic incantation to the kernel options 9 in your grub or lilo configuration. 37 10 38 Section "Device" 39 Identifier "Hauppauge PVR 350 iTVC15 Framebuffer" 40 Driver "ivtvdev" 41 Option "fbdev" "/dev/fb1" # <-- modify if using another device 42 BusID "0:10:0" # <-- obtain from lspci (see later) 43 EndSection 11 If your monitor console is using the framebuffer of you graphics cards, 12 then you should use kernel option 'fbcon=vc:0-0'. This ensures that only 13 the first framebuffer device (that of your graphics card) is used. 44 14 45 Section "Screen" 46 Identifier "TV Screen" 47 Device "Hauppauge PVR 350 iTVC15 Framebuffer" 48 Monitor "NTSC Monitor" # <-- select for NTSC 49 # Monitor "PAL Monitor" # <-- select for PAL 50 DefaultDepth 24 51 DefaultFbbpp 32 52 Subsection "Display" 53 Depth 24 54 FbBpp 32 55 Modes "720x480" # <-- select for NTSC 56 # Modes "720x576" # <-- select for PAL 57 EndSubsection 58 EndSection 15 If you don't use a framebuffer at all for your console, then use the option 16 'fbcon=vc:64-63', this will prevent any framebuffer device from being used 17 for the console. 59 18 60 Section "ServerLayout" 61 ... 19 However, in kernel 2.6.23 the 'vc:64-63' trick no longer works. Instead 20 enable the VT_HW_CONSOLE_BINDING configuration option when compiling 21 the kernel: 'Device Drivers', 'Character devices', 'Support for binding and 22 unbinding console drivers'. You can now unload ivtvfb by running 23 'rmmod -f ivtvfb' and the standard console will automatically be reattached. 62 24 63 Screen 0 "Screen 1" # << (your computer monitor) 25 There may be more elegant methods of doing this, please let me know if 26 you find one. 64 27 65 # (add the following line)66 Screen 1 "TV Screen" RightOf "Screen 1" # << (TV screen)67 28 68 ... 69 EndSection 70 <<<<<<<<<<<<<<<<<<<<<<<<<<<<<< 29 Setting the framebuffer transparency 30 ==================================== 71 31 72 Then start X as usual; both your normal (computer) monitor and the 73 NTSC or PAL TV monitor should display the default X background. 32 The v4l2-ctl utility allows aspects of the ivtv framebuffer to be controlled. 74 33 75 Note the "RightOf" clause above: if you move the mouse off the right 76 side of the computer screen, the pointer should appear on your TV 77 screen. Keyboard events will go to windows in either screen. 34 The relevant options are: 78 35 79 To start a program (e.g., xterm) on the TV only: 36 --get-fmt-output-overlay 37 query the video output overlay format [VIDIOC_G_FMT] 80 38 81 export DISPLAY=:0.1 (i.e., X server #0, screen #1 = TV) 82 xterm& 39 Reports the current global alpha and chromakey settings of the framebuffer. 83 40 84 There is also a way to join both the computer monitor and TV into 85 one giant virtual screen using the Xinerama extension, but I haven't 86 tried it. Doing so may not be such a good idea anyway, as you obviously 87 wouldn't want random X windows getting moved over the TV picture. 41 --set-fmt-output-overlay=chromakey=<key>,global_alpha=<alpha> 42 set the video output overlay format [VIDIOC_S_FMT] 88 43 89 Additional notes if using ivtv X driver > 0.10.6 90 ================================================ 44 Allows you to set the global alpha and chromakey settings of the framebuffer. 45 A global alpha value of 0 means that the framebuffer is completely 46 transparent, a value of 255 means it's completely opaque. 91 47 92 It's possible to change the output resolution via randr support. 93 Although multiple resolutions can be defined, the framebuffer output 94 cannot be scaled. This means that a mode such as 640x400 will not fill 95 the entire screen & there will be a blank area surrounding it. This is 96 useful for restricting the framebuffer output to the non-overscan area 97 of the TV screen. To add new modes, edit the 'Monitor' section adding 98 the new mode information. 48 --get-fbuf query the overlay framebuffer data [VIDIOC_G_FBUF] 99 49 100 i.e for NTSC 50 Reports the current transparency settings. 101 51 102 Mode "640x400" 103 # D: 23.831 MHz, H: 29.788 kHz, V: 59.936 Hz 104 DotClock 23.832 105 HTimings 640 735 759 800 106 VTimings 400 454 456 497 107 Flags "-HSync" "-VSync" 108 EndMode 52 --set-fbuf=chromakey=<0/1>,global_alpha=<0/1>,local_alpha=<0/1>,local_inv_alpha=<0/1> 53 set the overlay framebuffer [VIDIOC_S_FBUF] 109 54 110 ...for PAL 111 Mode "640x480" 112 # D: 23.720 MHz, H: 29.650 kHz, V: 50.001 Hz 113 DotClock 23.721 114 HTimings 640 735 759 800 115 VTimings 480 542 544 593 116 Flags "-HSync" "-VSync" 117 EndMode 55 Selects the transparency options. 118 56 119 Remember to add the new mode to the 'Modes' line in the 'Screen' section. 120 i.e. 'Modes "720x480"' becomes 'Modes "720x480" "640x400"' 57 --get-crop-output query the video output crop window [VIDIOC_G_CROP] 121 58 122 To create a mode where the osd filter is not active, you will need to 123 create an interlaced mode. To do this, add "Interlace" to the 'Flags' 124 line & change the 'DotClock' to 11.916 (NTSC) or 11.861 (PAL). 59 Returns the coordinates of the MPEG or YUV output window. 125 60 126 It's possible to use more than one PVR350 framebuffer for output. Simply 127 create additional 'Device' & 'Screen' sections in the X configuration 128 file. Remember to add the new screen to the 'ServerLayout' section. 61 --set-crop-output=top=<x>,left=<y>,width=<w>,height=<h> 62 set the video output crop window [VIDIOC_S_CROP] 129 63 130 The screen depth (bpp) can be changed from 32, to either 8 or 16. 131 Simply change the DefaultDepth, Depth, DefaultFbbpp & FbBpp 132 entries to 8 or 16. 133 134 A note on unloading the fb driver: 135 ================================== 136 137 If you want to be able to unload the framebuffer driver (and you aren't 138 already using fbcon), add this to your lilo config: 139 140 video=vc:x-y 141 142 where x is the first fb device to allocate and y is the second. If you 143 already have a fb driver loaded, fiddle with the numbers so all the consoles 144 are already allocated. For me, i just set it to 0-0, ie: 145 146 in lilo.conf: 147 148 image=/vmlinuz 149 label=linux 150 read-only 151 append="root=/dev/hda1 video=vc:0-0" 152 153 --OR-- 154 on bootup, do this 155 LILO: linux video=vc:0-0 156 157 according to how i read /usr/src/linux/drivers/video/fbmem.c and 158 /usr/src/linux/drivers/char/console.c, that should disable the 159 console hijacks, and allow you to unload the driver. 160 161 ivtvfbctl 162 ========= 163 164 The ivtvfbctl command allows aspects of the ivtv framebuffer to be controlled. 165 166 The command is: 167 ivtvfbctl 168 [--device=/dev/fbX] 169 [--globalalpha=<on>|<off>] 170 [--localalpha=<on>|<off>] 171 [--alpha=<val>] 172 173 [--device=/dev/fbX] 174 Set the framebuffer device used by your tuner card (default: /dev/fb0) 175 176 [--globalalpha=<on>|<off>] 177 Toggle global alpha layer 178 179 [--localalpha=<on>|<off>] 180 Toggle local alpha layer 181 182 [--alpha=<val>] 183 Sets the global alpha level for the framebuffer. 184 185 If this is set to 0 the framebuffer is completely transparent. 186 If it's set to 255 it's completely opaque. 187 Note that even if it set to 0 it will still produce a slight 'haze' 188 and the framebuffer output should be turned off in this case. 189 64 Allows you to position and scale the MPEG or YUV output window. ivtv/branches/1.0/doc/README.utils
r3392 r4063 19 19 utility will be removed. 20 20 21 ivtvfbctl22 ---------23 This utility lets you set the alpha/transparency of the OSD.24 It also has other functions (FIXME)25 26 21 radio 27 22 ----- ivtv/branches/1.0/driver/Makefile
r4033 r4063 33 33 install:: 34 34 /sbin/depmod -a 35 @echo36 @echo "v4l-cx2341x-init.mpg needs copying to the hotplug firmware"37 @echo "directory if needed for PVR350 mpeg initialization"38 35 39 36 clean:: ivtv/branches/1.0/driver/ivtvfb.c
r4056 r4063 1177 1177 if (itv && (itv->v4l2_cap & V4L2_CAP_VIDEO_OUTPUT) && itv->osd_info) { 1178 1178 if (unregister_framebuffer(&itv->osd_info->ivtvfb_info)) { 1179 IVTV FB_WARN("Framebuffer %d is in use, cannot unload\n", i);1179 IVTV_FB_WARN("Framebuffer %d is in use, cannot unload\n", i); 1180 1180 return; 1181 1181 } ivtv/branches/1.0/utils/v4l2-ctl.cpp
r3936 r4063 118 118 OptGetOverlayCropCap, 119 119 OptGetOutputOverlayCropCap, 120 OptOverlay, 120 121 OptLast = 256 121 122 }; … … 227 228 {"get-crop-output-overlay", no_argument, 0, OptGetOutputOverlayCrop}, 228 229 {"set-crop-output-overlay", required_argument, 0, OptSetOutputOverlayCrop}, 230 {"overlay", required_argument, 0, OptOverlay}, 229 231 {0, 0, 0, 0} 230 232 }; … … 267 269 printf(" -o, --set-output=<num>\n"); 268 270 printf(" set the video output to <num> [VIDIOC_S_OUTPUT]\n"); 269 printf(" -Q, --list-audio-outputs\n");270 printf(" display audio outputs [VIDIOC_ENUMAUDOUT]\n");271 printf(" -q, --list-audio-inputs\n");272 printf(" display audio inputs [VIDIOC_ENUMAUDIO]\n");273 271 printf(" -S, --get-standard\n"); 274 272 printf(" query the video standard [VIDIOC_G_STD]\n"); … … 318 316 printf(" --get-fmt-vbi query the VBI capture format [VIDIOC_G_FMT]\n"); 319 317 printf(" --get-fmt-vbi-out query the VBI output format [VIDIOC_G_FMT]\n"); 318 printf(" --overlay=<on> turn overlay on (1) or off (0) (VIDIOC_OVERLAY)\n"); 320 319 printf(" --get-fbuf query the overlay framebuffer data [VIDIOC_G_FBUF]\n"); 321 printf(" --set-fbuf=chromakey=<0/1>,global_alpha=<0/1>,local_alpha=<0/1>,\n"); 322 printf(" global_inv_alpha=<0/1>,local_inv_alpha=<0/1>\n"); 320 printf(" --set-fbuf=chromakey=<0/1>,global_alpha=<0/1>,local_alpha=<0/1>,local_inv_alpha=<0/1>\n"); 323 321 printf(" set the overlay framebuffer [VIDIOC_S_FBUF]\n"); 324 322 printf(" --get-cropcap query the crop capabilities [VIDIOC_CROPCAP]\n"); … … 651 649 if (cap & V4L2_FBUF_CAP_LOCAL_ALPHA) 652 650 s += "\t\t\tLocal Alpha\n"; 653 if (cap & V4L2_FBUF_CAP_GLOBAL_INV_ALPHA)654 s += "\t\t\tGlobal Inverted Alpha\n";655 651 if (cap & V4L2_FBUF_CAP_LOCAL_INV_ALPHA) 656 652 s += "\t\t\tLocal Inverted Alpha\n"; … … 677 673 if (fl & V4L2_FBUF_FLAG_LOCAL_ALPHA) 678 674 s += "\t\t\tLocal Alpha\n"; 679 if (fl & V4L2_FBUF_FLAG_GLOBAL_INV_ALPHA)680 s += "\t\t\tGlobal Inverted Alpha\n";681 675 if (fl & V4L2_FBUF_FLAG_LOCAL_INV_ALPHA) 682 676 s += "\t\t\tLocal Inverted Alpha\n"; … … 1172 1166 struct v4l2_frequency vf; /* get_freq/set_freq */ 1173 1167 struct v4l2_standard vs; /* list_std */ 1168 int overlay; /* overlay */ 1174 1169 char short_options[26 * 2 * 2 + 1]; 1175 1170 int idx = 0; … … 1299 1294 "global_alpha", 1300 1295 "local_alpha", 1301 "global_inv_alpha",1302 1296 "local_inv_alpha", 1303 1297 NULL … … 1318 1312 break; 1319 1313 case 3: 1320 fbuf.flags |= strtol(value, 0L, 0) ? V4L2_FBUF_FLAG_GLOBAL_INV_ALPHA : 0;1321 set_fbuf |= V4L2_FBUF_FLAG_GLOBAL_INV_ALPHA;1322 break;1323 case 4:1324 1314 fbuf.flags |= strtol(value, 0L, 0) ? V4L2_FBUF_FLAG_LOCAL_INV_ALPHA : 0; 1325 1315 set_fbuf |= V4L2_FBUF_FLAG_LOCAL_INV_ALPHA; … … 1327 1317 } 1328 1318 } 1319 break; 1320 case OptOverlay: 1321 overlay = strtol(optarg, 0L, 0); 1329 1322 break; 1330 1323 case OptSetCrop: … … 1703 1696 } 1704 1697 1698 if (options[OptOverlay]) { 1699 doioctl(fd, VIDIOC_OVERLAY, &overlay, "VIDIOC_OVERLAY"); 1700 } 1701 1705 1702 if (options[OptSetCrop]) { 1706 1703 do_crop(fd, set_crop, vcrop, V4L2_BUF_TYPE_VIDEO_CAPTURE);
