This document describes the ioctls available to an application.
To use the ioctls in a C program, #include the sdivideo.h header file.


General purpose ioctls
----------------------

SDIVIDEO_IOC_GETID
	Get the board's PCI device ID.
	Argument type:	pointer to unsigned int
	Read/write:	read
	Valid values:
		0x00b6 - QuadPort H/i
		0x00c1 - VidPort SD/HD O
		0x00c8 - VidPort SD/HD I

SDIVIDEO_IOC_GETVERSION
	Get the board's firmware revision level.
	Argument type:	pointer to unsigned int
	Read/write:	read
	Valid values:	0..65535

SDIVIDEO_IOC_QBUF
	Queue the next "available" driver buffer.
	Argument type:	unsigned int
	Read/write:	read
	Valid values:	0..65535

SDIVIDEO_IOC_DQBUF
	Dequeue the last "used" driver buffer.
	Argument type:	unsigned int
	Read/write:	read
	Valid values:	0..65535


Transmitter ioctls
------------------

SDIVIDEO_IOC_TXGETCAP
	Get the interface's capabilities flags.
	Argument type:	pointer to unsigned int
	Read/write:	read
	Valid values:	0..4294967295

SDIVIDEO_IOC_TXGETEVENTS
	Get and reset the transmitter event flags; contains
		SDIVIDEO_EVENT_TX_BUFFER: Driver buffer queue underrun
		SDIVIDEO_EVENT_TX_FIFO: Onboard FIFO underrun
		SDIVIDEO_EVENT_TX_DATA: Transmit data status change
		SDIVIDEO_EVENT_TX_REF: Transmit reference status change
	Argument type:	pointer to unsigned int
	Read/write:	read
	Valid values:	0..4294967295

SDIVIDEO_IOC_TXGETBUFLEVEL
	Get the driver transmit buffer queue length.
	Argument type:	pointer to int
	Read/write:	read
	Valid values:	0..(number of buffers - 1)

SDIVIDEO_IOC_TXGETTXD
	Get the transmit data status.
	Argument type:	pointer to int
	Read/write:	read
	Valid values:
		0 - not transmitting
		1 - transmitting

SDIVIDEO_IOC_TXGETREF
	Get the transmit reference status.
	Argument type:	pointer to unsigned int
	Read/write:	read
	Valid values:
		0 - valid reference
		1 - reference lost


Receiver ioctls
---------------

SDIVIDEO_IOC_RXGETCAP
	Get the interface's capabilities flags; contains
		SDIVIDEO_CAP_RX_CD: Carrier detect
		SDIVIDEO_CAP_RX_DATA: Receive data status
		SDIVIDEO_CAP_RX_ERR_COUNT: CRC error counts
		SDIVIDEO_CAP_RX_VBI: Direct access to vertical blanking region
		SDIVIDEO_CAP_RX_RAWMODE: Raw mode
		SDIVIDEO_CAP_RX_DEINTERLACING: Weave deinterlacing
	Argument type:	pointer to unsigned int
	Read/write:	read
	Valid values:	0..4294967295

SDIVIDEO_IOC_RXGETEVENTS
	Get and reset the receiver event flags; contains
		SDIVIDEO_EVENT_RX_BUFFER: Driver buffer queue overrun
		SDIVIDEO_EVENT_RX_FIFO: Onboard FIFO overrun
		SDIVIDEO_EVENT_RX_CARRIER: Carrier detect status change
		SDIVIDEO_EVENT_RX_STD: Receive format status change
	Argument type:	pointer to unsigned int
	Read/write:	read
	Valid values:	0..4294967295

SDIVIDEO_IOC_RXGETBUFLEVEL
	Get the driver receive buffer queue length.
	Argument type:	pointer to int
	Read/write:	read
	Valid values:	0..(number of buffers - 1)

SDIVIDEO_IOC_RXGETCARRIER
	If SDIVIDEO_CAP_RX_CD,
		get the carrier detect status.
	Argument type:	pointer to int
	Read/write:	read
	Valid values:
		0 - no carrier
		1 - carrier detected

SDIVIDEO_IOC_RXGETSTATUS
	If SDIVIDEO_CAP_RX_DATA,
		get the receiver data status.
	Argument type:	pointer to int
	Read/write:	read
	Valid values:
		0 - blocking data
		1 - passing data

SDIVIDEO_IOC_RXGETYCRCERROR
	If SDIVIDEO_CAP_RX_ERR_COUNT,
		get and reset the Y CRC error count.
	Argument type:	pointer to unsigned int
	Read/write:	read
	Valid values:	0..4294967295

SDIVIDEO_IOC_RXGETCCRCERROR
	If SDIVIDEO_CAP_RX_ERR_COUNT,
		Get and reset the C CRC error count.
	Argument type:	pointer to unsigned int
	Read/write:	read
	Valid values:	0..4294967295

SDIVIDEO_IOC_RXGETVIDSTATUS
	Get the receiver frame mode status.
	Argument type:	pointer to unsigned int
	Read/write:	read
	Valid values:
		SDIVIDEO_CTL_UNLOCKED - no video standard locked
		SDIVIDEO_CTL_SMPTE_125M_486I_59_94HZ - SMPTE 125M 486i 59.94 Hz
		SDIVIDEO_CTL_BT_601_576I_50HZ - ITU-R BT.601 720x576i 50 Hz
		SDIVIDEO_CTL_SMPTE_260M_1035I_60HZ - SMPTE 260M 1035i 60 Hz
		SDIVIDEO_CTL_SMPTE_260M_1035I_59_94HZ - SMPTE 260M 1035i 59.94 Hz
		SDIVIDEO_CTL_SMPTE_295M_1080I_50HZ - SMPTE 295M 1080i 50 Hz
		SDIVIDEO_CTL_SMPTE_274M_1080I_60HZ - SMPTE 274M 1080i 60 Hz or 1080psf 30 Hz
		SDIVIDEO_CTL_SMPTE_274M_1080I_59_94HZ - SMPTE 274M 1080i 59.94 Hz or 1080psf 29.97 Hz
		SDIVIDEO_CTL_SMPTE_274M_1080I_50HZ - SMPTE 274M 1080i 50 Hz or 1080psf 25 Hz
		SDIVIDEO_CTL_SMPTE_274M_1080PSF_24HZ - SMPTE 274M 1080psf 24 Hz
		SDIVIDEO_CTL_SMPTE_274M_1080PSF_23_98HZ - SMPTE 274M 1080psf 23.98 Hz
		SDIVIDEO_CTL_SMPTE_274M_1080P_30HZ - SMPTE 274M 1080p 30 Hz
		SDIVIDEO_CTL_SMPTE_274M_1080P_29_97HZ - SMPTE 274M 1080p 29.97 Hz
		SDIVIDEO_CTL_SMPTE_274M_1080P_25HZ - SMPTE 274M 1080p 25 Hz
		SDIVIDEO_CTL_SMPTE_274M_1080P_24HZ - SMPTE 274M 1080p 24 Hz
		SDIVIDEO_CTL_SMPTE_274M_1080P_23_98HZ - SMPTE 274M 1080p 23.98 Hz
		SDIVIDEO_CTL_SMPTE_296M_720P_60HZ - SMPTE 296M 720p 60 Hz
		SDIVIDEO_CTL_SMPTE_296M_720P_59_94HZ - SMPTE 296M 720p 59.94 Hz
		SDIVIDEO_CTL_SMPTE_296M_720P_50HZ - SMPTE 296M 720p 50 Hz
		SDIVIDEO_CTL_SMPTE_296M_720P_30HZ - SMPTE 296M 720p 30 Hz
		SDIVIDEO_CTL_SMPTE_296M_720P_29_97HZ - SMPTE 296M 720p 29.97 Hz
		SDIVIDEO_CTL_SMPTE_296M_720P_25HZ - SMPTE 296M 720p 25 Hz
		SDIVIDEO_CTL_SMPTE_296M_720P_24HZ - SMPTE 296M 720p 24 Hz
		SDIVIDEO_CTL_SMPTE_296M_720P_23_98HZ - SMPTE 296M 720p 23.98 Hz

