Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Data Structures | Macros | Functions
sb_ess.c File Reference
#include <linux/delay.h>
#include <linux/interrupt.h>
#include <linux/spinlock.h>
#include "sound_config.h"
#include "sb_mixer.h"
#include "sb.h"
#include "sb_ess.h"

Go to the source code of this file.

Data Structures

struct  ess_command
 

Macros

#define ESSTYPE_LIKE20   -1 /* Mimic 2.0 behaviour */
 
#define ESSTYPE_DETECT   0 /* Mimic 2.0 behaviour */
 
#define SUBMDL_ES1788   0x10 /* Subtype ES1788 for specific handling */
 
#define SUBMDL_ES1868   0x11 /* Subtype ES1868 for specific handling */
 
#define SUBMDL_ES1869   0x12 /* Subtype ES1869 for specific handling */
 
#define SUBMDL_ES1878   0x13 /* Subtype ES1878 for specific handling */
 
#define SUBMDL_ES1879   0x16 /* ES1879 was initially forgotten */
 
#define SUBMDL_ES1887   0x14 /* Subtype ES1887 for specific handling */
 
#define SUBMDL_ES1888   0x15 /* Subtype ES1888 for specific handling */
 
#define SB_CAP_ES18XX_RATE   0x100
 
#define ES1688_CLOCK1   795444 /* 128 - div */
 
#define ES1688_CLOCK2   397722 /* 256 - div */
 
#define ES18XX_CLOCK1   793800 /* 128 - div */
 
#define ES18XX_CLOCK2   768000 /* 256 - div */
 
#define ES688_RECORDING_DEVICES   ( SOUND_MASK_LINE | SOUND_MASK_MIC | SOUND_MASK_CD )
 
#define ES688_MIXER_DEVICES
 
#define ES1688_RECORDING_DEVICES   ( ES688_RECORDING_DEVICES )
 
#define ES1688_MIXER_DEVICES   ( ES688_MIXER_DEVICES | SOUND_MASK_RECLEV )
 
#define ES1887_RECORDING_DEVICES   ( ES1688_RECORDING_DEVICES | SOUND_MASK_LINE2 | SOUND_MASK_SYNTH)
 
#define ES1887_MIXER_DEVICES   ( ES1688_MIXER_DEVICES )
 
#define ES_REC_MIXER_RECBASE   (SOUND_MIXER_LINE3 + 1)
 
#define ES_REC_MIXER_RECDIFF   (ES_REC_MIXER_RECBASE - SOUND_MIXER_SYNTH)
 
#define ES_REC_MIXER_RECSYNTH   (SOUND_MIXER_SYNTH + ES_REC_MIXER_RECDIFF)
 
#define ES_REC_MIXER_RECPCM   (SOUND_MIXER_PCM + ES_REC_MIXER_RECDIFF)
 
#define ES_REC_MIXER_RECSPEAKER   (SOUND_MIXER_SPEAKER + ES_REC_MIXER_RECDIFF)
 
#define ES_REC_MIXER_RECLINE   (SOUND_MIXER_LINE + ES_REC_MIXER_RECDIFF)
 
#define ES_REC_MIXER_RECMIC   (SOUND_MIXER_MIC + ES_REC_MIXER_RECDIFF)
 
#define ES_REC_MIXER_RECCD   (SOUND_MIXER_CD + ES_REC_MIXER_RECDIFF)
 
#define ES_REC_MIXER_RECIMIX   (SOUND_MIXER_IMIX + ES_REC_MIXER_RECDIFF)
 
#define ES_REC_MIXER_RECALTPCM   (SOUND_MIXER_ALTPCM + ES_REC_MIXER_RECDIFF)
 
#define ES_REC_MIXER_RECRECLEV   (SOUND_MIXER_RECLEV + ES_REC_MIXER_RECDIFF)
 
#define ES_REC_MIXER_RECIGAIN   (SOUND_MIXER_IGAIN + ES_REC_MIXER_RECDIFF)
 
#define ES_REC_MIXER_RECOGAIN   (SOUND_MIXER_OGAIN + ES_REC_MIXER_RECDIFF)
 
#define ES_REC_MIXER_RECLINE1   (SOUND_MIXER_LINE1 + ES_REC_MIXER_RECDIFF)
 
#define ES_REC_MIXER_RECLINE2   (SOUND_MIXER_LINE2 + ES_REC_MIXER_RECDIFF)
 
#define ES_REC_MIXER_RECLINE3   (SOUND_MIXER_LINE3 + ES_REC_MIXER_RECDIFF)
 

Functions

struct audio_driveress_audio_init (sb_devc *devc, int *audio_flags, int *format_mask)
 
void ess_intr (sb_devc *devc)
 
int ess_dsp_reset (sb_devc *devc)
 
int ess_init (sb_devc *devc, struct address_info *hw_config)
 
int ess_dsp_init (sb_devc *devc, struct address_info *hw_config)
 
void ess_setmixer (sb_devc *devc, unsigned int port, unsigned int value)
 
unsigned int ess_getmixer (sb_devc *devc, unsigned int port)
 
void ess_mixer_init (sb_devc *devc)
 
int ess_mixer_set (sb_devc *devc, int dev, int left, int right)
 
void ess_mixer_reload (sb_devc *devc, int dev)
 
int ess_set_recmask (sb_devc *devc, int *mask)
 
int ess_mixer_reset (sb_devc *devc)
 
int ess_midi_init (sb_devc *devc, struct address_info *hw_config)
 

Macro Definition Documentation

#define ES1688_CLOCK1   795444 /* 128 - div */

Definition at line 211 of file sb_ess.c.

#define ES1688_CLOCK2   397722 /* 256 - div */

Definition at line 212 of file sb_ess.c.

#define ES1688_MIXER_DEVICES   ( ES688_MIXER_DEVICES | SOUND_MASK_RECLEV )

Definition at line 1363 of file sb_ess.c.

#define ES1688_RECORDING_DEVICES   ( ES688_RECORDING_DEVICES )

Definition at line 1361 of file sb_ess.c.

#define ES1887_MIXER_DEVICES   ( ES1688_MIXER_DEVICES )

Definition at line 1368 of file sb_ess.c.

#define ES1887_RECORDING_DEVICES   ( ES1688_RECORDING_DEVICES | SOUND_MASK_LINE2 | SOUND_MASK_SYNTH)

Definition at line 1366 of file sb_ess.c.

#define ES18XX_CLOCK1   793800 /* 128 - div */

Definition at line 213 of file sb_ess.c.

#define ES18XX_CLOCK2   768000 /* 256 - div */

Definition at line 214 of file sb_ess.c.

#define ES688_MIXER_DEVICES
#define ES688_RECORDING_DEVICES   ( SOUND_MASK_LINE | SOUND_MASK_MIC | SOUND_MASK_CD )

Definition at line 1354 of file sb_ess.c.

#define ES_REC_MIXER_RECALTPCM   (SOUND_MIXER_ALTPCM + ES_REC_MIXER_RECDIFF)

Definition at line 1388 of file sb_ess.c.

#define ES_REC_MIXER_RECBASE   (SOUND_MIXER_LINE3 + 1)

Definition at line 1378 of file sb_ess.c.

#define ES_REC_MIXER_RECCD   (SOUND_MIXER_CD + ES_REC_MIXER_RECDIFF)

Definition at line 1386 of file sb_ess.c.

#define ES_REC_MIXER_RECDIFF   (ES_REC_MIXER_RECBASE - SOUND_MIXER_SYNTH)

Definition at line 1379 of file sb_ess.c.

#define ES_REC_MIXER_RECIGAIN   (SOUND_MIXER_IGAIN + ES_REC_MIXER_RECDIFF)

Definition at line 1390 of file sb_ess.c.

#define ES_REC_MIXER_RECIMIX   (SOUND_MIXER_IMIX + ES_REC_MIXER_RECDIFF)

Definition at line 1387 of file sb_ess.c.

#define ES_REC_MIXER_RECLINE   (SOUND_MIXER_LINE + ES_REC_MIXER_RECDIFF)

Definition at line 1384 of file sb_ess.c.

#define ES_REC_MIXER_RECLINE1   (SOUND_MIXER_LINE1 + ES_REC_MIXER_RECDIFF)

Definition at line 1392 of file sb_ess.c.

#define ES_REC_MIXER_RECLINE2   (SOUND_MIXER_LINE2 + ES_REC_MIXER_RECDIFF)

Definition at line 1393 of file sb_ess.c.

#define ES_REC_MIXER_RECLINE3   (SOUND_MIXER_LINE3 + ES_REC_MIXER_RECDIFF)

Definition at line 1394 of file sb_ess.c.

#define ES_REC_MIXER_RECMIC   (SOUND_MIXER_MIC + ES_REC_MIXER_RECDIFF)

Definition at line 1385 of file sb_ess.c.

#define ES_REC_MIXER_RECOGAIN   (SOUND_MIXER_OGAIN + ES_REC_MIXER_RECDIFF)

Definition at line 1391 of file sb_ess.c.

#define ES_REC_MIXER_RECPCM   (SOUND_MIXER_PCM + ES_REC_MIXER_RECDIFF)

Definition at line 1382 of file sb_ess.c.

#define ES_REC_MIXER_RECRECLEV   (SOUND_MIXER_RECLEV + ES_REC_MIXER_RECDIFF)

Definition at line 1389 of file sb_ess.c.

#define ES_REC_MIXER_RECSPEAKER   (SOUND_MIXER_SPEAKER + ES_REC_MIXER_RECDIFF)

Definition at line 1383 of file sb_ess.c.

#define ES_REC_MIXER_RECSYNTH   (SOUND_MIXER_SYNTH + ES_REC_MIXER_RECDIFF)

Definition at line 1381 of file sb_ess.c.

#define ESSTYPE_DETECT   0 /* Mimic 2.0 behaviour */

Definition at line 199 of file sb_ess.c.

#define ESSTYPE_LIKE20   -1 /* Mimic 2.0 behaviour */

Definition at line 198 of file sb_ess.c.

#define SB_CAP_ES18XX_RATE   0x100

Definition at line 209 of file sb_ess.c.

#define SUBMDL_ES1788   0x10 /* Subtype ES1788 for specific handling */

Definition at line 201 of file sb_ess.c.

#define SUBMDL_ES1868   0x11 /* Subtype ES1868 for specific handling */

Definition at line 202 of file sb_ess.c.

#define SUBMDL_ES1869   0x12 /* Subtype ES1869 for specific handling */

Definition at line 203 of file sb_ess.c.

#define SUBMDL_ES1878   0x13 /* Subtype ES1878 for specific handling */

Definition at line 204 of file sb_ess.c.

#define SUBMDL_ES1879   0x16 /* ES1879 was initially forgotten */

Definition at line 205 of file sb_ess.c.

#define SUBMDL_ES1887   0x14 /* Subtype ES1887 for specific handling */

Definition at line 206 of file sb_ess.c.

#define SUBMDL_ES1888   0x15 /* Subtype ES1888 for specific handling */

Definition at line 207 of file sb_ess.c.

Function Documentation

struct audio_driver* ess_audio_init ( sb_devc devc,
int audio_flags,
int format_mask 
)
read

Definition at line 739 of file sb_ess.c.

int ess_dsp_init ( sb_devc devc,
struct address_info hw_config 
)

Definition at line 1311 of file sb_ess.c.

int ess_dsp_reset ( sb_devc devc)

Definition at line 859 of file sb_ess.c.

unsigned int ess_getmixer ( sb_devc devc,
unsigned int  port 
)

Definition at line 1591 of file sb_ess.c.

int ess_init ( sb_devc devc,
struct address_info hw_config 
)

Definition at line 1017 of file sb_ess.c.

void ess_intr ( sb_devc devc)

Definition at line 795 of file sb_ess.c.

int ess_midi_init ( sb_devc devc,
struct address_info hw_config 
)

Definition at line 1787 of file sb_ess.c.

void ess_mixer_init ( sb_devc devc)

Definition at line 1625 of file sb_ess.c.

void ess_mixer_reload ( sb_devc devc,
int  dev 
)

Definition at line 1688 of file sb_ess.c.

int ess_mixer_reset ( sb_devc devc)

Definition at line 1748 of file sb_ess.c.

int ess_mixer_set ( sb_devc devc,
int  dev,
int  left,
int  right 
)

Definition at line 1675 of file sb_ess.c.

int ess_set_recmask ( sb_devc devc,
int mask 
)

Definition at line 1733 of file sb_ess.c.

void ess_setmixer ( sb_devc devc,
unsigned int  port,
unsigned int  value 
)

Definition at line 1570 of file sb_ess.c.