Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Data Structures | Macros | Enumerations | Functions
als4000.c File Reference
#include <asm/io.h>
#include <linux/init.h>
#include <linux/pci.h>
#include <linux/gameport.h>
#include <linux/module.h>
#include <linux/dma-mapping.h>
#include <sound/core.h>
#include <sound/pcm.h>
#include <sound/rawmidi.h>
#include <sound/mpu401.h>
#include <sound/opl3.h>
#include <sound/sb.h>
#include <sound/initval.h>

Go to the source code of this file.

Data Structures

struct  snd_card_als4000
 

Macros

#define ALS4000_FORMAT_SIGNED   (1<<0)
 
#define ALS4000_FORMAT_16BIT   (1<<1)
 
#define ALS4000_FORMAT_STEREO   (1<<2)
 
#define playback_cmd(chip)   (playback_cmd_vals[(chip)->playback_format])
 
#define capture_cmd(chip)   (capture_cmd_vals[(chip)->capture_format])
 
#define SND_ALS4000_PM_OPS   NULL
 

Enumerations

enum  als4k_iobase_t {
  ALS4K_IOD_00_AC97_ACCESS = 0x00, ALS4K_IOW_04_AC97_READ = 0x04, ALS4K_IOB_06_AC97_STATUS = 0x06, ALS4K_IOB_07_IRQSTATUS = 0x07,
  ALS4K_IOD_08_GCR_DATA = 0x08, ALS4K_IOB_0C_GCR_INDEX = 0x0c, ALS4K_IOB_0E_IRQTYPE_SB_CR1E_MPU = 0x0e, ALS4K_IOB_10_ADLIB_ADDR0 = 0x10,
  ALS4K_IOB_11_ADLIB_ADDR1 = 0x11, ALS4K_IOB_12_ADLIB_ADDR2 = 0x12, ALS4K_IOB_13_ADLIB_ADDR3 = 0x13, ALS4K_IOB_14_MIXER_INDEX = 0x14,
  ALS4K_IOB_15_MIXER_DATA = 0x15, ALS4K_IOB_16_ESP_RESET = 0x16, ALS4K_IOB_16_ACK_FOR_CR1E = 0x16, ALS4K_IOB_18_OPL_ADDR0 = 0x18,
  ALS4K_IOB_19_OPL_ADDR1 = 0x19, ALS4K_IOB_1A_ESP_RD_DATA = 0x1a, ALS4K_IOB_1C_ESP_CMD_DATA = 0x1c, ALS4K_IOB_1C_ESP_WR_STATUS = 0x1c,
  ALS4K_IOB_1E_ESP_RD_STATUS8 = 0x1e, ALS4K_IOB_1F_ESP_RD_STATUS16 = 0x1f, ALS4K_IOB_20_ESP_GAMEPORT_200 = 0x20, ALS4K_IOB_21_ESP_GAMEPORT_201 = 0x21,
  ALS4K_IOB_30_MIDI_DATA = 0x30, ALS4K_IOB_31_MIDI_STATUS = 0x31, ALS4K_IOB_31_MIDI_COMMAND = 0x31
}
 
enum  als4k_iobase_0e_t { ALS4K_IOB_0E_MPU_IRQ = 0x10, ALS4K_IOB_0E_CR1E_IRQ = 0x40, ALS4K_IOB_0E_SB_DMA_IRQ = 0x80 }
 
enum  als4k_gcr_t {
  ALS4K_GCR8C_MISC_CTRL = 0x8c, ALS4K_GCR90_TEST_MODE_REG = 0x90, ALS4K_GCR91_DMA0_ADDR = 0x91, ALS4K_GCR92_DMA0_MODE_COUNT = 0x92,
  ALS4K_GCR93_DMA1_ADDR = 0x93, ALS4K_GCR94_DMA1_MODE_COUNT = 0x94, ALS4K_GCR95_DMA3_ADDR = 0x95, ALS4K_GCR96_DMA3_MODE_COUNT = 0x96,
  ALS4K_GCR99_DMA_EMULATION_CTRL = 0x99, ALS4K_GCRA0_FIFO1_CURRENT_ADDR = 0xa0, ALS4K_GCRA1_FIFO1_STATUS_BYTECOUNT = 0xa1, ALS4K_GCRA2_FIFO2_PCIADDR = 0xa2,
  ALS4K_GCRA3_FIFO2_COUNT = 0xa3, ALS4K_GCRA4_FIFO2_CURRENT_ADDR = 0xa4, ALS4K_GCRA5_FIFO1_STATUS_BYTECOUNT = 0xa5, ALS4K_GCRA6_PM_CTRL = 0xa6,
  ALS4K_GCRA7_PCI_ACCESS_STORAGE = 0xa7, ALS4K_GCRA8_LEGACY_CFG1 = 0xa8, ALS4K_GCRA9_LEGACY_CFG2 = 0xa9, ALS4K_GCRFF_DUMMY_SCRATCH = 0xff
}
 
enum  als4k_gcr8c_t { ALS4K_GCR8C_IRQ_MASK_CTRL_ENABLE = 0x8000, ALS4K_GCR8C_CHIP_REV_MASK = 0xf0000 }
 
enum  als4k_cr_t {
  ALS4K_CR0_SB_CONFIG = 0x00, ALS4K_CR2_MISC_CONTROL = 0x02, ALS4K_CR3_CONFIGURATION = 0x03, ALS4K_CR17_FIFO_STATUS = 0x17,
  ALS4K_CR18_ESP_MAJOR_VERSION = 0x18, ALS4K_CR19_ESP_MINOR_VERSION = 0x19, ALS4K_CR1A_MPU401_UART_MODE_CONTROL = 0x1a, ALS4K_CR1C_FIFO2_BLOCK_LENGTH_LO = 0x1c,
  ALS4K_CR1D_FIFO2_BLOCK_LENGTH_HI = 0x1d, ALS4K_CR1E_FIFO2_CONTROL = 0x1e, ALS4K_CR3A_MISC_CONTROL = 0x3a, ALS4K_CR3B_CRC32_BYTE0 = 0x3b,
  ALS4K_CR3C_CRC32_BYTE1 = 0x3c, ALS4K_CR3D_CRC32_BYTE2 = 0x3d, ALS4K_CR3E_CRC32_BYTE3 = 0x3e
}
 
enum  als4k_cr0_t { ALS4K_CR0_DMA_CONTIN_MODE_CTRL = 0x02, ALS4K_CR0_DMA_90H_MODE_CTRL = 0x04, ALS4K_CR0_MX80_81_REG_WRITE_ENABLE = 0x80 }
 
enum  { CMD_WIDTH8 =0x04, CMD_SIGNED =0x10, CMD_MONO =0x80, CMD_STEREO =0xA0 }
 

Functions

 MODULE_AUTHOR ("Bart Hartgers <[email protected]>, Andreas Mohr")
 
 MODULE_DESCRIPTION ("Avance Logic ALS4000")
 
 MODULE_LICENSE ("GPL")
 
 MODULE_SUPPORTED_DEVICE ("{{Avance Logic,ALS4000}}")
 
 module_param_array (index, int, NULL, 0444)
 
 MODULE_PARM_DESC (index,"Index value for ALS4000 soundcard.")
 
 module_param_array (id, charp, NULL, 0444)
 
 MODULE_PARM_DESC (id,"ID string for ALS4000 soundcard.")
 
 module_param_array (enable, bool, NULL, 0444)
 
 MODULE_PARM_DESC (enable,"Enable ALS4000 soundcard.")
 
 MODULE_DEVICE_TABLE (pci, snd_als4000_ids)
 
 module_pci_driver (als4000_driver)
 

Macro Definition Documentation

#define ALS4000_FORMAT_16BIT   (1<<1)

Definition at line 316 of file als4000.c.

#define ALS4000_FORMAT_SIGNED   (1<<0)

Definition at line 315 of file als4000.c.

#define ALS4000_FORMAT_STEREO   (1<<2)

Definition at line 317 of file als4000.c.

#define capture_cmd (   chip)    (capture_cmd_vals[(chip)->capture_format])

Definition at line 369 of file als4000.c.

#define playback_cmd (   chip)    (playback_cmd_vals[(chip)->playback_format])

Definition at line 354 of file als4000.c.

#define SND_ALS4000_PM_OPS   NULL

Definition at line 1042 of file als4000.c.

Enumeration Type Documentation

anonymous enum
Enumerator:
CMD_WIDTH8 
CMD_SIGNED 
CMD_MONO 
CMD_STEREO 

Definition at line 357 of file als4000.c.

Enumerator:
ALS4K_CR0_DMA_CONTIN_MODE_CTRL 
ALS4K_CR0_DMA_90H_MODE_CTRL 
ALS4K_CR0_MX80_81_REG_WRITE_ENABLE 

Definition at line 263 of file als4000.c.

enum als4k_cr_t
Enumerator:
ALS4K_CR0_SB_CONFIG 
ALS4K_CR2_MISC_CONTROL 
ALS4K_CR3_CONFIGURATION 
ALS4K_CR17_FIFO_STATUS 
ALS4K_CR18_ESP_MAJOR_VERSION 
ALS4K_CR19_ESP_MINOR_VERSION 
ALS4K_CR1A_MPU401_UART_MODE_CONTROL 
ALS4K_CR1C_FIFO2_BLOCK_LENGTH_LO 
ALS4K_CR1D_FIFO2_BLOCK_LENGTH_HI 
ALS4K_CR1E_FIFO2_CONTROL 
ALS4K_CR3A_MISC_CONTROL 
ALS4K_CR3B_CRC32_BYTE0 
ALS4K_CR3C_CRC32_BYTE1 
ALS4K_CR3D_CRC32_BYTE2 
ALS4K_CR3E_CRC32_BYTE3 

Definition at line 245 of file als4000.c.

Enumerator:
ALS4K_GCR8C_IRQ_MASK_CTRL_ENABLE 
ALS4K_GCR8C_CHIP_REV_MASK 

Definition at line 186 of file als4000.c.

Enumerator:
ALS4K_GCR8C_MISC_CTRL 
ALS4K_GCR90_TEST_MODE_REG 
ALS4K_GCR91_DMA0_ADDR 
ALS4K_GCR92_DMA0_MODE_COUNT 
ALS4K_GCR93_DMA1_ADDR 
ALS4K_GCR94_DMA1_MODE_COUNT 
ALS4K_GCR95_DMA3_ADDR 
ALS4K_GCR96_DMA3_MODE_COUNT 
ALS4K_GCR99_DMA_EMULATION_CTRL 
ALS4K_GCRA0_FIFO1_CURRENT_ADDR 
ALS4K_GCRA1_FIFO1_STATUS_BYTECOUNT 
ALS4K_GCRA2_FIFO2_PCIADDR 
ALS4K_GCRA3_FIFO2_COUNT 
ALS4K_GCRA4_FIFO2_CURRENT_ADDR 
ALS4K_GCRA5_FIFO1_STATUS_BYTECOUNT 
ALS4K_GCRA6_PM_CTRL 
ALS4K_GCRA7_PCI_ACCESS_STORAGE 
ALS4K_GCRA8_LEGACY_CFG1 
ALS4K_GCRA9_LEGACY_CFG2 
ALS4K_GCRFF_DUMMY_SCRATCH 

Definition at line 163 of file als4000.c.

Enumerator:
ALS4K_IOB_0E_MPU_IRQ 
ALS4K_IOB_0E_CR1E_IRQ 
ALS4K_IOB_0E_SB_DMA_IRQ 

Definition at line 157 of file als4000.c.

Enumerator:
ALS4K_IOD_00_AC97_ACCESS 
ALS4K_IOW_04_AC97_READ 
ALS4K_IOB_06_AC97_STATUS 
ALS4K_IOB_07_IRQSTATUS 
ALS4K_IOD_08_GCR_DATA 
ALS4K_IOB_0C_GCR_INDEX 
ALS4K_IOB_0E_IRQTYPE_SB_CR1E_MPU 
ALS4K_IOB_10_ADLIB_ADDR0 
ALS4K_IOB_11_ADLIB_ADDR1 
ALS4K_IOB_12_ADLIB_ADDR2 
ALS4K_IOB_13_ADLIB_ADDR3 
ALS4K_IOB_14_MIXER_INDEX 
ALS4K_IOB_15_MIXER_DATA 
ALS4K_IOB_16_ESP_RESET 
ALS4K_IOB_16_ACK_FOR_CR1E 
ALS4K_IOB_18_OPL_ADDR0 
ALS4K_IOB_19_OPL_ADDR1 
ALS4K_IOB_1A_ESP_RD_DATA 
ALS4K_IOB_1C_ESP_CMD_DATA 
ALS4K_IOB_1C_ESP_WR_STATUS 
ALS4K_IOB_1E_ESP_RD_STATUS8 
ALS4K_IOB_1F_ESP_RD_STATUS16 
ALS4K_IOB_20_ESP_GAMEPORT_200 
ALS4K_IOB_21_ESP_GAMEPORT_201 
ALS4K_IOB_30_MIDI_DATA 
ALS4K_IOB_31_MIDI_STATUS 
ALS4K_IOB_31_MIDI_COMMAND 

Definition at line 126 of file als4000.c.

Function Documentation

MODULE_AUTHOR ( "Bart Hartgers <[email protected] ,
Andreas Mohr"   
)
MODULE_DESCRIPTION ( "Avance Logic ALS4000"  )
MODULE_DEVICE_TABLE ( pci  ,
snd_als4000_ids   
)
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_PARM_DESC ( index  ,
"Index value for ALS4000 soundcard."   
)
MODULE_PARM_DESC ( id  ,
"ID string for ALS4000 soundcard."   
)
MODULE_PARM_DESC ( enable  ,
"Enable ALS4000 soundcard."   
)
module_pci_driver ( als4000_driver  )
MODULE_SUPPORTED_DEVICE ( "{{Avance Logic,ALS4000}}"  )

Variable Documentation

unsigned char dma_off

Definition at line 335 of file als4000.c.

unsigned char dma_on

Definition at line 335 of file als4000.c.

unsigned char dsp_cmd

Definition at line 335 of file als4000.c.

unsigned char format

Definition at line 335 of file als4000.c.