/* Convenience function for receiving data from the AC97 codec.  */
unsigned short AC97C_ReadCodec(unsigned char address)
/* Convenience function for receiving data from the AC97 codec.  */
unsigned short AC97C_ReadCodec(unsigned char address)
{
    unsigned int sample;
    sample = AT91C_AC97C_READ | (address << 16);
    AC97C_Transfer(AC97C_CODEC_TRANSFER, (unsigned char *) &sample, 1, 0, 0);
    while (!AC97C_IsFinished(AC97C_CODEC_TRANSFER));
    return sample;
}