How to create a S/PDIF in/out test function?

Dear all:

               I have the EZ-Board-21479.I need create a S/PDIF single in and single out  test function. I hope someone can provide the example code to me

for study.

Thanks for your help !!