Changeset 4063

Show
Ignore:
Timestamp:
10/14/07 17:47:10 (1 year ago)
Author:
hverkuil
Message:

Various updates, preparing for a 1.0.3 release.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • ivtv/branches/1.0/ChangeLog

    r4030 r4063  
    11IVTV changes: 
    22 
    3 1.0.3 development snapshot 
     31.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. 
    48 
    591.0.2 release 
  • ivtv/branches/1.0/README

    r4031 r4063  
    1212 
    1313 
    14 NOTE: These drivers and tools are for use with kernel 2.6.22, for older kernels 
    15 see www.ivtvdriver.org. 
     14NOTE: These drivers and tools are for use with kernels 2.6.22 and 2.6.23, 
     15for older kernels see www.ivtvdriver.org. 
    1616 
    1717 
  • ivtv/branches/1.0/doc/README.install

    r4031 r4063  
    7777With any luck you'll see a picture (or more likely static) and hear some sound. 
    7878 
    79 You can now use ivtvctl to set the input (s-video, audio etc) and ivtv-tune to 
     79You can now use v4l2-ctl to set the input (s-video, audio etc) and ivtv-tune to 
    8080select a channel. 
    8181 
     
    8383  modprobe ivtvfb 
    8484 
    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 
     85This can result in a black screen as nothing is being shown. 
    8886 
    89 This value is what you need in your XF86Config-4/xorg.conf. 
     87v4l2-ctl allows you to change the alpha (transparency) settings: 
    9088 
    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 
    9491would turn off the fb display (clearest possible video) 
    9592 
    96  ivtvfbctl /dev/fb1 -globalalpha -localalpha -alpha 50 
     93  v4l2-ctl -d /dev/video16 --set-fmt-output-overlay global_alpha=50 
     94 
    9795would set the framebuffer to be transparency level 50 over the video. 
    9896 
     
    106104--------------- 
    107105remove 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 
    110109 
    111110You should see 8 coloured bars on the screen. 
    112111 
    113112Then restore normal operation: 
    114  rmmod saa7127 
    115  modprobe saa7127 
     113  rmmod ivtv saa7127 
     114  modprobe saa7127 
     115  modprobe ivtv 
    116116 
    117117 
  • 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 
     1How to prevent the console from using the framebuffer 
     2===================================================== 
    133 
    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 
     4By default when you load ivtvfb the framebuffer is used for the console 
     5output. Unfortunately, this is usually very annoying since this makes it 
     6hard to unload ivtvfb. 
    227 
    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 
     8You can prevent this by adding a magic incantation to the kernel options 
     9in your grub or lilo configuration. 
    3710 
    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 
     11If your monitor console is using the framebuffer of you graphics cards, 
     12then you should use kernel option 'fbcon=vc:0-0'. This ensures that only 
     13the first framebuffer device (that of your graphics card) is used. 
    4414 
    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 
     15If 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 
     17for the console. 
    5918 
    60 Section "ServerLayout" 
    61   ... 
     19However, in kernel 2.6.23 the 'vc:64-63' trick no longer works. Instead 
     20enable the VT_HW_CONSOLE_BINDING configuration option when compiling 
     21the kernel: 'Device Drivers', 'Character devices', 'Support for binding and 
     22unbinding console drivers'. You can now unload ivtvfb by running 
     23'rmmod -f ivtvfb' and the standard console will automatically be reattached. 
    6224 
    63   Screen 0 "Screen 1"                      # << (your computer monitor) 
     25There may be more elegant methods of doing this, please let me know if 
     26you find one. 
    6427 
    65   # (add the following line) 
    66   Screen 1 "TV Screen" RightOf "Screen 1"  # << (TV screen) 
    6728 
    68   ... 
    69 EndSection 
    70 <<<<<<<<<<<<<<<<<<<<<<<<<<<<<< 
     29Setting the framebuffer transparency 
     30==================================== 
    7131 
    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. 
     32The v4l2-ctl utility allows aspects of the ivtv framebuffer to be controlled. 
    7433 
    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. 
     34The relevant options are: 
    7835 
    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] 
    8038 
    81  export DISPLAY=:0.1         (i.e., X server #0, screen #1 = TV) 
    82  xterm& 
     39Reports the current global alpha and chromakey settings of the framebuffer. 
    8340 
    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] 
    8843 
    89 Additional notes if using ivtv X driver > 0.10.6 
    90 ================================================ 
     44Allows you to set the global alpha and chromakey settings of the framebuffer. 
     45A global alpha value of 0 means that the framebuffer is completely 
     46transparent, a value of 255 means it's completely opaque. 
    9147 
    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] 
    9949 
    100 i.e for NTSC 
     50Reports the current transparency settings. 
    10151 
    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] 
    10954 
    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 
     55Selects the transparency options. 
    11856 
    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] 
    12158 
    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). 
     59Returns the coordinates of the MPEG or YUV output window. 
    12560 
    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] 
    12963 
    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  
     64Allows you to position and scale the MPEG or YUV output window. 
  • ivtv/branches/1.0/doc/README.utils

    r3392 r4063  
    1919utility will be removed. 
    2020 
    21 ivtvfbctl 
    22 --------- 
    23 This utility lets you set the alpha/transparency of the OSD. 
    24 It also has other functions (FIXME) 
    25  
    2621radio 
    2722----- 
  • ivtv/branches/1.0/driver/Makefile

    r4033 r4063  
    3333install:: 
    3434        /sbin/depmod -a 
    35         @echo 
    36         @echo "v4l-cx2341x-init.mpg needs copying to the hotplug firmware" 
    37         @echo "directory if needed for PVR350 mpeg initialization" 
    3835 
    3936clean:: 
  • ivtv/branches/1.0/driver/ivtvfb.c

    r4056 r4063  
    11771177                if (itv && (itv->v4l2_cap & V4L2_CAP_VIDEO_OUTPUT) && itv->osd_info) { 
    11781178                        if (unregister_framebuffer(&itv->osd_info->ivtvfb_info)) { 
    1179                                 IVTVFB_WARN("Framebuffer %d is in use, cannot unload\n", i); 
     1179                                IVTV_FB_WARN("Framebuffer %d is in use, cannot unload\n", i); 
    11801180                                return; 
    11811181                        } 
  • ivtv/branches/1.0/utils/v4l2-ctl.cpp

    r3936 r4063  
    118118        OptGetOverlayCropCap, 
    119119        OptGetOutputOverlayCropCap, 
     120        OptOverlay, 
    120121        OptLast = 256 
    121122}; 
     
    227228        {"get-crop-output-overlay", no_argument, 0, OptGetOutputOverlayCrop}, 
    228229        {"set-crop-output-overlay", required_argument, 0, OptSetOutputOverlayCrop}, 
     230        {"overlay", required_argument, 0, OptOverlay}, 
    229231        {0, 0, 0, 0} 
    230232}; 
     
    267269        printf("  -o, --set-output=<num>\n"); 
    268270        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"); 
    273271        printf("  -S, --get-standard\n"); 
    274272        printf("                     query the video standard [VIDIOC_G_STD]\n"); 
     
    318316        printf("  --get-fmt-vbi      query the VBI capture format [VIDIOC_G_FMT]\n"); 
    319317        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"); 
    320319        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"); 
    323321        printf("                     set the overlay framebuffer [VIDIOC_S_FBUF]\n"); 
    324322        printf("  --get-cropcap      query the crop capabilities [VIDIOC_CROPCAP]\n"); 
     
    651649        if (cap & V4L2_FBUF_CAP_LOCAL_ALPHA) 
    652650                s += "\t\t\tLocal Alpha\n"; 
    653         if (cap & V4L2_FBUF_CAP_GLOBAL_INV_ALPHA) 
    654                 s += "\t\t\tGlobal Inverted Alpha\n"; 
    655651        if (cap & V4L2_FBUF_CAP_LOCAL_INV_ALPHA) 
    656652                s += "\t\t\tLocal Inverted Alpha\n"; 
     
    677673        if (fl & V4L2_FBUF_FLAG_LOCAL_ALPHA) 
    678674                s += "\t\t\tLocal Alpha\n"; 
    679         if (fl & V4L2_FBUF_FLAG_GLOBAL_INV_ALPHA) 
    680                 s += "\t\t\tGlobal Inverted Alpha\n"; 
    681675        if (fl & V4L2_FBUF_FLAG_LOCAL_INV_ALPHA) 
    682676                s += "\t\t\tLocal Inverted Alpha\n"; 
     
    11721166        struct v4l2_frequency vf;       /* get_freq/set_freq */ 
    11731167        struct v4l2_standard vs;        /* list_std */ 
     1168        int overlay;                    /* overlay */ 
    11741169        char short_options[26 * 2 * 2 + 1]; 
    11751170        int idx = 0; 
     
    12991294                                        "global_alpha", 
    13001295                                        "local_alpha", 
    1301                                         "global_inv_alpha", 
    13021296                                        "local_inv_alpha", 
    13031297                                        NULL 
     
    13181312                                        break; 
    13191313                                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: 
    13241314                                        fbuf.flags |= strtol(value, 0L, 0) ? V4L2_FBUF_FLAG_LOCAL_INV_ALPHA : 0; 
    13251315                                        set_fbuf |= V4L2_FBUF_FLAG_LOCAL_INV_ALPHA; 
     
    13271317                                } 
    13281318                        } 
     1319                        break; 
     1320                case OptOverlay: 
     1321                        overlay = strtol(optarg, 0L, 0); 
    13291322                        break; 
    13301323                case OptSetCrop: 
     
    17031696        } 
    17041697 
     1698        if (options[OptOverlay]) { 
     1699                doioctl(fd, VIDIOC_OVERLAY, &overlay, "VIDIOC_OVERLAY"); 
     1700        } 
     1701 
    17051702        if (options[OptSetCrop]) { 
    17061703                do_crop(fd, set_crop, vcrop, V4L2_BUF_TYPE_VIDEO_CAPTURE);