Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Data Structures | Macros | Functions
opl3sa2.c File Reference
#include <linux/init.h>
#include <linux/err.h>
#include <linux/isa.h>
#include <linux/interrupt.h>
#include <linux/pm.h>
#include <linux/pnp.h>
#include <linux/module.h>
#include <sound/core.h>
#include <sound/wss.h>
#include <sound/mpu401.h>
#include <sound/opl3.h>
#include <sound/initval.h>
#include <sound/tlv.h>
#include <asm/io.h>

Go to the source code of this file.

Data Structures

struct  snd_opl3sa2
 

Macros

#define OPL3SA2_PM_CTRL   0x01
 
#define OPL3SA2_SYS_CTRL   0x02
 
#define OPL3SA2_IRQ_CONFIG   0x03
 
#define OPL3SA2_IRQ_STATUS   0x04
 
#define OPL3SA2_DMA_CONFIG   0x06
 
#define OPL3SA2_MASTER_LEFT   0x07
 
#define OPL3SA2_MASTER_RIGHT   0x08
 
#define OPL3SA2_MIC   0x09
 
#define OPL3SA2_MISC   0x0A
 
#define OPL3SA3_DGTL_DOWN   0x12
 
#define OPL3SA3_ANLG_DOWN   0x13
 
#define OPL3SA3_WIDE   0x14
 
#define OPL3SA3_BASS   0x15
 
#define OPL3SA3_TREBLE   0x16
 
#define OPL3SA2_PM_ADOWN   0x20
 
#define OPL3SA2_PM_PSV   0x04
 
#define OPL3SA2_PM_PDN   0x02
 
#define OPL3SA2_PM_PDX   0x01
 
#define OPL3SA2_PM_D0   0x00
 
#define OPL3SA2_PM_D3   (OPL3SA2_PM_ADOWN|OPL3SA2_PM_PSV|OPL3SA2_PM_PDN|OPL3SA2_PM_PDX)
 
#define PFX   "opl3sa2: "
 
#define OPL3SA2_SINGLE(xname, xindex, reg, shift, mask, invert)
 
#define OPL3SA2_SINGLE_TLV(xname, xindex, reg, shift, mask, invert, xtlv)
 
#define OPL3SA2_DOUBLE(xname, xindex, left_reg, right_reg, shift_left, shift_right, mask, invert)
 
#define OPL3SA2_DOUBLE_TLV(xname, xindex, left_reg, right_reg, shift_left, shift_right, mask, invert, xtlv)
 
#define DEV_NAME   "opl3sa2"
 

Functions

 MODULE_AUTHOR ("Jaroslav Kysela <[email protected]>")
 
 MODULE_DESCRIPTION ("Yamaha OPL3SA2+")
 
 MODULE_LICENSE ("GPL")
 
 MODULE_SUPPORTED_DEVICE ("{{Yamaha,YMF719E-S},""{Genius,Sound Maker 3DX},""{Yamaha,OPL3SA3},""{Intel,AL440LX sound},""{NeoMagic,MagicWave 3DX}}")
 
 module_param_array (index, int, NULL, 0444)
 
 MODULE_PARM_DESC (index,"Index value for OPL3-SA soundcard.")
 
 module_param_array (id, charp, NULL, 0444)
 
 MODULE_PARM_DESC (id,"ID string for OPL3-SA soundcard.")
 
 module_param_array (enable, bool, NULL, 0444)
 
 MODULE_PARM_DESC (enable,"Enable OPL3-SA soundcard.")
 
 module_param_array (port, long, NULL, 0444)
 
 MODULE_PARM_DESC (port,"Port # for OPL3-SA driver.")
 
 module_param_array (sb_port, long, NULL, 0444)
 
 MODULE_PARM_DESC (sb_port,"SB port # for OPL3-SA driver.")
 
 module_param_array (wss_port, long, NULL, 0444)
 
 MODULE_PARM_DESC (wss_port,"WSS port # for OPL3-SA driver.")
 
 module_param_array (fm_port, long, NULL, 0444)
 
 MODULE_PARM_DESC (fm_port,"FM port # for OPL3-SA driver.")
 
 module_param_array (midi_port, long, NULL, 0444)
 
 MODULE_PARM_DESC (midi_port,"MIDI port # for OPL3-SA driver.")
 
 module_param_array (irq, int, NULL, 0444)
 
 MODULE_PARM_DESC (irq,"IRQ # for OPL3-SA driver.")
 
 module_param_array (dma1, int, NULL, 0444)
 
 MODULE_PARM_DESC (dma1,"DMA1 # for OPL3-SA driver.")
 
 module_param_array (dma2, int, NULL, 0444)
 
 MODULE_PARM_DESC (dma2,"DMA2 # for OPL3-SA driver.")
 
 module_param_array (opl3sa3_ymode, int, NULL, 0444)
 
 MODULE_PARM_DESC (opl3sa3_ymode,"Speaker size selection for 3D Enhancement mode: Desktop/Large Notebook/Small Notebook/HiFi.")
 

Macro Definition Documentation

#define DEV_NAME   "opl3sa2"

Definition at line 920 of file opl3sa2.c.

#define OPL3SA2_DMA_CONFIG   0x06

Definition at line 103 of file opl3sa2.c.

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

Definition at line 397 of file opl3sa2.c.

#define OPL3SA2_DOUBLE_TLV (   xname,
  xindex,
  left_reg,
  right_reg,
  shift_left,
  shift_right,
  mask,
  invert,
  xtlv 
)
Value:
.name = xname, .index = xindex, \
.get = snd_opl3sa2_get_double, .put = snd_opl3sa2_put_double, \
.private_value = left_reg | (right_reg << 8) | (shift_left << 16) | (shift_right << 19) | (mask << 24) | (invert << 22), \
.tlv = { .p = (xtlv) } }

Definition at line 402 of file opl3sa2.c.

#define OPL3SA2_IRQ_CONFIG   0x03

Definition at line 101 of file opl3sa2.c.

#define OPL3SA2_IRQ_STATUS   0x04

Definition at line 102 of file opl3sa2.c.

#define OPL3SA2_MASTER_LEFT   0x07

Definition at line 104 of file opl3sa2.c.

#define OPL3SA2_MASTER_RIGHT   0x08

Definition at line 105 of file opl3sa2.c.

#define OPL3SA2_MIC   0x09

Definition at line 106 of file opl3sa2.c.

#define OPL3SA2_MISC   0x0A

Definition at line 107 of file opl3sa2.c.

#define OPL3SA2_PM_ADOWN   0x20

Definition at line 117 of file opl3sa2.c.

#define OPL3SA2_PM_CTRL   0x01

Definition at line 99 of file opl3sa2.c.

#define OPL3SA2_PM_D0   0x00

Definition at line 122 of file opl3sa2.c.

Definition at line 123 of file opl3sa2.c.

#define OPL3SA2_PM_PDN   0x02

Definition at line 119 of file opl3sa2.c.

#define OPL3SA2_PM_PDX   0x01

Definition at line 120 of file opl3sa2.c.

#define OPL3SA2_PM_PSV   0x04

Definition at line 118 of file opl3sa2.c.

#define OPL3SA2_SINGLE (   xname,
  xindex,
  reg,
  shift,
  mask,
  invert 
)
Value:
{ .iface = SNDRV_CTL_ELEM_IFACE_MIXER, .name = xname, .index = xindex, \
.get = snd_opl3sa2_get_single, .put = snd_opl3sa2_put_single, \
.private_value = reg | (shift << 8) | (mask << 16) | (invert << 24) }

Definition at line 342 of file opl3sa2.c.

#define OPL3SA2_SINGLE_TLV (   xname,
  xindex,
  reg,
  shift,
  mask,
  invert,
  xtlv 
)
Value:
.name = xname, .index = xindex, \
.get = snd_opl3sa2_get_single, .put = snd_opl3sa2_put_single, \
.private_value = reg | (shift << 8) | (mask << 16) | (invert << 24), \
.tlv = { .p = (xtlv) } }

Definition at line 347 of file opl3sa2.c.

#define OPL3SA2_SYS_CTRL   0x02

Definition at line 100 of file opl3sa2.c.

#define OPL3SA3_ANLG_DOWN   0x13

Definition at line 111 of file opl3sa2.c.

#define OPL3SA3_BASS   0x15

Definition at line 113 of file opl3sa2.c.

#define OPL3SA3_DGTL_DOWN   0x12

Definition at line 110 of file opl3sa2.c.

#define OPL3SA3_TREBLE   0x16

Definition at line 114 of file opl3sa2.c.

#define OPL3SA3_WIDE   0x14

Definition at line 112 of file opl3sa2.c.

#define PFX   "opl3sa2: "

Definition at line 141 of file opl3sa2.c.

Function Documentation

MODULE_AUTHOR ( "Jaroslav Kysela <[email protected]>"  )
MODULE_DESCRIPTION ( "Yamaha OPL3SA2+"  )
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 ( sb_port  ,
long  ,
NULL  ,
0444   
)
module_param_array ( wss_port  ,
long  ,
NULL  ,
0444   
)
module_param_array ( fm_port  ,
long  ,
NULL  ,
0444   
)
module_param_array ( midi_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_param_array ( opl3sa3_ymode  ,
int  ,
NULL  ,
0444   
)
MODULE_PARM_DESC ( index  ,
"Index value for OPL3-SA soundcard."   
)
MODULE_PARM_DESC ( id  ,
"ID string for OPL3-SA soundcard."   
)
MODULE_PARM_DESC ( enable  ,
"Enable OPL3-SA soundcard."   
)
MODULE_PARM_DESC ( port  ,
"Port # for OPL3-SA driver."   
)
MODULE_PARM_DESC ( sb_port  ,
"SB port # for OPL3-SA driver."   
)
MODULE_PARM_DESC ( wss_port  ,
"WSS port # for OPL3-SA driver."   
)
MODULE_PARM_DESC ( fm_port  ,
"FM port # for OPL3-SA driver."   
)
MODULE_PARM_DESC ( midi_port  ,
"MIDI port # for OPL3-SA driver."   
)
MODULE_PARM_DESC ( irq  ,
"IRQ # for OPL3-SA driver."   
)
MODULE_PARM_DESC ( dma1  ,
"DMA1 # for OPL3-SA driver."   
)
MODULE_PARM_DESC ( dma2  ,
"DMA2 # for OPL3-SA driver."   
)
MODULE_PARM_DESC ( opl3sa3_ymode  ,
"Speaker size selection for 3D Enhancement mode: Desktop/Large Notebook/Small Notebook/HiFi."   
)
MODULE_SUPPORTED_DEVICE ( "{{Yamaha,YMF719E-S},""{Genius,Sound Maker 3DX},""{Yamaha,OPL3SA3},""{Intel,AL440LX sound},""{NeoMagic,MagicWave 3DX}}"  )