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

Go to the source code of this file.

Data Structures

struct  dsp_code_private
 

Macros

#define SOURCEFILE_NAME   "hpidspcd.c"
 

Functions

short hpi_dsp_code_open (u32 adapter, void *os_data, struct dsp_code *dsp_code, u32 *os_error_code)
 
void hpi_dsp_code_close (struct dsp_code *dsp_code)
 
void hpi_dsp_code_rewind (struct dsp_code *dsp_code)
 
short hpi_dsp_code_read_word (struct dsp_code *dsp_code, u32 *pword)
 
short hpi_dsp_code_read_block (size_t words_requested, struct dsp_code *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 using hotplug firmware loader from individual dsp code files

Definition in file hpidspcd.c.

Macro Definition Documentation

#define SOURCEFILE_NAME   "hpidspcd.c"

Definition at line 25 of file hpidspcd.c.

Function Documentation

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
dsp_codePointer to DSP code control structure
os_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
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.