|
ADC Home > Reference Library > Reference > Hardware & Drivers > I/O Kit Framework Reference
|
IOFireWireAVCLibProtocolInterface |
| Declared In: |
Initial interface discovered for all AV/C protocol drivers.
The IOFireWireAVCLibProtocolInterface is used to set up local plug control registers and to receive AV/C requests.
Adds a dispatcher for kernel callbacks to the specified run loop.
Installs a virtual AV/C subunit.
Allocates an input plug.
Allocates an output plug.
Establishes an internal AV/C plug connection between subunit/unit plugs.
Breaks an internal AV/C plug connection between subunit/unit plugs.
Deallocates an input plug.
Deallocates an output plug.
Gets the signal format of the specifed plug.
Gets the connection details for a specific plug.
Installs a command handler for handling specific incoming AV/C commands.
Publishes an AV/C unit directory in the config ROM.
Returns the current value of the input master plug.
Returns the current value of an input plug.
Returns the current value of the output master plug.
Returns the current value of an output plug.
Removes a dispatcher for kernel callbacks to the specified run loop.
Sends an AV/C response packet.
This function has been deprecated. Use installAVCCommandHandler instead.
Sets callback for user space message routine.
Sets the signal format of the specifed plug.
Updates the value of the master input plug (simulating a lock transaction).
Updates the value of an input plug (simulating a lock transaction).
Updates the value of the master output plug (simulating a lock transaction).
Updates the value of an output plug (simulating a lock transaction).
addCallbackDispatcherToRunLoop |
Adds a dispatcher for kernel callbacks to the specified run loop.
IOReturn ( *addCallbackDispatcherToRunLoop)( void *self, CFRunLoopRef cfRunLoopRef );
selfPointer to IOFireWireAVCLibProtocolInterface.
cfRunLoopRefReference to a run loop.
Returns kIOReturnSuccess on success.
The user space portions of the AV/C API communicate with the in-kernel services by messaging the kernel. Similarly, the kernel messages the user space services in response. These responses need to be picked up by a piece of code. This call adds that code to the specified run loop. Most drivers will call this method on the run loop that was created when your task was created. To avoid deadlock you must avoid sleeping (or spin waiting) the run loop to wait for AV/C response. If you do this the dispatcher will never get to run and you will wait forever.
addSubunit |
Installs a virtual AV/C subunit.
IOReturn ( *addSubunit)( void *self, UInt32 subunitType, UInt32 numSourcePlugs, UInt32 numDestPlugs, void *refCon, IOFWAVCSubunitPlugHandlerCallback callback, UInt32 *pSubunitTypeAndID);
selfPointer to IOFireWireAVCLibProtocolInterface.
subunitTypeThe type of subunit to create.
numSourcePlugsThe number of source plugs for this subunit.
numDestPlugsThe number of destination plugs for this subunit.
refconArbitrary value passed back as first argument of callback.
callbackA pointer to the callback to receive plug management messages.
pSubunitTypeAndIDA pointer to a byte to hold the returned subunit address for the new subunit.
allocateInputPlug |
Allocates an input plug.
IOReturn ( *allocateInputPlug)( void *self, void *refcon, IOFWAVCPCRCallback func, UInt32 *plug);
selfPointer to IOFireWireAVCLibProtocolInterface.
refconArbitrary value passed back as first argument of callback.
funcCallback function when a successful lock transaction to the plug has been performed.
plugSet to the plug number if a plug is successfully allocated.
allocateOutputPlug |
Allocates an output plug.
IOReturn ( *allocateOutputPlug)( void *self, void *refcon, IOFWAVCPCRCallback func, UInt32 *plug);
selfPointer to IOFireWireAVCLibProtocolInterface.
refconArbitrary value passed back as first argument of callback.
funcCallback function when a successful lock transaction to the plug has been performed.
plugSet to the plug number if a plug is successfully allocated.
connectTargetPlugs |
Establishes an internal AV/C plug connection between subunit/unit plugs.
IOReturn ( *connectTargetPlugs)( void *self, UInt32 sourceSubunitTypeAndID, IOFWAVCPlugTypes sourcePlugType, UInt32 *pSourcePlugNum, UInt32 destSubunitTypeAndID, IOFWAVCPlugTypes destPlugType, UInt32 *pDestPlugNum, bool lockConnection, bool permConnection);
selfPointer to IOFireWireAVCLibProtocolInterface.
sourceSubunitTypeAndIDThe subunit type and ID for the source plug
sourcePlugTypeThe source plug type.
pSourcePlugNumA pointer to the source plug number. Will return the actual source plug number here.
destSubunitTypeAndIDThe subunit type and ID for the destination plug.
destPlugTypeThe destination plug type.
pDestPlugNumA pointer to the destination plug number. Will return the actual destination plug number here.
lockConnectionA flag to specify if this connection should be locked.
permConnectionA flag to specify if this connection is permanent.
disconnectTargetPlugs |
Breaks an internal AV/C plug connection between subunit/unit plugs.
IOReturn ( *disconnectTargetPlugs)( void *self, UInt32 sourceSubunitTypeAndID, IOFWAVCPlugTypes sourcePlugType, UInt32 sourcePlugNum, UInt32 destSubunitTypeAndID, IOFWAVCPlugTypes destPlugType, UInt32 destPlugNum);
selfPointer to IOFireWireAVCLibProtocolInterface.
sourceSubunitTypeAndIDThe subunit type and ID for the source plug.
sourcePlugTypeThe source plug type.
pSourcePlugNumThe source plug number.
destSubunitTypeAndIDThe subunit type and ID for the destination plug.
destPlugTypeThe destination plug type.
pDestPlugNumThe destination plug number.
freeInputPlug |
Deallocates an input plug.
void ( *freeInputPlug)( void *self, UInt32 plug);
selfPointer to IOFireWireAVCLibProtocolInterface.
plugValue returned by allocateInputPlug.
freeOutputPlug |
Deallocates an output plug.
void ( *freeOutputPlug)( void *self, UInt32 plug);
selfPointer to IOFireWireAVCLibProtocolInterface.
plugValue returned by allocateOutputPlug.
getSubunitPlugSignalFormat |
Gets the signal format of the specifed plug.
IOReturn ( *getSubunitPlugSignalFormat)( void *self, UInt32 subunitTypeAndID, IOFWAVCPlugTypes plugType, UInt32 plugNum, UInt32 *pSignalFormat);
selfPointer to IOFireWireAVCLibProtocolInterface.
subunitTypeAndIDThe subunit type and ID of the plug.
plugTypeThe plug type.
plugNumThe plug number.
pSignalFormatA pointer to the location to return the signal format value.
getTargetPlugConnection |
Gets the connection details for a specific plug.
IOReturn ( *getTargetPlugConnection)( void *self, UInt32 subunitTypeAndID, IOFWAVCPlugTypes plugType, UInt32 plugNum, UInt32 *pConnectedSubunitTypeAndID, IOFWAVCPlugTypes *pConnectedPlugType, UInt32 *pConnectedPlugNum, bool *pLockConnection, bool *pPermConnection);
selfPointer to IOFireWireAVCLibProtocolInterface.
subunitTypeAndIDThe subunit type and ID of the plug.
plugTypeThe plug type.
plugNumThe plug number.
pConnectedSubunitTypeAndIDThe subunit type and ID of the connected plug.
pConnectedPlugTypeThe type of the connected plug.
pConnectedPlugNumThe number of the connected plug.
pLockConnectionA pointer for returning the lock status of the connection.
pPermConnectionA pointer for returning the perm status of the connection.
installAVCCommandHandler |
Installs a command handler for handling specific incoming AV/C commands.
IOReturn ( *installAVCCommandHandler)( void *self, UInt32 subUnitTypeAndID, UInt32 opCode, void *refCon, IOFWAVCCommandHandlerCallback callback);
selfPointer to IOFireWireAVCLibProtocolInterface.
subUnitTypeAndIDThe subunit type and ID for this command handler.
opCodeThe opcode for this command handler.
refconArbitrary value passed back as first argument of callback.
callbackA pointer to the callback function
publishAVCUnitDirectory |
Publishes an AV/C unit directory in the config ROM.
IOReturn ( *publishAVCUnitDirectory)( void *self);
selfPointer to IOFireWireAVCLibProtocolInterface.
readInputMasterPlug |
Returns the current value of the input master plug.
UInt32 ( *readInputMasterPlug)( void *self);
selfPointer to IOFireWireAVCLibProtocolInterface.
readInputPlug |
Returns the current value of an input plug.
UInt32 ( *readInputPlug)( void *self, UInt32 plug);
selfPointer to IOFireWireAVCLibProtocolInterface.
plugValue returned by allocateInputPlug.
readOutputMasterPlug |
Returns the current value of the output master plug.
UInt32 ( *readOutputMasterPlug)( void *self);
selfPointer to IOFireWireAVCLibProtocolInterface.
readOutputPlug |
Returns the current value of an output plug.
UInt32 ( *readOutputPlug)( void *self, UInt32 plug);
selfPointer to IOFireWireAVCLibProtocolInterface.
plugValue returned by allocateOutputPlug.
removeCallbackDispatcherFromRunLoop |
Removes a dispatcher for kernel callbacks to the specified run loop.
void ( *removeCallbackDispatcherFromRunLoop)( void *self );
selfPointer to IOFireWireAVCLibProtocolInterface.
Undoes the work of addCallbackDispatcherToRunLoop.
sendAVCResponse |
Sends an AV/C response packet.
IOReturn ( *sendAVCResponse)( void *self, UInt32 generation, UInt16 nodeID, const char *response, UInt32 responseLen);
selfPointer to IOFireWireAVCLibProtocolInterface.
generationThe FireWire bus generation that this response should be sent in.
nodeIDThe node ID of the device we are sending this response to.
responseA pointer to the response bytes.
responseLenThe number of response bytes.
setAVCRequestCallback |
This function has been deprecated. Use installAVCCommandHandler instead.
IOReturn ( *setAVCRequestCallback)( void *self, UInt32 subUnitType, UInt32 subUnitID, void *refCon, IOFWAVCRequestCallback callback);
setMessageCallback |
Sets callback for user space message routine.
void ( *setMessageCallback)( void *self, void *refCon, IOFWAVCMessageCallback callback);
selfPointer to IOFireWireAVCLibProtocolInterface.
refConRefCon to be returned as first argument of completion routine.
callbackAddress of completion routine.
In FireWire and AV/C, bus status messages are delivered via IOKit's message routine. This routine is emulated in user space for AV/C and FireWire messages via this callback. You should register here for bus reset and reconnect messages.
setSubunitPlugSignalFormat |
Sets the signal format of the specifed plug.
IOReturn ( *setSubunitPlugSignalFormat)( void *self, UInt32 subunitTypeAndID, IOFWAVCPlugTypes plugType, UInt32 plugNum, UInt32 signalFormat);
selfPointer to IOFireWireAVCLibProtocolInterface.
subunitTypeAndIDThe subunit type and ID of the plug.
plugTypeThe plug type.
plugNumThe plug number.
signalFormatThe 32-bit signal format value.
updateInputMasterPlug |
Updates the value of the master input plug (simulating a lock transaction).
IOReturn ( *updateInputMasterPlug)( void *self, UInt32 oldVal, UInt32 newVal);
selfPointer to IOFireWireAVCLibProtocolInterface.
oldValValue returned by readInputMasterPlug.
newValNew value to store in plug if its current value is oldVal.
updateInputPlug |
Updates the value of an input plug (simulating a lock transaction).
IOReturn ( *updateInputPlug)( void *self, UInt32 plug, UInt32 oldVal, UInt32 newVal);
selfPointer to IOFireWireAVCLibProtocolInterface.
plugValue returned by allocateInputPlug.
oldValValue returned by readInputPlug.
newValNew value to store in plug if its current value is oldVal.
updateOutputMasterPlug |
Updates the value of the master output plug (simulating a lock transaction).
IOReturn ( *updateOutputMasterPlug)( void *self, UInt32 oldVal, UInt32 newVal);
selfPointer to IOFireWireAVCLibProtocolInterface.
oldValValue returned by readOutputMasterPlug.
newValNew value to store in plug if its current value is oldVal.
updateOutputPlug |
Updates the value of an output plug (simulating a lock transaction).
IOReturn ( *updateOutputPlug)( void *self, UInt32 plug, UInt32 oldVal, UInt32 newVal);
selfPointer to IOFireWireAVCLibProtocolInterface.
plugValue returned by allocateOutputPlug.
oldValValue returned by readOutputPlug.
newValNew value to store in plug if its current value is oldVal.
|
Last Updated: 2009-02-23