ATIWDM – WDM Streaming Video Capture Drivers for the ATI All-In-Wonder and ATI All-In-Wonder Pro

SUMMARY

The ATIWDM project creates four separate drivers which control the ATI All-In-Wonder video capture hardware.  

General

The ATIWDM drivers control the All-In-Wonder (Pro) videoport based capture device.  This driver contains sample implementations for almost all of the property sets involved in WDM video capture.  

The ATIWDM driver set allows for easy replacement of a single subsystem without requiring complete recompilation and redistribution of the entire driver set.  For example, the supplied TvTuner driver for the Philips FR1236 tuner could be replaced by a tuner from another vendor, without affecting the drivers for the other hardware components.  

All of the drivers are children of a parent device, either the Rage2 or Rage128 graphics chip.  The children query their parent for an I2C access table and then make calls into the parent to perform I2C I/O operations.

ATIBT829.sys

ATIBT829.sys appears as two separate filters in a DirectShow graph:  "AtiBt829 Capture" and "AtiBt829 Crossbar".  Together these two filters control all of the functionality present in the Brooktree 829 chip and control the capture process via the VPE Kernel mode transport.  

ATIBT829.sys is a fairly complex driver, in that it supports an input stream representing analog video, two capture streams for video and VBI data, and two output connection points for DDraw surface allocation filters (Overlay Mixer", and "VBI Surface Allocator". It also supports input selection via "BT829 Crossbar".

The actual capture operation is implemented by an interface to Kernel DirectDraw. Capture buffers are passed to KDDraw, where they are filled by a bus master operation.

The capture filter exposes four output streams and a single input stream.  The output streams are labeled Capture, VP (videoport), VPVBI (videoport VBI) and VBI.  The input stream is labeled AnalogVideoIn and represents the analog video signal to be digitized.  The crossbar portion represents the input selection multiplexer built into the Brooktree 829 device.

The videoport driver is responsible for enumerating this device which causes the device driver to be loaded.  As an alternative, the driver could be force installed by an .inf entry such as:

[ATI_M64.AIW.AddReg]
HKR,"ENUM\Device2",pnpid,,"atibt829"

ATIXBar.sys

ATIXBAR is a sample WDM stream class Crossbar driver for the ATI All-In-Wonder and All-In-Wonder PRO devices. It manifests itself in  a DirectShow graph as "ATI Crossbar", and controls the routing of analog video and audio signals prior to digitization. It also handles audio muting. Note that the All-In-Wonder exposes two crossbar filters. One is contained with the BT829 video digitizer minidriver (ATIBT829.SYS), and controls video input selection. ATIXBAR controls all of the board specific video routing and is a separate crossbar filter.

The videoport driver is responsible for enumerating this device which causes the device driver to be loaded.  As an alternative, the driver could be force installed by an .inf entry such as::

[ATI_M64.AIW.AddReg]
HKR,"ENUM\Device3",pnpid,,"atixbar"

ATITuneP.sys

ATITUNEP is a sample WDM stream class TVTuner driver for the ATI All-In-Wonder and All-In-Wonder PRO devices. It manifests itself in a DShow graph as "ATI TVTuner". It controls the following tuner hardware (and any other hardware/software compatible devices):

FR1236 - Philips FR1200 series TV and FM tuner family, including:
FI1216 - CCIR B, G System (Western Europe)
FI1216J - RTMA M+N System (Japan)
FI1236 - RTMA M+N System (USA)
FI1246 - CCIR I System (UK, Ireland, SA, H.K.)
FI1256 - OIRT System (China, Russia, E. Europe)
FI1216 - CCIR B,G, L, L1 System (W. Europe, SE Asia, OZ, NZ)
FR1236MK2 - RTMN M+N System + FM (USA)

The videoport driver is responsible for enumerating this device which causes the device driver to be loaded.  As an alternative, the driver could be force installed by an .inf entry such as:

[ATI_M64.AIW.AddReg]
HKR,"ENUM\Device1",pnpid,,"atitunep"

ATITvSnd.sys

ATITVSND is a sample WDM stream class TVSound driver for the ATI All-In-Wonder and All-In-Wonder PRO devices. It manifests itself in a DShow graph as "ATI TVSound". It controls selection of audio subchannels (SAP) as well as mono/stereo audio decoding.

The videoport driver is responsible for enumerating this device which causes the device driver to be loaded.  As an alternative, the driver could be force installed by an .inf entry such as::

[ATI_M64.AIW.AddReg]
HKR,"ENUM\Device4",pnpid,,"atitvsnd"

Keywords: Video capture, WDM, stream class, TvTuner, crossbar, driver, BT829, ATI.

BUILDING THE SAMPLE

The sample is built with the standard DDK BUILD utility in the standard checked or free DDK build environment. To build all drivers, change to the ATIWDM directory and type "build -cez".  

RESOURCES

This driver has been tested with the following applicatons: Graphedt.exe, AMCap.exe, WebTV for Windows.

This website contains general information on driver and hardware development:

http://www.microsoft.com/hwdev

This website contains information on DirectShow:

http://www.microsoft.com/directx

 

CODE TOUR

File Manifest

File		Description
 

Programming Tour

DriverEntry() is the initial point of entry for the driver. It initializes the hardware initialization structure and registers the secondary entry point functions.

HwReceivePacket field describes the entry point for receiving SRBs (Stream Request Packet) from stream class driver. Here is a possible sequence of SRBs that this driver may receive.

  1. SRB_INITIALIZE_DEVICE to initialize the device, and called after DriverEntry().
  2. SRB_GET_STREAM_INFO to get supported stream format.
  3. SRB_GET_DATA_INTERSECTION to query a supported format given some key fields.
  4. SRB_OPEN_STREAM to open a stream with supply format from SRB_GET_DATA_INTERSECTION. Two additional entry point functions are register for this stream for controlling the streaming state (Srb->StreamObject->ReceiveControlPacket) and for streaming data (Srb->StreamObject->ReceiveDataPacket).
  5. SRB_CLOSE_STREAM to close the open stream.
  6. SRB_UNINITIALIZE_DEVICE to indicate that a device has been unloaded or removed.

This driver also register entry points for canceling packets (HwCancelPacket) and for notifying if a packet has timeout (HwRequestTimeoutHandler).

Clocks

ATIBT829.sys, like most video capture drivers, does not act as clock source for a filter graph.

Frame rate and dropped frames

Digital cameras support discrete frame rates; however, a client application can request to stream at any rate. It is required by WDM video capture driver to either match or select the next lower frame rate available. Over sampling can cause synchronization problems.

The dropped frame information is calculated instead of actual count, and it is based on the capture rate and the actual counts of frames captured.

 Work items

 

Top of page

© 1998 Microsoft Corporation