Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Data Structures | Macros | Functions
es18xx.c File Reference
#include <linux/init.h>
#include <linux/err.h>
#include <linux/isa.h>
#include <linux/pnp.h>
#include <linux/isapnp.h>
#include <linux/module.h>
#include <linux/delay.h>
#include <asm/io.h>
#include <asm/dma.h>
#include <sound/core.h>
#include <sound/control.h>
#include <sound/pcm.h>
#include <sound/pcm_params.h>
#include <sound/mpu401.h>
#include <sound/opl3.h>
#include <sound/initval.h>

Go to the source code of this file.

Data Structures

struct  snd_es18xx
 

Macros

#define SNDRV_LEGACY_FIND_FREE_IRQ
 
#define SNDRV_LEGACY_FIND_FREE_DMA
 
#define PFX   "es18xx: "
 
#define AUDIO1_IRQ   0x01
 
#define AUDIO2_IRQ   0x02
 
#define HWV_IRQ   0x04
 
#define MPU_IRQ   0x08
 
#define ES18XX_PCM2   0x0001 /* Has two useable PCM */
 
#define ES18XX_SPATIALIZER   0x0002 /* Has 3D Spatializer */
 
#define ES18XX_RECMIX   0x0004 /* Has record mixer */
 
#define ES18XX_DUPLEX_MONO   0x0008 /* Has mono duplex only */
 
#define ES18XX_DUPLEX_SAME   0x0010 /* Playback and record must share the same rate */
 
#define ES18XX_NEW_RATE   0x0020 /* More precise rate setting */
 
#define ES18XX_AUXB   0x0040 /* AuxB mixer control */
 
#define ES18XX_HWV   0x0080 /* Has separate hardware volume mixer controls*/
 
#define ES18XX_MONO   0x0100 /* Mono_in mixer control */
 
#define ES18XX_I2S   0x0200 /* I2S mixer control */
 
#define ES18XX_MUTEREC   0x0400 /* Record source can be muted */
 
#define ES18XX_CONTROL   0x0800 /* Has control ports */
 
#define ES18XX_PM   0x07
 
#define ES18XX_PM_GPO0   0x01
 
#define ES18XX_PM_GPO1   0x02
 
#define ES18XX_PM_PDR   0x04
 
#define ES18XX_PM_ANA   0x08
 
#define ES18XX_PM_FM   0x020
 
#define ES18XX_PM_SUS   0x080
 
#define DAC1   0x01
 
#define ADC1   0x02
 
#define DAC2   0x04
 
#define MILLISECOND   10000
 
#define snd_es18xx_info_spatializer_enable   snd_ctl_boolean_mono_info
 
#define snd_es18xx_info_hw_switch   snd_ctl_boolean_stereo_info
 
#define ES18XX_SINGLE(xname, xindex, reg, shift, mask, invert)
 
#define ES18XX_DOUBLE(xname, xindex, left_reg, right_reg, shift_left, shift_right, mask, invert)
 
#define is_isapnp_selected(dev)   0
 
#define DEV_NAME   "es18xx"
 

Functions

 MODULE_AUTHOR ("Christian Fischbach <[email protected]>, Abramo Bagnara <[email protected]>")
 
 MODULE_DESCRIPTION ("ESS ES18xx AudioDrive")
 
 MODULE_LICENSE ("GPL")
 
 MODULE_SUPPORTED_DEVICE ("{{ESS,ES1868 PnP AudioDrive},""{ESS,ES1869 PnP AudioDrive},""{ESS,ES1878 PnP AudioDrive},""{ESS,ES1879 PnP AudioDrive},""{ESS,ES1887 PnP AudioDrive},""{ESS,ES1888 PnP AudioDrive},""{ESS,ES1887 AudioDrive},""{ESS,ES1888 AudioDrive}}")
 
 module_param_array (index, int, NULL, 0444)
 
 MODULE_PARM_DESC (index,"Index value for ES18xx soundcard.")
 
 module_param_array (id, charp, NULL, 0444)
 
 MODULE_PARM_DESC (id,"ID string for ES18xx soundcard.")
 
 module_param_array (enable, bool, NULL, 0444)
 
 MODULE_PARM_DESC (enable,"Enable ES18xx soundcard.")
 
 module_param_array (port, long, NULL, 0444)
 
 MODULE_PARM_DESC (port,"Port # for ES18xx driver.")
 
 module_param_array (mpu_port, long, NULL, 0444)
 
 MODULE_PARM_DESC (mpu_port,"MPU-401 port # for ES18xx driver.")
 
 module_param_array (fm_port, long, NULL, 0444)
 
 MODULE_PARM_DESC (fm_port,"FM port # for ES18xx driver.")
 
 module_param_array (irq, int, NULL, 0444)
 
 MODULE_PARM_DESC (irq,"IRQ # for ES18xx driver.")
 
 module_param_array (dma1, int, NULL, 0444)
 
 MODULE_PARM_DESC (dma1,"DMA 1 # for ES18xx driver.")
 
 module_param_array (dma2, int, NULL, 0444)
 
 MODULE_PARM_DESC (dma2,"DMA 2 # for ES18xx driver.")
 

Macro Definition Documentation

#define ADC1   0x02

Definition at line 172 of file es18xx.c.

#define AUDIO1_IRQ   0x01

Definition at line 142 of file es18xx.c.

#define AUDIO2_IRQ   0x02

Definition at line 143 of file es18xx.c.

#define DAC1   0x01

Definition at line 171 of file es18xx.c.

#define DAC2   0x04

Definition at line 173 of file es18xx.c.

#define DEV_NAME   "es18xx"

Definition at line 2255 of file es18xx.c.

#define ES18XX_AUXB   0x0040 /* AuxB mixer control */

Definition at line 153 of file es18xx.c.

#define ES18XX_CONTROL   0x0800 /* Has control ports */

Definition at line 158 of file es18xx.c.

#define ES18XX_DOUBLE (   xname,
  xindex,
  left_reg,
  right_reg,
  shift_left,
  shift_right,
  mask,
  invert 
)
Value:
{ .iface = SNDRV_CTL_ELEM_IFACE_MIXER, .name = xname, .index = xindex, \
.info = snd_es18xx_info_double, \
.get = snd_es18xx_get_double, .put = snd_es18xx_put_double, \
.private_value = left_reg | (right_reg << 8) | (shift_left << 16) | (shift_right << 19) | (mask << 24) | (invert << 22) }

Definition at line 1189 of file es18xx.c.

#define ES18XX_DUPLEX_MONO   0x0008 /* Has mono duplex only */

Definition at line 150 of file es18xx.c.

#define ES18XX_DUPLEX_SAME   0x0010 /* Playback and record must share the same rate */

Definition at line 151 of file es18xx.c.

#define ES18XX_HWV   0x0080 /* Has separate hardware volume mixer controls*/

Definition at line 154 of file es18xx.c.

#define ES18XX_I2S   0x0200 /* I2S mixer control */

Definition at line 156 of file es18xx.c.

#define ES18XX_MONO   0x0100 /* Mono_in mixer control */

Definition at line 155 of file es18xx.c.

#define ES18XX_MUTEREC   0x0400 /* Record source can be muted */

Definition at line 157 of file es18xx.c.

#define ES18XX_NEW_RATE   0x0020 /* More precise rate setting */

Definition at line 152 of file es18xx.c.

#define ES18XX_PCM2   0x0001 /* Has two useable PCM */

Definition at line 147 of file es18xx.c.

#define ES18XX_PM   0x07

Definition at line 161 of file es18xx.c.

#define ES18XX_PM_ANA   0x08

Definition at line 165 of file es18xx.c.

#define ES18XX_PM_FM   0x020

Definition at line 166 of file es18xx.c.

#define ES18XX_PM_GPO0   0x01

Definition at line 162 of file es18xx.c.

#define ES18XX_PM_GPO1   0x02

Definition at line 163 of file es18xx.c.

#define ES18XX_PM_PDR   0x04

Definition at line 164 of file es18xx.c.

#define ES18XX_PM_SUS   0x080

Definition at line 167 of file es18xx.c.

#define ES18XX_RECMIX   0x0004 /* Has record mixer */

Definition at line 149 of file es18xx.c.

#define ES18XX_SINGLE (   xname,
  xindex,
  reg,
  shift,
  mask,
  invert 
)
Value:
{ .iface = SNDRV_CTL_ELEM_IFACE_MIXER, .name = xname, .index = xindex, \
.info = snd_es18xx_info_single, \
.get = snd_es18xx_get_single, .put = snd_es18xx_put_single, \
.private_value = reg | (shift << 8) | (mask << 16) | (invert << 24) }

Definition at line 1139 of file es18xx.c.

#define ES18XX_SPATIALIZER   0x0002 /* Has 3D Spatializer */

Definition at line 148 of file es18xx.c.

#define HWV_IRQ   0x04

Definition at line 144 of file es18xx.c.

#define is_isapnp_selected (   dev)    0

Definition at line 2105 of file es18xx.c.

#define MILLISECOND   10000

Definition at line 174 of file es18xx.c.

#define MPU_IRQ   0x08

Definition at line 145 of file es18xx.c.

#define PFX   "es18xx: "

Definition at line 100 of file es18xx.c.

#define snd_es18xx_info_hw_switch   snd_ctl_boolean_stereo_info

Definition at line 1103 of file es18xx.c.

#define snd_es18xx_info_spatializer_enable   snd_ctl_boolean_mono_info

Definition at line 1061 of file es18xx.c.

#define SNDRV_LEGACY_FIND_FREE_DMA

Definition at line 97 of file es18xx.c.

#define SNDRV_LEGACY_FIND_FREE_IRQ

Definition at line 96 of file es18xx.c.

Function Documentation

MODULE_AUTHOR ( "Christian Fischbach <[email protected] ,
Abramo Bagnara< abramo @alsa-project.org >"   
)
MODULE_DESCRIPTION ( "ESS ES18xx AudioDrive"  )
MODULE_LICENSE ( "GPL"  )
module_param_array ( index  ,
int  ,
NULL  ,
0444   
)
module_param_array ( id  ,
charp  ,
NULL  ,
0444   
)
module_param_array ( enable  ,
bool  ,
NULL  ,
0444   
)
module_param_array ( port  ,
long  ,
NULL  ,
0444   
)
module_param_array ( mpu_port  ,
long  ,
NULL  ,
0444   
)
module_param_array ( fm_port  ,
long  ,
NULL  ,
0444   
)
module_param_array ( irq  ,
int  ,
NULL  ,
0444   
)
module_param_array ( dma1  ,
int  ,
NULL  ,
0444   
)
module_param_array ( dma2  ,
int  ,
NULL  ,
0444   
)
MODULE_PARM_DESC ( index  ,
"Index value for ES18xx soundcard."   
)
MODULE_PARM_DESC ( id  ,
"ID string for ES18xx soundcard."   
)
MODULE_PARM_DESC ( enable  ,
"Enable ES18xx soundcard."   
)
MODULE_PARM_DESC ( port  ,
"Port # for ES18xx driver."   
)
MODULE_PARM_DESC ( mpu_port  ,
"MPU-401 port # for ES18xx driver."   
)
MODULE_PARM_DESC ( fm_port  ,
"FM port # for ES18xx driver."   
)
MODULE_PARM_DESC ( irq  ,
"IRQ # for ES18xx driver."   
)
MODULE_PARM_DESC ( dma1  ,
"DMA 1 # for ES18xx driver."   
)
MODULE_PARM_DESC ( dma2  ,
"DMA 2 # for ES18xx driver."   
)
MODULE_SUPPORTED_DEVICE ( "{{ESS,ES1868 PnP AudioDrive},""{ESS,ES1869 PnP AudioDrive},""{ESS,ES1878 PnP AudioDrive},""{ESS,ES1879 PnP AudioDrive},""{ESS,ES1887 PnP AudioDrive},""{ESS,ES1888 PnP AudioDrive},""{ESS,ES1887 AudioDrive},""{ESS,ES1888 AudioDrive}}"  )