Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Data Structures | Functions
hpidspcd.h File Reference
#include "hpi_internal.h"

Go to the source code of this file.

Data Structures

struct  code_header
 
struct  dsp_code
 

Functions

 compile_time_assert ((sizeof(struct code_header)==20), code_header_size)
 
short hpi_dsp_code_open (u32 adapter, void *pci_dev, struct dsp_code *ps_dsp_code, u32 *pos_error_code)
 
void hpi_dsp_code_close (struct dsp_code *ps_dsp_code)
 
void hpi_dsp_code_rewind (struct dsp_code *ps_dsp_code)
 
short hpi_dsp_code_read_word (struct dsp_code *ps_dsp_code, u32 *pword)
 
short hpi_dsp_code_read_block (size_t words_requested, struct dsp_code *ps_dsp_code, u32 **ppblock)
 

Detailed Description

AudioScience HPI driver
Copyright (C) 1997-2011  AudioScience Inc. <[email protected]>

This program is free software; you can redistribute it and/or modify
it under the terms of version 2 of the GNU General Public License as
published by the Free Software Foundation;

This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
GNU General Public License for more details.

You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA

Functions for reading DSP code to load into DSP

Definition in file hpidspcd.h.

Function Documentation

compile_time_assert ( (sizeof(struct code_header)==20)  ,
code_header_size   
)
void hpi_dsp_code_close ( struct dsp_code ps_dsp_code)

Close the DSP code file

Definition at line 110 of file hpidspcd.c.

short hpi_dsp_code_open ( u32  adapter,
void pci_dev,
struct dsp_code ps_dsp_code,
u32 pos_error_code 
)
Prepare *psDspCode to refer to the requested adapter's firmware.

Code file name is obtained from HpiOs_GetDspCodePath

Returns
0 for success, or error code if requested code is not available
Parameters
adapterCode identifier, usually adapter family
ps_dsp_codePointer to DSP code control structure
pos_error_codePointer to dword to receive OS specific error code

Definition at line 37 of file hpidspcd.c.

short hpi_dsp_code_read_block ( size_t  words_requested,
struct dsp_code ps_dsp_code,
u32 **  ppblock 
)
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

Definition at line 137 of file hpidspcd.c.

short hpi_dsp_code_read_word ( struct dsp_code ps_dsp_code,
u32 pword 
)

Read one word from the dsp code file

Returns
0 for success, or error code if eof, or block length exceeded
Parameters
ps_dsp_codeDSP code descriptor
pwordWhere to store the read word

Definition at line 125 of file hpidspcd.c.

void hpi_dsp_code_rewind ( struct dsp_code ps_dsp_code)

Rewind to the beginning of the DSP code file (for verify)

Definition at line 118 of file hpidspcd.c.