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


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

SDIAUDIO_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

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

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

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


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

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

SDIAUDIO_IOC_TXGETEVENTS
	Get and reset the transmitter event flags; contains
		SDIAUDIO_EVENT_TX_BUFFER: Driver buffer queue underrun
		SDIAUDIO_EVENT_TX_FIFO: Onboard FIFO underrun
		SDIAUDIO_EVENT_TX_DATA: Transmit data status change
	Argument type:	pointer to unsigned int
	Read/write:	read
	Valid values:	0..4294967295

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

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


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

SDIAUDIO_IOC_RXGETCAP
	Get the interface's capabilities flags; contains
		SDIAUDIO_CAP_RX_CD: Carrier detect
		SDIAUDIO_CAP_RX_DATA: Receive data status
		SDIAUDIO_CAP_RX_STATS: Audio delays and error counts
		SDIAUDIO_CAP_RX_NONAUDIO: AES3 non-audio flags
		SDIAUDIO_CAP_RX_24BIT: 24-bit sample packing
	Argument type:	pointer to unsigned int
	Read/write:	read
	Valid values:	0..4294967295

SDIAUDIO_IOC_RXGETEVENTS
	Get and reset the receiver event flags; contains
		SDIAUDIO_EVENT_RX_BUFFER: Driver buffer queue overrun
		SDIAUDIO_EVENT_RX_FIFO: Onboard FIFO overrun
		SDIAUDIO_EVENT_RX_CARRIER: Carrier detect status change
	Argument type:	pointer to unsigned int
	Read/write:	read
	Valid values:	0..4294967295

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

SDIAUDIO_IOC_RXGETCARRIER
	Get the carrier detect status.
	Argument type:	pointer to int
	Read/write:	read
	Valid values:
		0 - no carrier
		1 - carrier detected

SDIAUDIO_IOC_RXGETSTATUS
	Get the receiver status.
	Argument type:	pointer to int
	Read/write:	read
	Valid values:
		0 - blocking data
		1 - passing data

SDIAUDIO_IOC_RXGETAUDIOGR0ERROR
	Get the error counts for audio group 0.
	Argument type:	pointer to unsigned int
	Read/write:	read
	Valid values:	0..4294967295

SDIAUDIO_IOC_RXGETAUDIOGR0DELAYA
	Get the DELAYA value for audio group 0.
	Argument type:	pointer to unsigned int
	Read/write:	read
	Valid values:	0..4294967295

SDIAUDIO_IOC_RXGETAUDIOGR0DELAYB
	Get the DELAYB value for audio group 0.
	Argument type:	pointer to unsigned int
	Read/write:	read
	Valid values:	0..4294967295

SDIAUDIO_IOC_RXGETNONAUDIO
	Get the AES3 non-audio flags.
	Argument type:	pointer to unsigned int
	Read/write:	read
	Valid values:	0..255

SDIAUDIO_IOC_RXGETAUDSTAT
	Get the active audio channels indicated by the audio control packets.
	Argument type:	pointer to unsigned int
	Read/write:	read
	Valid values:	0..255

SDIAUDIO_IOC_RXGETAUDRATE
	Get the audio sampling rate.
	Argument type:	pointer to unsigned int
	Read/write:	read
	Valid values:
		SDIAUDIO_CTL_SYNC_48_KHZ - synchronous, 48 kHz
		SDIAUDIO_CTL_SYNC_44_1_KHZ - synchronous, 44.1 kHz
		SDIAUDIO_CTL_SYNC_32_KHZ - synchronous, 32 kHz
		SDIAUDIO_CTL_SYNC_96_KHZ - synchronous, 96 kHz
		SDIAUDIO_CTL_SYNC_FREE_RUNNING - synchronous, free running
		SDIAUDIO_CTL_ASYNC_48_KHZ - asynchronous, 48 kHz
		SDIAUDIO_CTL_ASYNC_44_1_KHZ - asynchronous, 44.1 kHz
		SDIAUDIO_CTL_ASYNC_32_KHZ - asynchronous, 32 kHz
		SDIAUDIO_CTL_ASYNC_96_KHZ - asynchronous, 96 kHz
		SDIAUDIO_CTL_ASYNC_FREE_RUNNING - asynchronous, free running

