dp: rx: Added audio control.

Enable, disable, and reset of audio stream packets on the main link.

Signed-off-by: Andrei-Liviu Simion <andrei.simion@xilinx.com>
This commit is contained in:
Andrei-Liviu Simion 2015-01-26 00:14:31 -08:00 committed by Nava kishore Manne
parent 7368c8e1c9
commit 74cef5fbbb
2 changed files with 71 additions and 0 deletions

View file

@ -1585,6 +1585,72 @@ void XDp_RxSetLaneCount(XDp *InstancePtr, u8 LaneCount)
0x1);
}
/******************************************************************************/
/**
* This function enables audio stream packets on the main link.
*
* @param InstancePtr is a pointer to the XDp instance.
*
* @return None.
*
* @note None.
*
*******************************************************************************/
void XDp_RxAudioEn(XDp *InstancePtr)
{
/* Verify arguments. */
Xil_AssertVoid(InstancePtr != NULL);
Xil_AssertVoid(InstancePtr->IsReady == XIL_COMPONENT_IS_READY);
Xil_AssertVoid(XDp_GetCoreType(InstancePtr) == XDP_RX);
XDp_WriteReg(InstancePtr->Config.BaseAddr, XDP_RX_AUDIO_CONTROL, 0x1);
}
/******************************************************************************/
/**
* This function disables audio stream packets on the main link.
*
* @param InstancePtr is a pointer to the XDp instance.
*
* @return None.
*
* @note None.
*
*******************************************************************************/
void XDp_RxAudioDis(XDp *InstancePtr)
{
/* Verify arguments. */
Xil_AssertVoid(InstancePtr != NULL);
Xil_AssertVoid(InstancePtr->IsReady == XIL_COMPONENT_IS_READY);
Xil_AssertVoid(XDp_GetCoreType(InstancePtr) == XDP_RX);
XDp_WriteReg(InstancePtr->Config.BaseAddr, XDP_RX_AUDIO_CONTROL, 0x0);
}
/******************************************************************************/
/**
* This function resets the RX core's reception of audio stream packets on the
* main link.
*
* @param InstancePtr is a pointer to the XDp instance.
*
* @return None.
*
* @note None.
*
*******************************************************************************/
void XDp_RxAudioReset(XDp *InstancePtr)
{
/* Verify arguments. */
Xil_AssertVoid(InstancePtr != NULL);
Xil_AssertVoid(InstancePtr->IsReady == XIL_COMPONENT_IS_READY);
Xil_AssertVoid(XDp_GetCoreType(InstancePtr) == XDP_RX);
XDp_RxAudioDis(InstancePtr);
XDp_WaitUs(InstancePtr, 1000);
XDp_RxAudioEn(InstancePtr);
}
/******************************************************************************/
/**
* This function installs a custom delay/sleep function to be used by the XDp

View file

@ -817,6 +817,11 @@ void XDp_RxDtgDis(XDp *InstancePtr);
void XDp_RxSetLinkRate(XDp *InstancePtr, u8 LinkRate);
void XDp_RxSetLaneCount(XDp *InstancePtr, u8 LaneCount);
/* xdp.c: Audio functions. */
void XDp_RxAudioEn(XDp *InstancePtr);
void XDp_RxAudioDis(XDp *InstancePtr);
void XDp_RxAudioReset(XDp *InstancePtr);
/* xdp_edid.c: EDID utility functions. */
u32 XDp_TxGetEdid(XDp *InstancePtr, u8 *Edid);
u32 XDp_TxGetRemoteEdid(XDp *InstancePtr, u8 LinkCountTotal,