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

short HpiDspCode_ReadBlock ( size_t  nWordsRequested,
DSP_CODE psDspCode,
u32 **  ppdwBlock 
)

Get a block of dsp code into an internal buffer, and provide a pointer to that buffer. (If dsp code is already an array in memory, it is referenced, not copied.)

Returns:
Error if requested number of words are not available
Parameters:
nWordsRequested  Number of words
psDspCode  Pointer to DSP code control structure
ppdwBlock  Pointer to store (Pointer to code buffer)

Definition at line 151 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 + nWordsRequested > psDspCode->dwBlockLength)
            return (HPI_ERROR_DSP_FILE_FORMAT);

      *ppdwBlock =
          ((u32 *) (psDspCode->psFirmware->data)) + psDspCode->dwWordCount;
      psDspCode->dwWordCount += nWordsRequested;
      return (0);
}


Generated by  Doxygen 1.6.0   Back to index