|
Linux Kernel
3.7.1
|
#include <asm/io.h>#include <linux/delay.h>#include <linux/interrupt.h>#include <linux/init.h>#include <linux/pci.h>#include <linux/dma-mapping.h>#include <linux/slab.h>#include <linux/gameport.h>#include <linux/module.h>#include <linux/mutex.h>#include <linux/input.h>#include <sound/core.h>#include <sound/pcm.h>#include <sound/mpu401.h>#include <sound/ac97_codec.h>#include <sound/initval.h>Go to the source code of this file.
Data Structures | |
| struct | esm_memory |
| struct | esschan |
| struct | es1968 |
| struct | ess_device_list |
Macros | |
| #define | CARD_NAME "ESS Maestro1/2" |
| #define | DRIVER_NAME "ES1968" |
| #define | NR_APUS 64 |
| #define | NR_APU_REGS 16 |
| #define | NEC_VERSA_SUBID1 0x80581033 |
| #define | NEC_VERSA_SUBID2 0x803c1033 |
| #define | ESS_FMT_STEREO 0x01 |
| #define | ESS_FMT_16BIT 0x02 |
| #define | DAC_RUNNING 1 |
| #define | ADC_RUNNING 2 |
| #define | ESS_DISABLE_AUDIO 0x8000 |
| #define | ESS_ENABLE_SERIAL_IRQ 0x4000 |
| #define | IO_ADRESS_ALIAS 0x0020 |
| #define | MPU401_IRQ_ENABLE 0x0010 |
| #define | MPU401_IO_ENABLE 0x0008 |
| #define | GAME_IO_ENABLE 0x0004 |
| #define | FM_IO_ENABLE 0x0002 |
| #define | SB_IO_ENABLE 0x0001 |
| #define | PIC_SNOOP1 0x4000 |
| #define | PIC_SNOOP2 0x2000 |
| #define | SAFEGUARD 0x0800 |
| #define | DMA_CLEAR 0x0700 |
| #define | DMA_DDMA 0x0000 |
| #define | DMA_TDMA 0x0100 |
| #define | DMA_PCPCI 0x0200 |
| #define | POST_WRITE 0x0080 |
| #define | PCI_TIMING 0x0040 |
| #define | SWAP_LR 0x0020 |
| #define | SUBTR_DECODE 0x0002 |
| #define | SPDIF_CONFB 0x0100 |
| #define | HWV_CONFB 0x0080 |
| #define | DEBOUNCE 0x0040 |
| #define | GPIO_CONFB 0x0020 |
| #define | CHI_CONFB 0x0010 |
| #define | IDMA_CONFB 0x0008 /*undoc */ |
| #define | MIDI_FIX 0x0004 /*undoc */ |
| #define | IRQ_TO_ISA 0x0001 /*undoc */ |
| #define | RINGB_2CODEC_ID_MASK 0x0003 |
| #define | RINGB_DIS_VALIDATION 0x0008 |
| #define | RINGB_EN_SPDIF 0x0010 |
| #define | RINGB_EN_2CODEC 0x0020 |
| #define | RINGB_SING_BIT_DUAL 0x0040 |
| #define | ESM_INDEX 0x02 |
| #define | ESM_DATA 0x00 |
| #define | ESM_AC97_INDEX 0x30 |
| #define | ESM_AC97_DATA 0x32 |
| #define | ESM_RING_BUS_DEST 0x34 |
| #define | ESM_RING_BUS_CONTR_A 0x36 |
| #define | ESM_RING_BUS_CONTR_B 0x38 |
| #define | ESM_RING_BUS_SDO 0x3A |
| #define | WC_INDEX 0x10 |
| #define | WC_DATA 0x12 |
| #define | WC_CONTROL 0x14 |
| #define | ASSP_INDEX 0x80 |
| #define | ASSP_MEMORY 0x82 |
| #define | ASSP_DATA 0x84 |
| #define | ASSP_CONTROL_A 0xA2 |
| #define | ASSP_CONTROL_B 0xA4 |
| #define | ASSP_CONTROL_C 0xA6 |
| #define | ASSP_HOSTW_INDEX 0xA8 |
| #define | ASSP_HOSTW_DATA 0xAA |
| #define | ASSP_HOSTW_IRQ 0xAC |
| #define | ESM_MPU401_PORT 0x98 |
| #define | ESM_PORT_HOST_IRQ 0x18 |
| #define | IDR0_DATA_PORT 0x00 |
| #define | IDR1_CRAM_POINTER 0x01 |
| #define | IDR2_CRAM_DATA 0x02 |
| #define | IDR3_WAVE_DATA 0x03 |
| #define | IDR4_WAVE_PTR_LOW 0x04 |
| #define | IDR5_WAVE_PTR_HI 0x05 |
| #define | IDR6_TIMER_CTRL 0x06 |
| #define | IDR7_WAVE_ROMRAM 0x07 |
| #define | WRITEABLE_MAP 0xEFFFFF |
| #define | READABLE_MAP 0x64003F |
| #define | ESM_LEGACY_AUDIO_CONTROL 0x40 |
| #define | ESM_ACPI_COMMAND 0x54 |
| #define | ESM_CONFIG_A 0x50 |
| #define | ESM_CONFIG_B 0x52 |
| #define | ESM_DDMA 0x60 |
| #define | ESM_BOB_ENABLE 0x0001 |
| #define | ESM_BOB_START 0x0001 |
| #define | ESM_RESET_MAESTRO 0x8000 |
| #define | ESM_RESET_DIRECTSOUND 0x4000 |
| #define | ESM_HIRQ_ClkRun 0x0100 |
| #define | ESM_HIRQ_HW_VOLUME 0x0040 |
| #define | ESM_HIRQ_HARPO 0x0030 /* What's that? */ |
| #define | ESM_HIRQ_ASSP 0x0010 |
| #define | ESM_HIRQ_DSIE 0x0004 |
| #define | ESM_HIRQ_MPU401 0x0002 |
| #define | ESM_HIRQ_SB 0x0001 |
| #define | ESM_MPU401_IRQ 0x02 |
| #define | ESM_SB_IRQ 0x01 |
| #define | ESM_SOUND_IRQ 0x04 |
| #define | ESM_ASSP_IRQ 0x10 |
| #define | ESM_HWVOL_IRQ 0x40 |
| #define | ESS_SYSCLK 50000000 |
| #define | ESM_BOB_FREQ 200 |
| #define | ESM_BOB_FREQ_MAX 800 |
| #define | ESM_FREQ_ESM1 (49152000L / 1024L) /* default rate 48000 */ |
| #define | ESM_FREQ_ESM2 (50000000L / 1024L) |
| #define | ESM_APU_MODE_SHIFT 4 |
| #define | ESM_APU_MODE_MASK (0xf << 4) |
| #define | ESM_APU_OFF 0x00 |
| #define | ESM_APU_16BITLINEAR 0x01 /* 16-Bit Linear Sample Player */ |
| #define | ESM_APU_16BITSTEREO 0x02 /* 16-Bit Stereo Sample Player */ |
| #define | ESM_APU_8BITLINEAR 0x03 /* 8-Bit Linear Sample Player */ |
| #define | ESM_APU_8BITSTEREO 0x04 /* 8-Bit Stereo Sample Player */ |
| #define | ESM_APU_8BITDIFF 0x05 /* 8-Bit Differential Sample Playrer */ |
| #define | ESM_APU_DIGITALDELAY 0x06 /* Digital Delay Line */ |
| #define | ESM_APU_DUALTAP 0x07 /* Dual Tap Reader */ |
| #define | ESM_APU_CORRELATOR 0x08 /* Correlator */ |
| #define | ESM_APU_INPUTMIXER 0x09 /* Input Mixer */ |
| #define | ESM_APU_WAVETABLE 0x0A /* Wave Table Mode */ |
| #define | ESM_APU_SRCONVERTOR 0x0B /* Sample Rate Convertor */ |
| #define | ESM_APU_16BITPINGPONG 0x0C /* 16-Bit Ping-Pong Sample Player */ |
| #define | ESM_APU_RESERVED1 0x0D /* Reserved 1 */ |
| #define | ESM_APU_RESERVED2 0x0E /* Reserved 2 */ |
| #define | ESM_APU_RESERVED3 0x0F /* Reserved 3 */ |
| #define | ESM_APU_FILTER_Q_SHIFT 0 |
| #define | ESM_APU_FILTER_Q_MASK (3 << 0) |
| #define | ESM_APU_FILTER_LESSQ 0x00 |
| #define | ESM_APU_FILTER_MOREQ 0x03 |
| #define | ESM_APU_FILTER_TYPE_SHIFT 2 |
| #define | ESM_APU_FILTER_TYPE_MASK (3 << 2) |
| #define | ESM_APU_ENV_TYPE_SHIFT 8 |
| #define | ESM_APU_ENV_TYPE_MASK (3 << 8) |
| #define | ESM_APU_ENV_STATE_SHIFT 10 |
| #define | ESM_APU_ENV_STATE_MASK (3 << 10) |
| #define | ESM_APU_END_CURVE (1 << 12) |
| #define | ESM_APU_INT_ON_LOOP (1 << 13) |
| #define | ESM_APU_DMA_ENABLE (1 << 14) |
| #define | ESM_APU_SUBMIX_GROUP_SHIRT 0 |
| #define | ESM_APU_SUBMIX_GROUP_MASK (7 << 0) |
| #define | ESM_APU_SUBMIX_MODE (1 << 3) |
| #define | ESM_APU_6dB (1 << 4) |
| #define | ESM_APU_DUAL_EFFECT (1 << 5) |
| #define | ESM_APU_EFFECT_CHANNELS_SHIFT 6 |
| #define | ESM_APU_EFFECT_CHANNELS_MASK (3 << 6) |
| #define | ESM_APU_STEP_SIZE_MASK 0x0fff |
| #define | ESM_APU_PHASE_SHIFT 0 |
| #define | ESM_APU_PHASE_MASK (0xff << 0) |
| #define | ESM_APU_WAVE64K_PAGE_SHIFT 8 /* most 8bit of wave start offset */ |
| #define | ESM_APU_WAVE64K_PAGE_MASK (0xff << 8) |
| #define | ESM_APU_EFFECT_GAIN_SHIFT 0 |
| #define | ESM_APU_EFFECT_GAIN_MASK (0xff << 0) |
| #define | ESM_APU_TREMOLO_DEPTH_SHIFT 8 |
| #define | ESM_APU_TREMOLO_DEPTH_MASK (0xf << 8) |
| #define | ESM_APU_TREMOLO_RATE_SHIFT 12 |
| #define | ESM_APU_TREMOLO_RATE_MASK (0xf << 12) |
| #define | ESM_APU_AMPLITUDE_NOW_SHIFT 8 |
| #define | ESM_APU_AMPLITUDE_NOW_MASK (0xff << 8) |
| #define | ESM_APU_POLAR_PAN_SHIFT 0 |
| #define | ESM_APU_POLAR_PAN_MASK (0x3f << 0) |
| #define | ESM_APU_PAN_CENTER_CIRCLE 0x00 |
| #define | ESM_APU_PAN_MIDDLE_RADIUS 0x01 |
| #define | ESM_APU_PAN_OUTSIDE_RADIUS 0x02 |
| #define | ESM_APU_FILTER_TUNING_SHIFT 8 |
| #define | ESM_APU_FILTER_TUNING_MASK (0xff << 8) |
| #define | ESM_APU_DATA_SRC_A_SHIFT 0 |
| #define | ESM_APU_DATA_SRC_A_MASK (0x7f << 0) |
| #define | ESM_APU_INV_POL_A (1 << 7) |
| #define | ESM_APU_DATA_SRC_B_SHIFT 8 |
| #define | ESM_APU_DATA_SRC_B_MASK (0x7f << 8) |
| #define | ESM_APU_INV_POL_B (1 << 15) |
| #define | ESM_APU_VIBRATO_RATE_SHIFT 0 |
| #define | ESM_APU_VIBRATO_RATE_MASK (0xf << 0) |
| #define | ESM_APU_VIBRATO_DEPTH_SHIFT 4 |
| #define | ESM_APU_VIBRATO_DEPTH_MASK (0xf << 4) |
| #define | ESM_APU_VIBRATO_PHASE_SHIFT 8 |
| #define | ESM_APU_VIBRATO_PHASE_MASK (0xff << 8) |
| #define | ESM_APU_RADIUS_SELECT (1 << 6) |
| #define | ESM_APU_FILTER_2POLE_LOPASS 0x00 |
| #define | ESM_APU_FILTER_2POLE_BANDPASS 0x01 |
| #define | ESM_APU_FILTER_2POLE_HIPASS 0x02 |
| #define | ESM_APU_FILTER_1POLE_LOPASS 0x03 |
| #define | ESM_APU_FILTER_1POLE_HIPASS 0x04 |
| #define | ESM_APU_FILTER_OFF 0x05 |
| #define | ESM_APU_ATFP_AMPLITUDE 0x00 |
| #define | ESM_APU_ATFP_TREMELO 0x01 |
| #define | ESM_APU_ATFP_FILTER 0x02 |
| #define | ESM_APU_ATFP_PAN 0x03 |
| #define | ESM_APU_ATFP_FLG_OFF 0x00 |
| #define | ESM_APU_ATFP_FLG_WAIT 0x01 |
| #define | ESM_APU_ATFP_FLG_DONE 0x02 |
| #define | ESM_APU_ATFP_FLG_INPROCESS 0x03 |
| #define | ESM_MEM_ALIGN 0x1000 |
| #define | ESM_MIXBUF_SIZE 0x400 |
| #define | ESM_MODE_PLAY 0 |
| #define | ESM_MODE_CAPTURE 1 |
| #define | CLOCK_MEASURE_BUFSIZE 16768 /* enough large for a single shot */ |
| #define | ES1968_PM_OPS NULL |
Enumerations | |
| enum | snd_enum_apu_type { ESM_APU_PCM_PLAY, ESM_APU_PCM_CAPTURE, ESM_APU_PCM_RATECONV, ESM_APU_FREE } |
| enum | { TYPE_MAESTRO, TYPE_MAESTRO2, TYPE_MAESTRO2E } |
Functions | |
| MODULE_DESCRIPTION ("ESS Maestro") | |
| MODULE_LICENSE ("GPL") | |
| MODULE_SUPPORTED_DEVICE ("{{ESS,Maestro 2e},""{ESS,Maestro 2},""{ESS,Maestro 1},""{TerraTec,DMX}}") | |
| module_param_array (index, int, NULL, 0444) | |
| MODULE_PARM_DESC (index,"Index value for "CARD_NAME" soundcard.") | |
| module_param_array (id, charp, NULL, 0444) | |
| MODULE_PARM_DESC (id,"ID string for "CARD_NAME" soundcard.") | |
| module_param_array (enable, bool, NULL, 0444) | |
| MODULE_PARM_DESC (enable,"Enable "CARD_NAME" soundcard.") | |
| module_param_array (total_bufsize, int, NULL, 0444) | |
| MODULE_PARM_DESC (total_bufsize,"Total buffer size in kB.") | |
| module_param_array (pcm_substreams_p, int, NULL, 0444) | |
| MODULE_PARM_DESC (pcm_substreams_p,"PCM Playback substreams for "CARD_NAME" soundcard.") | |
| module_param_array (pcm_substreams_c, int, NULL, 0444) | |
| MODULE_PARM_DESC (pcm_substreams_c,"PCM Capture substreams for "CARD_NAME" soundcard.") | |
| module_param_array (clock, int, NULL, 0444) | |
| MODULE_PARM_DESC (clock,"Clock on "CARD_NAME" soundcard. (0 = auto-detect)") | |
| module_param_array (use_pm, int, NULL, 0444) | |
| MODULE_PARM_DESC (use_pm,"Toggle power-management. (0 = off, 1 = on, 2 = auto)") | |
| module_param_array (enable_mpu, int, NULL, 0444) | |
| MODULE_PARM_DESC (enable_mpu,"Enable MPU401. (0 = off, 1 = on, 2 = auto)") | |
| module_param_array (radio_nr, int, NULL, 0444) | |
| MODULE_PARM_DESC (radio_nr,"Radio device numbers") | |
| MODULE_DEVICE_TABLE (pci, snd_es1968_ids) | |
| module_pci_driver (es1968_driver) | |
| #define ESM_APU_16BITLINEAR 0x01 /* 16-Bit Linear Sample Player */ |
| #define ESM_APU_16BITPINGPONG 0x0C /* 16-Bit Ping-Pong Sample Player */ |
| #define ESM_APU_16BITSTEREO 0x02 /* 16-Bit Stereo Sample Player */ |
| #define ESM_APU_8BITDIFF 0x05 /* 8-Bit Differential Sample Playrer */ |
| #define ESM_APU_8BITLINEAR 0x03 /* 8-Bit Linear Sample Player */ |
| #define ESM_APU_8BITSTEREO 0x04 /* 8-Bit Stereo Sample Player */ |
| #define ESM_APU_SRCONVERTOR 0x0B /* Sample Rate Convertor */ |
| #define ESM_APU_WAVE64K_PAGE_SHIFT 8 /* most 8bit of wave start offset */ |
| #define ESM_FREQ_ESM1 (49152000L / 1024L) /* default rate 48000 */ |
| anonymous enum |
| enum snd_enum_apu_type |
| MODULE_DESCRIPTION | ( | "ESS Maestro" | ) |
| MODULE_DEVICE_TABLE | ( | pci | , |
| snd_es1968_ids | |||
| ) |
| MODULE_LICENSE | ( | "GPL" | ) |
| MODULE_PARM_DESC | ( | enable | , |
| "Enable "CARD_NAME" soundcard." | |||
| ) |
| MODULE_PARM_DESC | ( | pcm_substreams_p | , |
| "PCM Playback substreams for "CARD_NAME" soundcard." | |||
| ) |
| MODULE_PARM_DESC | ( | pcm_substreams_c | , |
| "PCM Capture substreams for "CARD_NAME" soundcard." | |||
| ) |
| MODULE_PARM_DESC | ( | clock | , |
| "Clock on "CARD_NAME" soundcard. (0 = auto-detect)" | |||
| ) |
| MODULE_PARM_DESC | ( | use_pm | , |
| "Toggle power-management. (0 = off, 1 = on, 2 = auto)" | |||
| ) |
| MODULE_PARM_DESC | ( | enable_mpu | , |
| "Enable MPU401. (0 = off, 1 = on, 2 = auto)" | |||
| ) |
| MODULE_PARM_DESC | ( | radio_nr | , |
| "Radio device numbers" | |||
| ) |
| module_pci_driver | ( | es1968_driver | ) |
| MODULE_SUPPORTED_DEVICE | ( | "{{ESS,Maestro 2e},""{ESS,Maestro 2},""{ESS,Maestro 1},""{TerraTec,DMX}}" | ) |
1.8.2