Logo Search packages:      
Sourcecode: alsa-driver version File versions

short HpiDspCode_ReadWord ( DSP_CODE psDspCode,
u32 *  pdwWord 
)

Read one word from the dsp code file

Returns:
0 for success, or error code if eof, or block length exceeded
Parameters:
psDspCode  Pointer to DSP code control structure
pdwWord  Where to store the read word

Definition at line 139 of file hpidspcd.c.

References DSP_CODE_FIRMWARE::dwBlockLength, DSP_CODE_FIRMWARE::dwWordCount, HPI_ERROR_DSP_FILE_FORMAT, and DSP_CODE_FIRMWARE::psFirmware.

{
      if (psDspCode->dwWordCount + 1 > psDspCode->dwBlockLength)
            return (HPI_ERROR_DSP_FILE_FORMAT);

      *pdwWord =
          ((u32 *) (psDspCode->psFirmware->data))[psDspCode->dwWordCount];
      psDspCode->dwWordCount++;
      return 0;
}


Generated by  Doxygen 1.6.0   Back to index