v_voip_fec_rx: xvoipfec_rx.c File Reference

| v_voip_fec_rx Xilinx SDK Drivers API Documentation

- Overview
- Data Structures
- APIs
- File List

Functions
xvoipfec_rx.c File Reference

## Overview

This is the main file for Xilinx VoIP FEC Receiver core.

Please see xvoipfec_rx.h for more details of the driver.

    MODIFICATION HISTORY:

    Ver   Who    Date     Changes

    1.00   mmo   02/12/16 Initial release.

## Functions
int | XVoipFEC_RX_CfgInitialize (XVoipFEC_RX *InstancePtr, XVoipFEC_RX_Config *CfgPtr, UINTPTR EffectiveAddr)
| This function initializes the VoIP FEC Receiver core. More...
XVoipFEC_RX_Config | XVoipFEC_RX_CoreInfo (XVoipFEC_RX *InstancePtr)
| This function obtains the core configuration value through register. More...
XVoipFEC_RX_FECStatus | XVoipFEC_RX_FECStatusRegValue (XVoipFEC_RX *InstancePtr, u16 Channels)
| This function obtains the VoIP FEC Receiver ST2022-1/5 Status (FEC Status) More...
XVoipFEC_RX_FECStatistics | XVoipFEC_RX_FECStatisticsRegValue (XVoipFEC_RX *InstancePtr, u16 Channels)
| This function obtains the VoIP FEC Receiver Current Channel Statistic. More...
XVoipFEC_RX_HitlessStatus | XVoipFEC_HitlessStatusRegValue (XVoipFEC_RX *InstancePtr, u16 Channels)
| This function obtains the VoIP FEC Receiver Current Hitless Status. More...
XVoipFEC_RX_FECParams | XVoipFEC_RX_FECParamsRegValue (XVoipFEC_RX *InstancePtr, u16 Channels)
| This function obtains the VoIP FEC Receiver Current Channel Configured Parameters. More...
void | XVoipFEC_RX_CoreChannelConfig (XVoipFEC_RX *InstancePtr)
| This function configures the VoIP FEC Receiver Current Core. More...
void | XVoipFEC_RX_SetFECParams (XVoipFEC_RX *InstancePtr, u16 Channels)
| This function configures the VoIP FEC Receiver Channels Parameters. More...
void | XVoipFEC_RX_ClearChannel (XVoipFEC_RX *InstancePtr, u16 Channels)
| This function clears the Current Channel State. More...
void | XVoipFEC_RX_SoftReset (XVoipFEC_RX *InstancePtr)
| This function perform software resets on VoIP FEC Receiver, which clears all the registers. More...
void | XVoipFEC_RX_ChannelUpdate (XVoipFEC_RX *InstancePtr)
| This function send a pulse on VoIP FEC Receiver to update the configured channel. More...
void | XVoipFEC_RX_ChannelClear (XVoipFEC_RX *InstancePtr)
| This function send a pulse on VoIP FEC Receiver to clear the current accessed Channel. More...
void | XVoipFEC_RX_ChannelAccess (XVoipFEC_RX *InstancePtr, u16 Channels)
| This function Accesses the Configurable Channel. More...
void | XVoipFEC_RX_SetFECProcessingDelay (XVoipFEC_RX *InstancePtr)
| This function configures the FEC Processing Delay. More...
u32 | XVoipFEC_RX_GetFECProcessingDelay (XVoipFEC_RX *InstancePtr)
| This function Gets the configured FEC Processing Delay. More...
u32 | XVoipFEC_RX_GetFECPacketDropCnt (XVoipFEC_RX *InstancePtr)
| This function Gets the configured FEC Packet Drop. More...
u32 | XVoipFEC_RX_GetFECBufferPeakDataCnt (XVoipFEC_RX *InstancePtr)
| This function Gets the configured FEC Peak Buffer Data Count. More...
void | XVoipFEC_RX_ChannelEnable (XVoipFEC_RX *InstancePtr, u16 Channels)
| This function Enables or Disable the Channel Based on User Input to the core structure. More...
void | XVoipFEC_RX_MediaPacketBypass (XVoipFEC_RX *InstancePtr, u16 Channels)
| This function Enables or Disable the Packet Processing Based on User Input to the core structure. More...
void | XVoipFEC_RX_FECRecoveryDisable (XVoipFEC_RX *InstancePtr, u16 Channels)
| This function Enables or Disable the FEC Recovery Based on User Input to the core structure. More...
void | XVoipFEC_RX_OORCfg (XVoipFEC_RX *InstancePtr, u16 Channels)
| This function configures the OOR Handling Management. More...

## Function Documentation

XVoipFEC_RX_HitlessStatus XVoipFEC_HitlessStatusRegValue | ( | XVoipFEC_RX * | InstancePtr,
|  | u16 | Channels
| ) |  |

This function obtains the VoIP FEC Receiver Current Hitless Status.

Currently checking the RTP Timestamp Difference between 2 Links on a RTP Sequence Number

Parameters

  InstancePtr | is a pointer to the XVoipFEC_RX core instance.
  Channels | is current configured channel

Returns
  None.

Note
  None.

References XVoipFEC_RX_Config::BaseAddress, XVoipFEC_RX_HitlessStatus::RTP_TS_Diff, XVoipFEC_RX_ChannelAccess(), and XVoipFEC_RX_ReadReg.

int XVoipFEC_RX_CfgInitialize | ( | XVoipFEC_RX * | InstancePtr,
|  | XVoipFEC_RX_Config * | CfgPtr,
|  | UINTPTR | EffectiveAddr
| ) |  |

This function initializes the VoIP FEC Receiver core.

This function must be called prior to using the VoIP FEC Receiver core. Initialization of the VoIP FEC Receiver includes setting up the instance data and ensuring the hardware is in a quiescent state.

Parameters

  InstancePtr | is a pointer to the XVoipFEC_RX core instance.
  CfgPtr | points to the configuration structure associated with the VoIP FEC Receiver core.
  EffectiveAddr | is the base address of the device. If address translation is being used, then this parameter must reflect the virtual base address. Otherwise, the physical address should be used.

Returns
  - XST_SUCCESS if XVoipFEC_RX_CfgInitialize was successful.
  - XST_FAILURE

Note
  None.

References XVoipFEC_RX_Config::BaseAddress, XVoipFEC_RX_SetFECParams(), and XVoipFEC_RX_SoftReset().

void XVoipFEC_RX_ChannelAccess | ( | XVoipFEC_RX * | InstancePtr,
|  | u16 | Channels
| ) |  |

This function Accesses the Configurable Channel.

Parameters

  InstancePtr | is a pointer to the XVoipFEC_RX core instance.
  Channels | is current configured channel

Returns
  None.

Note
  None.

References XVoipFEC_RX_WriteReg.

Referenced by XVoipFEC_HitlessStatusRegValue(), XVoipFEC_RX_ChannelEnable(), XVoipFEC_RX_ClearChannel(), XVoipFEC_RX_CoreChannelConfig(), XVoipFEC_RX_FECParamsRegValue(), XVoipFEC_RX_FECRecoveryDisable(), XVoipFEC_RX_FECStatisticsRegValue(), XVoipFEC_RX_FECStatusRegValue(), XVoipFEC_RX_MediaPacketBypass(), XVoipFEC_RX_OORCfg(), and XVoipFEC_RX_SetFECParams().

void XVoipFEC_RX_ChannelClear | ( | XVoipFEC_RX * | InstancePtr | ) |

This function send a pulse on VoIP FEC Receiver to clear the current accessed Channel.

Parameters

  InstancePtr | is a pointer to the XVoipFEC_RX core instance.

Returns
  None.

Note
  None.

References XVoipFEC_RX_ReadReg, and XVoipFEC_RX_WriteReg.

Referenced by XVoipFEC_RX_ClearChannel().

void XVoipFEC_RX_ChannelEnable | ( | XVoipFEC_RX * | InstancePtr,
|  | u16 | Channels
| ) |  |

This function Enables or Disable the Channel Based on User Input to the core structure.

Parameters

  InstancePtr | is a pointer to the XVoipFEC_RX core instance.
  Channels | is current configured channel

Returns
  None.

Note
  None.

References XVoipFEC_RX_Config::BaseAddress, XVoipFEC_RX_ChannelAccess(), XVoipFEC_RX_ChannelUpdate(), XVoipFEC_RX_ReadReg, and XVoipFEC_RX_WriteReg.

Referenced by XVoipFEC_RX_SetFECParams().

void XVoipFEC_RX_ChannelUpdate | ( | XVoipFEC_RX * | InstancePtr | ) |

This function send a pulse on VoIP FEC Receiver to update the configured channel.

Parameters

  InstancePtr | is a pointer to the XVoipFEC_RX core instance.

Returns
  None.

Note
  None.

References XVoipFEC_RX_ReadReg, and XVoipFEC_RX_WriteReg.

Referenced by XVoipFEC_RX_ChannelEnable(), XVoipFEC_RX_CoreChannelConfig(), XVoipFEC_RX_FECRecoveryDisable(), XVoipFEC_RX_MediaPacketBypass(), XVoipFEC_RX_OORCfg(), and XVoipFEC_RX_SetFECParams().

void XVoipFEC_RX_ClearChannel | ( | XVoipFEC_RX * | InstancePtr,
|  | u16 | Channels
| ) |  |

This function clears the Current Channel State.

Note: This Function Should be called when the channel is disabled

Parameters

  InstancePtr | is a pointer to the XVoipFEC_RX core instance.
  Channels | is current configured channel

Returns
  None.

Note
  None.

References XVoipFEC_RX_BusyBit, XVoipFEC_RX_ChannelAccess(), and XVoipFEC_RX_ChannelClear().

Referenced by XVoipFEC_RX_SetFECParams().

void XVoipFEC_RX_CoreChannelConfig | ( | XVoipFEC_RX * | InstancePtr | ) |

This function configures the VoIP FEC Receiver Current Core.

Parameters

  InstancePtr | is a pointer to the XVoipFEC_RX core instance.

Returns
  None.

Note
  None.

References XVoipFEC_RX_ChannelAccess(), XVoipFEC_RX_ChannelUpdate(), XVoipFEC_RX_SetFECParams(), and XVoipFEC_RX_SetFECProcessingDelay().

XVoipFEC_RX_Config XVoipFEC_RX_CoreInfo | ( | XVoipFEC_RX * | InstancePtr | ) |

This function obtains the core configuration value through register.

Debug Function to compare with generated xvoipfec_rx_g.c generated file.

Parameters

  InstancePtr | is a pointer to the VoIP FEC Receiver core instance.

Returns
  None.

Note
  None.

References XVoipFEC_RX_Config::BaseAddress, XVoipFEC_RX_Config::FECEnable, XVoipFEC_RX_Config::HWChannelNumber, XVoipFEC_RX_Config::SeamlessEnable, and XVoipFEC_RX_ReadReg.

XVoipFEC_RX_FECParams XVoipFEC_RX_FECParamsRegValue | ( | XVoipFEC_RX * | InstancePtr,
|  | u16 | Channels
| ) |  |

This function obtains the VoIP FEC Receiver Current Channel Configured Parameters.

Parameters

  InstancePtr | is a pointer to the XVoipFEC_RX core instance.
  Channels | is current configured channel

Returns
  None.

Note
  None.

References XVoipFEC_RX_Config::BaseAddress, XVoipFEC_RX_ChannelAccess(), and XVoipFEC_RX_ReadReg.

void XVoipFEC_RX_FECRecoveryDisable | ( | XVoipFEC_RX * | InstancePtr,
|  | u16 | Channels
| ) |  |

This function Enables or Disable the FEC Recovery Based on User Input to the core structure.

Parameters

  InstancePtr | is a pointer to the XVoipFEC_RX core instance.
  Channels | is current configured channel

Returns
  None.

Note
  None.

References XVoipFEC_RX_Config::BaseAddress, XVoipFEC_RX_ChannelAccess(), XVoipFEC_RX_ChannelUpdate(), XVoipFEC_RX_ReadReg, and XVoipFEC_RX_WriteReg.

Referenced by XVoipFEC_RX_SetFECParams().

XVoipFEC_RX_FECStatistics XVoipFEC_RX_FECStatisticsRegValue | ( | XVoipFEC_RX * | InstancePtr,
|  | u16 | Channels
| ) |  |

This function obtains the VoIP FEC Receiver Current Channel Statistic.

Parameters

  InstancePtr | is a pointer to the XVoipFEC_RX core instance.
  Channels | is current configured channel

Returns
  None.

Note
  None.

References XVoipFEC_RX_Config::BaseAddress, XVoipFEC_RX_ChannelAccess(), and XVoipFEC_RX_ReadReg.

XVoipFEC_RX_FECStatus XVoipFEC_RX_FECStatusRegValue | ( | XVoipFEC_RX * | InstancePtr,
|  | u16 | Channels
| ) |  |

This function obtains the VoIP FEC Receiver ST2022-1/5 Status (FEC Status)

Parameters

  InstancePtr | is a pointer to the XVoipFEC_RX core instance.
  Channels | is current configured channel

Returns
  None.

Note
  None.

References XVoipFEC_RX_Config::BaseAddress, XVoipFEC_RX_ChannelAccess(), and XVoipFEC_RX_ReadReg.

u32 XVoipFEC_RX_GetFECBufferPeakDataCnt | ( | XVoipFEC_RX * | InstancePtr | ) |

This function Gets the configured FEC Peak Buffer Data Count.

Parameters

  InstancePtr | is a pointer to the XVoipFEC_RX core instance.

Returns
  None.

Note
  None.

References XVoipFEC_RX_ReadReg.

u32 XVoipFEC_RX_GetFECPacketDropCnt | ( | XVoipFEC_RX * | InstancePtr | ) |

This function Gets the configured FEC Packet Drop.

Parameters

  InstancePtr | is a pointer to the XVoipFEC_RX core instance.

Returns
  None.

Note
  None.

References XVoipFEC_RX_ReadReg.

u32 XVoipFEC_RX_GetFECProcessingDelay | ( | XVoipFEC_RX * | InstancePtr | ) |

This function Gets the configured FEC Processing Delay.

Parameters

  InstancePtr | is a pointer to the XVoipFEC_RX core instance.

Returns
  None.

Note
  None.

References XVoipFEC_RX_ReadReg.

void XVoipFEC_RX_MediaPacketBypass | ( | XVoipFEC_RX * | InstancePtr,
|  | u16 | Channels
| ) |  |

This function Enables or Disable the Packet Processing Based on User Input to the core structure.

Parameters

  InstancePtr | is a pointer to the XVoipFEC_RX core instance.
  Channels | is current configured channel

Returns
  None.

Note
  None.

References XVoipFEC_RX_Config::BaseAddress, XVoipFEC_RX_ChannelAccess(), XVoipFEC_RX_ChannelUpdate(), XVoipFEC_RX_ReadReg, and XVoipFEC_RX_WriteReg.

Referenced by XVoipFEC_RX_SetFECParams().

void XVoipFEC_RX_OORCfg | ( | XVoipFEC_RX * | InstancePtr,
|  | u16 | Channels
| ) |  |

This function configures the OOR Handling Management.

Parameters

  InstancePtr | is a pointer to the XVoipFEC_RX core instance.
  Channels | is current configured channel

Returns
  None.

Note
  None.

References XVoipFEC_RX_Config::BaseAddress, XVoipFEC_RX_ChannelAccess(), XVoipFEC_RX_ChannelUpdate(), XVoipFEC_RX_ReadReg, and XVoipFEC_RX_WriteReg.

Referenced by XVoipFEC_RX_SetFECParams().

void XVoipFEC_RX_SetFECParams | ( | XVoipFEC_RX * | InstancePtr,
|  | u16 | Channels
| ) |  |

This function configures the VoIP FEC Receiver Channels Parameters.

Parameters

  InstancePtr | is a pointer to the XVoipFEC_RX core instance.
  Channels | is current configured channel

Returns
  None.

Note
  None.

References XVoipFEC_RX_ChannelAccess(), XVoipFEC_RX_ChannelEnable(), XVoipFEC_RX_ChannelUpdate(), XVoipFEC_RX_ClearChannel(), XVoipFEC_RX_FECRecoveryDisable(), XVoipFEC_RX_MediaPacketBypass(), and XVoipFEC_RX_OORCfg().

Referenced by XVoipFEC_RX_CfgInitialize(), and XVoipFEC_RX_CoreChannelConfig().

void XVoipFEC_RX_SetFECProcessingDelay | ( | XVoipFEC_RX * | InstancePtr | ) |

This function configures the FEC Processing Delay.

Parameters

  InstancePtr | is a pointer to the XVoipFEC_RX core instance.

Returns
  None.

Note
  None.

References XVoipFEC_RX_WriteReg.

Referenced by XVoipFEC_RX_CoreChannelConfig().

void XVoipFEC_RX_SoftReset | ( | XVoipFEC_RX * | InstancePtr | ) |

This function perform software resets on VoIP FEC Receiver, which clears all the registers.

Parameters

  InstancePtr | is a pointer to the XVoipFEC_RX core instance.

Returns
  None.

Note
  None.

References XVoipFEC_RX_ReadReg, and XVoipFEC_RX_WriteReg.

Referenced by XVoipFEC_RX_CfgInitialize().