Intel IXP400 Car Stereo System User Manual


 
Intel
®
IXP400 Digital Signal Processing (DSP) Software Version 2.5
Packet Data Interface
API Reference Manual 37
The corresponding data structure is defined as:
In ingress, the header information of Remote Time Stamp, Payload Type and Marker bit are directly
copied from a RTP packet. In egress, the header information is filled by DSP software except for the
Payload Type of RFC-2833 event packets. The RTP processing module is responsible to determine
the payload type if media type indicates a RFC-2833 tone-event packet.
7.2 Packet Delivery Mechanism
The packets are transferred between Intel
®
IXP400 DSP Software and IP stack via the callback func-
tions. The packet delivery module calls the function and passes the packet each time when a packet
is produced. The rules of using the callback function to deliver the packets include:
The packet receiver registers a callback function with the packet deliverer.
The packet deliverer is responsible to prepare the memory for the packet.
The packet receiver has to copy the data to its internal buffer immediately in the callback
function because the deliverer may reuse the same memory for the next packet (i.e., the packet
data may not be valid any more after the callback function returns).
The packet receiver may perform some data processing in the callback function provided the
execution of such processing is predictable (i.e., the processing must be guaranteed to
complete within a certain short period of time).
The function that the DSP software receives the packets from the IP stack is provided as follows:
IP stack has to build the data packets from the IP packets it received and deliver them to DSP soft-
ware by calling this function.
In egress direction, IP stack must provide a function to receive egress data packets. DSP software
will call the function each time when a packet generated. That function must be registered during
initialization as described in next section.
typedef struct{
UINT8 channelID; /* channel ID */
UINT8 payloadType;
/* bit[0-6]payloadtype,bit[7] SID mark bit */
unsigned int mediaType:4; /* media type */
unsigned int payloadLen:12; /* payload length */
UINT32 timeStamp; /* local or remote time stamp */
} __attribute__ ((packed)) XPacketHeader_t;
XStatus_t xPacketReceive (UNIT16 channel, XPacket_t *buffer);
Description Call-back function to receive packets.
Input
Buffer – memory address of the packet
Channel – Channel numbers
Output None
Return
XSUCC – If successful
XERROR – If the packet receptor is unable to process the packet.