diff --git a/XilinxProcessorIPLib/drivers/dp/src/xdp.c b/XilinxProcessorIPLib/drivers/dp/src/xdp.c index 0f94e3a5..a9d13540 100644 --- a/XilinxProcessorIPLib/drivers/dp/src/xdp.c +++ b/XilinxProcessorIPLib/drivers/dp/src/xdp.c @@ -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 diff --git a/XilinxProcessorIPLib/drivers/dp/src/xdp.h b/XilinxProcessorIPLib/drivers/dp/src/xdp.h index c7cd25e3..a3b1030e 100644 --- a/XilinxProcessorIPLib/drivers/dp/src/xdp.h +++ b/XilinxProcessorIPLib/drivers/dp/src/xdp.h @@ -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,