Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Data Structures | Macros | Functions
lx_core.c File Reference
#include <linux/module.h>
#include <linux/pci.h>
#include <linux/delay.h>
#include "lx6464es.h"
#include "lx_core.h"

Go to the source code of this file.

Data Structures

struct  dsp_cmd_info
 

Macros

#define CMD_NAME(a)   NULL
 
#define Reg_CSM_MR   0x00000002
 
#define Reg_CSM_MC   0x00000001
 
#define XILINX_TIMEOUT_MS   40
 
#define XILINX_POLL_NO_SLEEP   100
 
#define XILINX_POLL_ITERATIONS   150
 
#define CSES_TIMEOUT   100 /* microseconds */
 
#define CSES_CE   0x0001
 
#define CSES_BROADCAST   0x0002
 
#define CSES_UPDATE_LDSV   0x0004
 
#define PIPE_INFO_TO_CMD(capture, pipe)   ((u32)((u32)(pipe) | ((capture) ? ID_IS_CAPTURE : 0L)) << ID_OFFSET)
 
#define PCX_IRQ_NONE   0
 
#define IRQCS_ACTIVE_PCIDB   0x00002000L /* Bit nø 13 */
 
#define IRQCS_ENABLE_PCIIRQ   0x00000100L /* Bit nø 08 */
 
#define IRQCS_ENABLE_PCIDB   0x00000200L /* Bit nø 09 */
 

Functions

unsigned long lx_dsp_reg_read (struct lx6464es *chip, int port)
 
void lx_dsp_reg_write (struct lx6464es *chip, int port, unsigned data)
 
unsigned long lx_plx_reg_read (struct lx6464es *chip, int port)
 
void lx_plx_reg_write (struct lx6464es *chip, int port, u32 data)
 
u32 lx_plx_mbox_read (struct lx6464es *chip, int mbox_nr)
 
int lx_plx_mbox_write (struct lx6464es *chip, int mbox_nr, u32 value)
 
int __devinit lx_dsp_get_version (struct lx6464es *chip, u32 *rdsp_version)
 
int lx_dsp_get_clock_frequency (struct lx6464es *chip, u32 *rfreq)
 
int lx_dsp_get_mac (struct lx6464es *chip)
 
int lx_dsp_set_granularity (struct lx6464es *chip, u32 gran)
 
int lx_dsp_read_async_events (struct lx6464es *chip, u32 *data)
 
int lx_dsp_es_check_pipeline (struct lx6464es *chip)
 
int lx_pipe_allocate (struct lx6464es *chip, u32 pipe, int is_capture, int channels)
 
int lx_pipe_release (struct lx6464es *chip, u32 pipe, int is_capture)
 
int lx_buffer_ask (struct lx6464es *chip, u32 pipe, int is_capture, u32 *r_needed, u32 *r_freed, u32 *size_array)
 
int lx_pipe_stop (struct lx6464es *chip, u32 pipe, int is_capture)
 
int lx_pipe_start (struct lx6464es *chip, u32 pipe, int is_capture)
 
int lx_pipe_pause (struct lx6464es *chip, u32 pipe, int is_capture)
 
int lx_pipe_sample_count (struct lx6464es *chip, u32 pipe, int is_capture, u64 *rsample_count)
 
int lx_pipe_state (struct lx6464es *chip, u32 pipe, int is_capture, u16 *rstate)
 
int lx_pipe_wait_for_start (struct lx6464es *chip, u32 pipe, int is_capture)
 
int lx_pipe_wait_for_idle (struct lx6464es *chip, u32 pipe, int is_capture)
 
int lx_stream_set_state (struct lx6464es *chip, u32 pipe, int is_capture, enum stream_state_t state)
 
int lx_stream_set_format (struct lx6464es *chip, struct snd_pcm_runtime *runtime, u32 pipe, int is_capture)
 
int lx_stream_state (struct lx6464es *chip, u32 pipe, int is_capture, int *rstate)
 
int lx_stream_sample_position (struct lx6464es *chip, u32 pipe, int is_capture, u64 *r_bytepos)
 
int lx_buffer_give (struct lx6464es *chip, u32 pipe, int is_capture, u32 buffer_size, u32 buf_address_lo, u32 buf_address_hi, u32 *r_buffer_index)
 
int lx_buffer_free (struct lx6464es *chip, u32 pipe, int is_capture, u32 *r_buffer_size)
 
int lx_buffer_cancel (struct lx6464es *chip, u32 pipe, int is_capture, u32 buffer_index)
 
int lx_level_unmute (struct lx6464es *chip, int is_capture, int unmute)
 
int lx_level_peaks (struct lx6464es *chip, int is_capture, int channels, u32 *r_levels)
 
void lx_tasklet_playback (unsigned long data)
 
void lx_tasklet_capture (unsigned long data)
 
irqreturn_t lx_interrupt (int irq, void *dev_id)
 
void lx_irq_enable (struct lx6464es *chip)
 
void lx_irq_disable (struct lx6464es *chip)
 

Macro Definition Documentation

#define CMD_NAME (   a)    NULL

Definition at line 206 of file lx_core.c.

#define CSES_BROADCAST   0x0002

Definition at line 491 of file lx_core.c.

#define CSES_CE   0x0001

Definition at line 490 of file lx_core.c.

#define CSES_TIMEOUT   100 /* microseconds */

Definition at line 489 of file lx_core.c.

#define CSES_UPDATE_LDSV   0x0004

Definition at line 492 of file lx_core.c.

#define IRQCS_ACTIVE_PCIDB   0x00002000L /* Bit nø 13 */

Definition at line 1052 of file lx_core.c.

#define IRQCS_ENABLE_PCIDB   0x00000200L /* Bit nø 09 */

Definition at line 1054 of file lx_core.c.

#define IRQCS_ENABLE_PCIIRQ   0x00000100L /* Bit nø 08 */

Definition at line 1053 of file lx_core.c.

#define PCX_IRQ_NONE   0

Definition at line 1051 of file lx_core.c.

#define PIPE_INFO_TO_CMD (   capture,
  pipe 
)    ((u32)((u32)(pipe) | ((capture) ? ID_IS_CAPTURE : 0L)) << ID_OFFSET)

Definition at line 521 of file lx_core.c.

#define Reg_CSM_MC   0x00000001

Definition at line 210 of file lx_core.c.

#define Reg_CSM_MR   0x00000002

Definition at line 209 of file lx_core.c.

#define XILINX_POLL_ITERATIONS   150

Definition at line 324 of file lx_core.c.

#define XILINX_POLL_NO_SLEEP   100

Definition at line 323 of file lx_core.c.

#define XILINX_TIMEOUT_MS   40

Definition at line 322 of file lx_core.c.

Function Documentation

int lx_buffer_ask ( struct lx6464es chip,
u32  pipe,
int  is_capture,
u32 r_needed,
u32 r_freed,
u32 size_array 
)

Definition at line 568 of file lx_core.c.

int lx_buffer_cancel ( struct lx6464es chip,
u32  pipe,
int  is_capture,
u32  buffer_index 
)

Definition at line 944 of file lx_core.c.

int lx_buffer_free ( struct lx6464es chip,
u32  pipe,
int  is_capture,
u32 r_buffer_size 
)

Definition at line 920 of file lx_core.c.

int lx_buffer_give ( struct lx6464es chip,
u32  pipe,
int  is_capture,
u32  buffer_size,
u32  buf_address_lo,
u32  buf_address_hi,
u32 r_buffer_index 
)

Definition at line 873 of file lx_core.c.

int lx_dsp_es_check_pipeline ( struct lx6464es chip)

Definition at line 494 of file lx_core.c.

int lx_dsp_get_clock_frequency ( struct lx6464es chip,
u32 rfreq 
)

Definition at line 403 of file lx_core.c.

int lx_dsp_get_mac ( struct lx6464es chip)

Definition at line 436 of file lx_core.c.

int __devinit lx_dsp_get_version ( struct lx6464es chip,
u32 rdsp_version 
)

Definition at line 388 of file lx_core.c.

int lx_dsp_read_async_events ( struct lx6464es chip,
u32 data 
)

Definition at line 470 of file lx_core.c.

unsigned long lx_dsp_reg_read ( struct lx6464es chip,
int  port 
)

Definition at line 75 of file lx_core.c.

void lx_dsp_reg_write ( struct lx6464es chip,
int  port,
unsigned  data 
)

Definition at line 93 of file lx_core.c.

int lx_dsp_set_granularity ( struct lx6464es chip,
u32  gran 
)

Definition at line 455 of file lx_core.c.

irqreturn_t lx_interrupt ( int  irq,
void dev_id 
)

Definition at line 1256 of file lx_core.c.

void lx_irq_disable ( struct lx6464es chip)

Definition at line 1353 of file lx_core.c.

void lx_irq_enable ( struct lx6464es chip)

Definition at line 1347 of file lx_core.c.

int lx_level_peaks ( struct lx6464es chip,
int  is_capture,
int  channels,
u32 r_levels 
)

Definition at line 1014 of file lx_core.c.

int lx_level_unmute ( struct lx6464es chip,
int  is_capture,
int  unmute 
)

Definition at line 970 of file lx_core.c.

int lx_pipe_allocate ( struct lx6464es chip,
u32  pipe,
int  is_capture,
int  channels 
)

Definition at line 527 of file lx_core.c.

int lx_pipe_pause ( struct lx6464es chip,
u32  pipe,
int  is_capture 
)

Definition at line 673 of file lx_core.c.

int lx_pipe_release ( struct lx6464es chip,
u32  pipe,
int  is_capture 
)

Definition at line 550 of file lx_core.c.

int lx_pipe_sample_count ( struct lx6464es chip,
u32  pipe,
int  is_capture,
u64 rsample_count 
)

Definition at line 687 of file lx_core.c.

int lx_pipe_start ( struct lx6464es chip,
u32  pipe,
int  is_capture 
)

Definition at line 660 of file lx_core.c.

int lx_pipe_state ( struct lx6464es chip,
u32  pipe,
int  is_capture,
u16 rstate 
)

Definition at line 716 of file lx_core.c.

int lx_pipe_stop ( struct lx6464es chip,
u32  pipe,
int  is_capture 
)

Definition at line 623 of file lx_core.c.

int lx_pipe_wait_for_idle ( struct lx6464es chip,
u32  pipe,
int  is_capture 
)

Definition at line 767 of file lx_core.c.

int lx_pipe_wait_for_start ( struct lx6464es chip,
u32  pipe,
int  is_capture 
)

Definition at line 762 of file lx_core.c.

u32 lx_plx_mbox_read ( struct lx6464es chip,
int  mbox_nr 
)

Definition at line 144 of file lx_core.c.

int lx_plx_mbox_write ( struct lx6464es chip,
int  mbox_nr,
u32  value 
)

Definition at line 172 of file lx_core.c.

unsigned long lx_plx_reg_read ( struct lx6464es chip,
int  port 
)

Definition at line 132 of file lx_core.c.

void lx_plx_reg_write ( struct lx6464es chip,
int  port,
u32  data 
)

Definition at line 138 of file lx_core.c.

int lx_stream_sample_position ( struct lx6464es chip,
u32  pipe,
int  is_capture,
u64 r_bytepos 
)

Definition at line 849 of file lx_core.c.

int lx_stream_set_format ( struct lx6464es chip,
struct snd_pcm_runtime runtime,
u32  pipe,
int  is_capture 
)

Definition at line 793 of file lx_core.c.

int lx_stream_set_state ( struct lx6464es chip,
u32  pipe,
int  is_capture,
enum stream_state_t  state 
)

Definition at line 773 of file lx_core.c.

int lx_stream_state ( struct lx6464es chip,
u32  pipe,
int  is_capture,
int rstate 
)

Definition at line 828 of file lx_core.c.

void lx_tasklet_capture ( unsigned long  data)

Definition at line 1219 of file lx_core.c.

void lx_tasklet_playback ( unsigned long  data)

Definition at line 1203 of file lx_core.c.