The Iris unit is identified in the Configuration ROM as a Unit Directory with Unit Specification ID 0x000A27 and Unit Software Version 0x000012. When properly configured, this unit provides asynchronous notification to a host when the iris (shutter) is opened or closed by the user.
The Iris unit provides an Iris Status Address register that specifies the 64-bit FireWire address where iris status will be sent by the iSight. This register is programmed by a host computer using an address value allocated by the host within its own FireWire address space, combined with the host’s FireWire bus and node IDs. The bus ID is typically 1023 (0x3ff), and the host memory address value is typically 0x0001.0000.0000 or higher, so the full 64-bit value would (if the host node ID is 2) look something like 0xffc2.0001.0000.0000.
Iris status is sent back to the host immediately after this register is set (to confirm the setting took effect, and to confirm the present iris state), and is then sent again any time the iris state changes.
The FireWire address of the Iris Status Address register within the iSight can be determined using the key 0x40080000, which is found in the Iris Unit Directory. This key indicates an offset address of 0x80000 quadlets (0x200000 bytes) past the base of the CSR range (at 0xFFFF.F000.0000), so the 48-bit address of the Iris Status Address register is 0xFFFF.F020.0000.
The Iris Status Address register is a write-only register and must be written using a single FireWire block write of size 8 bytes.
The Iris Status Address register is invalidated by a bus reset, and the iSight does not track changes in the host node ID that a bus reset might cause. After any bus reset, the host must reprogram this register if further status is desired.
An Iris status message is sent as a 1394 quadlet write packet with a payload value indicating the current iris state. The packet is sent to the address that was set in the Iris Status Address register. A payload value of 1 indicates the iris is open, and 0 indicates the iris is closed.
The following excerpt from Apple’s FireBug tool (“Table 1-9”) shows a host (node FFC2) and an iSight (node FFC1), and the packets that are exchanged when the host programs the Iris Status Address register and then immediately receives a status packet indicating that the iris is open.
The Iris Status Address Register provides an additional service. When a host has stored an address in this register, iSight will accept IIDC and audio register writes only from the host node ID stored in the register. Writes from other nodes will be rejected with response_conflict_error. This restriction prevents other nodes from changing the audio and video settings without the host’s knowledge. However, other hosts can still receive the audio and video stream, and may still inspect (read) all registers. If, after a bus reset, no host has stored an address in the Iris Status Address Register, then writes to IIDC and audio registers are accepted from any FireWire node.
For good behavior when multiple hosts are on one FireWire bus, a host that has previously gained control of the iSight by writing to the Iris Status Address Register should immediately rewrite this register after any bus reset. Any other host should wait at least one second after any bus reset before attempting to write this register. Any driver attempting to write this register for the first time should also wait one second in addition to any delay required due to a bus reset.
Note: Mac OS X developers can detect the iris state, and any changes in this state, using the "iris state" string property in the AppleIris object in the IO Registry. This object and property are automatically created and updated when the Apple_iSight.kext driver is loaded. Any update will generate a kIOMessagePropertiesChanged message. This property has one of four values, as shown in “Table 1-10”
Last updated: 2004-10-05