A P P E N D I X  B

Setting Up S-Video

This appendix provides information for setting up S-video (NTSC and PAL video formats) on the Sun XVR-4000 graphics accelerator.


S-Video Graphical User Interface

This option allows the S-video port to capture any subregion of the normal video Stream A, after the window system is already running.

single-step bulletUse the svideotool GUI application to set up and select this subregion:

host% /opt/SUNWvidtools/bin/svideotool



Note - Ensure that Stream B is not in use when you activate svideotool.




S-Video Output Only

This option produces S-video only, and no display video on either 13W3 output port. FIGURE B-1 shows the location of the S-video DIN4 port.

FIGURE B-1 Sun XVR-4000 Graphics Accelerator S-Video DIN4 Connector

Figure showing Sun XVR-4000 graphics accelerator 13W3B, 13W3A, and S-video DIN4 connectors.

This setup dedicates all memory and video resources of the graphics board to the
S-video port. This approach is required to reach the maximum multisampling depth of 16 samples per pixel. Another board may be used if a large workspace is required for other purposes beyond the one 640 × 480 window.



Note - This procedure assumes that you are setting up the first board, named zulu0.



1. Set the resolution on the second stream.

  • For NTSC, type:
  • host% fbconfig -dev zulu0 -res SUNW_NTSC_640x480x60 -doublewide disable -samples max
    

  • For PAL, type:
  • host% fbconfig -dev zulu0 -res SUNW_PAL_640x480x50 -doublewide disable -samples max
    

2. Log out to restart the X Window system and verify the configuration data.


S-Video Along With Normal Video

This option allows S-video on one video data stream and a normal screen on the other stream.

There can only be two active video outputs at any given time: Either two 13W3 outputs, or one 13W3A output and one S-video output with 13W3B unused.

This setup shares the memory and video resources between the two streams. Multisample depth could be reduced.

1. Set the resolution and sample density for the first (normal) stream.

For example, type:

host% fbconfig -dev zulu0b -res SUNW_STD_1280x1024x76 -samples 1



Note - Notice the 0b above. This is not the same resolution that is used for the default subdevice (zulu0). This resolution needs to be set up independently of zulu0.





Note - Any valid resolution can be used for zulu0b. The larger the resolution is, and higher its sample density, however, the less memory is available for multisampling in the S-video channel.



2. Set the resolution and sample density for the second stream.

  • For NTSC, type:
  • host% fbconfig -dev zulu0a -res SUNW_NTSC_640x480x60 -samples max
    

  • For PAL, type:
  • host% fbconfig -dev zulu0a -res SUNW_PAL_640x480x50 -samples max
    

In the preceding command lines, more memory is allocated for the S-video stream.

You can also control the sample density in the following ways:

    • Use -samples max for the normal stream and -samples 1 for S-video

or

    • Achieve a more balanced allocation of samples. Because the resolution of the
      S-video format is smaller, the same number of samples per pixel consumes less video memory for an S-video format than a normal (larger) format.

3. Add or change the Xservers file to include these devices.

You need to add device entries for /dev/fbs/zulu0a and /dev/fbs/zulu0b to the /etc/dt/config/Xservers file. If an entry for /dev/fbs/zulu0 exists already, delete it and add a -dev option for each of the two described devices, zulu0a and zulu0b. Any other devices should remain the same.



Note - Refer to Chapter 5, "Configuring Multiple Frame Buffers," for further information.



4. Log out to restart the X Window system and verify the configuration data.


S-Video Overrides Output Port Mapping

When an S-video mode is selected, it temporarily changes the routing set up by -outputs for as long as that video mode is selected.

The S-video resolution (both NTSC and PAL) is always routed to both the 13W3
port B (13W3B) and the S-video DIN4 connector.

If another video stream is active, it is routed to the 13W3A connector. The only
-outputs routing that is not altered by S-video is sending the other (high-resolution, non-S-video) stream to both 13W3 connectors. In this case, the S-video DIN4 port is turned off.

The video that comes out of the 13W3B during S-video mode is a non-standard resolution that has an odd aspect ratio. This format is required by the
S-video encoder. Unfortunately, this cannot be disabled. Any display device attached to 13W3B could be turned off.


Using Two Sun XVR-4000 Graphics Accelerators

In this example, the first board (zulu0) is used for S-video exclusively and the second board (zulu1) is used normally.

1. As superuser, create the /etc/dt/config/Xservers file:

# cd /etc/dt/config
# vi + Xservers

2. Modify the Xservers file.

Enter the Xservers file content in one long line.

:0 Local local_uid@console root /usr/openwin/bin/Xsun -dev /dev/fbs/zulu1 -dev /dev/fbs/zulu0



Note - By default, the first board in Xservers is the monitor on the left, and then they are laid out left to right. Xsun options can be added to the Xserver file's Xsun invocation to override this default.



3. Specify resolutions for each board:

host% fbconfig -dev zulu1 -res SUNW_STD_1280x1024x76
host% fbconfig -dev zulu0 -res SUNW_NTSC_640x480x60
host% fbconfig -dev zulu0 -doublewide disable -samples max

4. Check the configuration status of the zulu1 device:

host% fbconfig -dev zulu1 -propt
 
--- OpenWindows Configuration for /dev/fbs/zulu1 ---
 
OWconfig File: machine
 
Card:
        Double(wide/high):      disable
        Stream to Port Mapping: direct (Stream A to Port A; B to B)
        Clearpixel Value:       255
 
Managed Area:
        Resolution:             SUNW_STD_1280x1024x76
        Samples Per Pixel:      max
        Multisample Mode:       forceon
        Jitter Table:           auto
 
Video Streams:
   Stream A:
        Offset (x,y):           (0, 0)
        Gamma Correction Value: 2.22
        Filter Type:            mitchell
 
   Stream B:
        Offset (x,y):           (0, 0)
        Gamma Correction Value: 2.22
        Filter Type:            mitchell
 
Framelock:
        Framelock/Stereo Port:  Output from Stream A
        Stream A Sync:          Free Run (no frame sync)
        Stream B Sync:          Free Run (no frame sync)

5. Check the configuration status of the zulu0 device:

host% fbconfig -dev zulu0 -propt
 
--- OpenWindows Configuration for /dev/fbs/zulu0 ---
 
OWconfig File: machine
 
Card:
        Double(wide/high):      disable
        Stream to Port Mapping: direct (Stream A to Port A; B to B)
        Clearpixel Value:       255
 
Managed Area:
        Resolution:             SUNW_NTSC_640x480x60
        Samples Per Pixel:      max
        Multisample Mode:       forceon
        Jitter Table:           auto
 
Video Streams:
   Stream A:
        Offset (x,y):           (0, 0)
        Gamma Correction Value: 2.22
        Filter Type:            mitchell
 
   Stream B:
        Offset (x,y):           (0, 0)
        Gamma Correction Value: 2.22
        Filter Type:            mitchell
 
Framelock:
        Framelock/Stereo Port:  Output from Stream A
        Stream A Sync:          Free Run (no frame sync)
        Stream B Sync:          Free Run (no frame sync)

The video mode SUNW_NTSC_640×480×60 is used to initialize the NTSC video format.