Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Data Structures | Macros | Functions
rme96.c File Reference
#include <linux/delay.h>
#include <linux/init.h>
#include <linux/interrupt.h>
#include <linux/pci.h>
#include <linux/module.h>
#include <sound/core.h>
#include <sound/info.h>
#include <sound/control.h>
#include <sound/pcm.h>
#include <sound/pcm_params.h>
#include <sound/asoundef.h>
#include <sound/initval.h>
#include <asm/io.h>

Go to the source code of this file.

Data Structures

struct  rme96
 

Macros

#define RME96_SPDIF_NCHANNELS   2
 
#define RME96_BUFFER_SIZE   0x10000
 
#define RME96_IO_SIZE   0x60000
 
#define RME96_IO_PLAY_BUFFER   0x0
 
#define RME96_IO_REC_BUFFER   0x10000
 
#define RME96_IO_CONTROL_REGISTER   0x20000
 
#define RME96_IO_ADDITIONAL_REG   0x20004
 
#define RME96_IO_CONFIRM_PLAY_IRQ   0x20008
 
#define RME96_IO_CONFIRM_REC_IRQ   0x2000C
 
#define RME96_IO_SET_PLAY_POS   0x40000
 
#define RME96_IO_RESET_PLAY_POS   0x4FFFC
 
#define RME96_IO_SET_REC_POS   0x50000
 
#define RME96_IO_RESET_REC_POS   0x5FFFC
 
#define RME96_IO_GET_PLAY_POS   0x20000
 
#define RME96_IO_GET_REC_POS   0x30000
 
#define RME96_WCR_START   (1 << 0)
 
#define RME96_WCR_START_2   (1 << 1)
 
#define RME96_WCR_GAIN_0   (1 << 2)
 
#define RME96_WCR_GAIN_1   (1 << 3)
 
#define RME96_WCR_MODE24   (1 << 4)
 
#define RME96_WCR_MODE24_2   (1 << 5)
 
#define RME96_WCR_BM   (1 << 6)
 
#define RME96_WCR_BM_2   (1 << 7)
 
#define RME96_WCR_ADAT   (1 << 8)
 
#define RME96_WCR_FREQ_0   (1 << 9)
 
#define RME96_WCR_FREQ_1   (1 << 10)
 
#define RME96_WCR_DS   (1 << 11)
 
#define RME96_WCR_PRO   (1 << 12)
 
#define RME96_WCR_EMP   (1 << 13)
 
#define RME96_WCR_SEL   (1 << 14)
 
#define RME96_WCR_MASTER   (1 << 15)
 
#define RME96_WCR_PD   (1 << 16)
 
#define RME96_WCR_INP_0   (1 << 17)
 
#define RME96_WCR_INP_1   (1 << 18)
 
#define RME96_WCR_THRU_0   (1 << 19)
 
#define RME96_WCR_THRU_1   (1 << 20)
 
#define RME96_WCR_THRU_2   (1 << 21)
 
#define RME96_WCR_THRU_3   (1 << 22)
 
#define RME96_WCR_THRU_4   (1 << 23)
 
#define RME96_WCR_THRU_5   (1 << 24)
 
#define RME96_WCR_THRU_6   (1 << 25)
 
#define RME96_WCR_THRU_7   (1 << 26)
 
#define RME96_WCR_DOLBY   (1 << 27)
 
#define RME96_WCR_MONITOR_0   (1 << 28)
 
#define RME96_WCR_MONITOR_1   (1 << 29)
 
#define RME96_WCR_ISEL   (1 << 30)
 
#define RME96_WCR_IDIS   (1 << 31)
 
#define RME96_WCR_BITPOS_GAIN_0   2
 
#define RME96_WCR_BITPOS_GAIN_1   3
 
#define RME96_WCR_BITPOS_FREQ_0   9
 
#define RME96_WCR_BITPOS_FREQ_1   10
 
#define RME96_WCR_BITPOS_INP_0   17
 
#define RME96_WCR_BITPOS_INP_1   18
 
#define RME96_WCR_BITPOS_MONITOR_0   28
 
#define RME96_WCR_BITPOS_MONITOR_1   29
 
#define RME96_RCR_AUDIO_ADDR_MASK   0xFFFF
 
#define RME96_RCR_IRQ_2   (1 << 16)
 
#define RME96_RCR_T_OUT   (1 << 17)
 
#define RME96_RCR_DEV_ID_0   (1 << 21)
 
#define RME96_RCR_DEV_ID_1   (1 << 22)
 
#define RME96_RCR_LOCK   (1 << 23)
 
#define RME96_RCR_VERF   (1 << 26)
 
#define RME96_RCR_F0   (1 << 27)
 
#define RME96_RCR_F1   (1 << 28)
 
#define RME96_RCR_F2   (1 << 29)
 
#define RME96_RCR_AUTOSYNC   (1 << 30)
 
#define RME96_RCR_IRQ   (1 << 31)
 
#define RME96_RCR_BITPOS_F0   27
 
#define RME96_RCR_BITPOS_F1   28
 
#define RME96_RCR_BITPOS_F2   29
 
#define RME96_AR_WSEL   (1 << 0)
 
#define RME96_AR_ANALOG   (1 << 1)
 
#define RME96_AR_FREQPAD_0   (1 << 2)
 
#define RME96_AR_FREQPAD_1   (1 << 3)
 
#define RME96_AR_FREQPAD_2   (1 << 4)
 
#define RME96_AR_PD2   (1 << 5)
 
#define RME96_AR_DAC_EN   (1 << 6)
 
#define RME96_AR_CLATCH   (1 << 7)
 
#define RME96_AR_CCLK   (1 << 8)
 
#define RME96_AR_CDATA   (1 << 9)
 
#define RME96_AR_BITPOS_F0   2
 
#define RME96_AR_BITPOS_F1   3
 
#define RME96_AR_BITPOS_F2   4
 
#define RME96_MONITOR_TRACKS_1_2   0
 
#define RME96_MONITOR_TRACKS_3_4   1
 
#define RME96_MONITOR_TRACKS_5_6   2
 
#define RME96_MONITOR_TRACKS_7_8   3
 
#define RME96_ATTENUATION_0   0
 
#define RME96_ATTENUATION_6   1
 
#define RME96_ATTENUATION_12   2
 
#define RME96_ATTENUATION_18   3
 
#define RME96_INPUT_OPTICAL   0
 
#define RME96_INPUT_COAXIAL   1
 
#define RME96_INPUT_INTERNAL   2
 
#define RME96_INPUT_XLR   3
 
#define RME96_INPUT_ANALOG   4
 
#define RME96_CLOCKMODE_SLAVE   0
 
#define RME96_CLOCKMODE_MASTER   1
 
#define RME96_CLOCKMODE_WORDCLOCK   2
 
#define RME96_SMALL_BLOCK_SIZE   2048
 
#define RME96_LARGE_BLOCK_SIZE   8192
 
#define RME96_AD1852_VOL_BITS   14
 
#define RME96_AD1855_VOL_BITS   10
 
#define RME96_ISPLAYING(rme96)   ((rme96)->wcreg & RME96_WCR_START)
 
#define RME96_ISRECORDING(rme96)   ((rme96)->wcreg & RME96_WCR_START_2)
 
#define RME96_HAS_ANALOG_IN(rme96)   ((rme96)->pci->device == PCI_DEVICE_ID_RME_DIGI96_8_PAD_OR_PST)
 
#define RME96_HAS_ANALOG_OUT(rme96)
 
#define RME96_DAC_IS_1852(rme96)   (RME96_HAS_ANALOG_OUT(rme96) && (rme96)->rev >= 4)
 
#define RME96_DAC_IS_1855(rme96)
 
#define RME96_185X_MAX_OUT(rme96)   ((1 << (RME96_DAC_IS_1852(rme96) ? RME96_AD1852_VOL_BITS : RME96_AD1855_VOL_BITS)) - 1)
 
#define snd_rme96_info_loopback_control   snd_ctl_boolean_mono_info
 

Functions

 MODULE_AUTHOR ("Anders Torger <[email protected]>")
 
 MODULE_DESCRIPTION ("RME Digi96, Digi96/8, Digi96/8 PRO, Digi96/8 PST, ""Digi96/8 PAD")
 
 MODULE_LICENSE ("GPL")
 
 MODULE_SUPPORTED_DEVICE ("{{RME,Digi96},""{RME,Digi96/8},""{RME,Digi96/8 PRO},""{RME,Digi96/8 PST},""{RME,Digi96/8 PAD}}")
 
 module_param_array (index, int, NULL, 0444)
 
 MODULE_PARM_DESC (index,"Index value for RME Digi96 soundcard.")
 
 module_param_array (id, charp, NULL, 0444)
 
 MODULE_PARM_DESC (id,"ID string for RME Digi96 soundcard.")
 
 module_param_array (enable, bool, NULL, 0444)
 
 MODULE_PARM_DESC (enable,"Enable RME Digi96 soundcard.")
 
 MODULE_DEVICE_TABLE (pci, snd_rme96_ids)
 
 module_pci_driver (rme96_driver)
 

Macro Definition Documentation

#define RME96_185X_MAX_OUT (   rme96)    ((1 << (RME96_DAC_IS_1852(rme96) ? RME96_AD1852_VOL_BITS : RME96_AD1855_VOL_BITS)) - 1)

Definition at line 251 of file rme96.c.

#define RME96_AD1852_VOL_BITS   14

Definition at line 198 of file rme96.c.

#define RME96_AD1855_VOL_BITS   10

Definition at line 199 of file rme96.c.

#define RME96_AR_ANALOG   (1 << 1)

Definition at line 155 of file rme96.c.

#define RME96_AR_BITPOS_F0   2

Definition at line 165 of file rme96.c.

#define RME96_AR_BITPOS_F1   3

Definition at line 166 of file rme96.c.

#define RME96_AR_BITPOS_F2   4

Definition at line 167 of file rme96.c.

#define RME96_AR_CCLK   (1 << 8)

Definition at line 162 of file rme96.c.

#define RME96_AR_CDATA   (1 << 9)

Definition at line 163 of file rme96.c.

#define RME96_AR_CLATCH   (1 << 7)

Definition at line 161 of file rme96.c.

#define RME96_AR_DAC_EN   (1 << 6)

Definition at line 160 of file rme96.c.

#define RME96_AR_FREQPAD_0   (1 << 2)

Definition at line 156 of file rme96.c.

#define RME96_AR_FREQPAD_1   (1 << 3)

Definition at line 157 of file rme96.c.

#define RME96_AR_FREQPAD_2   (1 << 4)

Definition at line 158 of file rme96.c.

#define RME96_AR_PD2   (1 << 5)

Definition at line 159 of file rme96.c.

#define RME96_AR_WSEL   (1 << 0)

Definition at line 154 of file rme96.c.

#define RME96_ATTENUATION_0   0

Definition at line 176 of file rme96.c.

#define RME96_ATTENUATION_12   2

Definition at line 178 of file rme96.c.

#define RME96_ATTENUATION_18   3

Definition at line 179 of file rme96.c.

#define RME96_ATTENUATION_6   1

Definition at line 177 of file rme96.c.

#define RME96_BUFFER_SIZE   0x10000

Definition at line 73 of file rme96.c.

#define RME96_CLOCKMODE_MASTER   1

Definition at line 190 of file rme96.c.

#define RME96_CLOCKMODE_SLAVE   0

Definition at line 189 of file rme96.c.

#define RME96_CLOCKMODE_WORDCLOCK   2

Definition at line 191 of file rme96.c.

#define RME96_DAC_IS_1852 (   rme96)    (RME96_HAS_ANALOG_OUT(rme96) && (rme96)->rev >= 4)

Definition at line 248 of file rme96.c.

#define RME96_DAC_IS_1855 (   rme96)
Value:
(((rme96)->pci->device == PCI_DEVICE_ID_RME_DIGI96_8_PAD_OR_PST && (rme96)->rev < 4) || \
((rme96)->pci->device == PCI_DEVICE_ID_RME_DIGI96_8_PRO && (rme96)->rev == 2))

Definition at line 249 of file rme96.c.

#define RME96_HAS_ANALOG_IN (   rme96)    ((rme96)->pci->device == PCI_DEVICE_ID_RME_DIGI96_8_PAD_OR_PST)

Definition at line 245 of file rme96.c.

#define RME96_HAS_ANALOG_OUT (   rme96)
Value:

Definition at line 246 of file rme96.c.

#define RME96_INPUT_ANALOG   4

Definition at line 186 of file rme96.c.

#define RME96_INPUT_COAXIAL   1

Definition at line 183 of file rme96.c.

#define RME96_INPUT_INTERNAL   2

Definition at line 184 of file rme96.c.

#define RME96_INPUT_OPTICAL   0

Definition at line 182 of file rme96.c.

#define RME96_INPUT_XLR   3

Definition at line 185 of file rme96.c.

#define RME96_IO_ADDITIONAL_REG   0x20004

Definition at line 82 of file rme96.c.

#define RME96_IO_CONFIRM_PLAY_IRQ   0x20008

Definition at line 83 of file rme96.c.

#define RME96_IO_CONFIRM_REC_IRQ   0x2000C

Definition at line 84 of file rme96.c.

#define RME96_IO_CONTROL_REGISTER   0x20000

Definition at line 81 of file rme96.c.

#define RME96_IO_GET_PLAY_POS   0x20000

Definition at line 89 of file rme96.c.

#define RME96_IO_GET_REC_POS   0x30000

Definition at line 90 of file rme96.c.

#define RME96_IO_PLAY_BUFFER   0x0

Definition at line 79 of file rme96.c.

#define RME96_IO_REC_BUFFER   0x10000

Definition at line 80 of file rme96.c.

#define RME96_IO_RESET_PLAY_POS   0x4FFFC

Definition at line 86 of file rme96.c.

#define RME96_IO_RESET_REC_POS   0x5FFFC

Definition at line 88 of file rme96.c.

#define RME96_IO_SET_PLAY_POS   0x40000

Definition at line 85 of file rme96.c.

#define RME96_IO_SET_REC_POS   0x50000

Definition at line 87 of file rme96.c.

#define RME96_IO_SIZE   0x60000

Definition at line 76 of file rme96.c.

#define RME96_ISPLAYING (   rme96)    ((rme96)->wcreg & RME96_WCR_START)

Definition at line 243 of file rme96.c.

#define RME96_ISRECORDING (   rme96)    ((rme96)->wcreg & RME96_WCR_START_2)

Definition at line 244 of file rme96.c.

#define RME96_LARGE_BLOCK_SIZE   8192

Definition at line 195 of file rme96.c.

#define RME96_MONITOR_TRACKS_1_2   0

Definition at line 170 of file rme96.c.

#define RME96_MONITOR_TRACKS_3_4   1

Definition at line 171 of file rme96.c.

#define RME96_MONITOR_TRACKS_5_6   2

Definition at line 172 of file rme96.c.

#define RME96_MONITOR_TRACKS_7_8   3

Definition at line 173 of file rme96.c.

#define RME96_RCR_AUDIO_ADDR_MASK   0xFFFF

Definition at line 136 of file rme96.c.

#define RME96_RCR_AUTOSYNC   (1 << 30)

Definition at line 146 of file rme96.c.

#define RME96_RCR_BITPOS_F0   27

Definition at line 149 of file rme96.c.

#define RME96_RCR_BITPOS_F1   28

Definition at line 150 of file rme96.c.

#define RME96_RCR_BITPOS_F2   29

Definition at line 151 of file rme96.c.

#define RME96_RCR_DEV_ID_0   (1 << 21)

Definition at line 139 of file rme96.c.

#define RME96_RCR_DEV_ID_1   (1 << 22)

Definition at line 140 of file rme96.c.

#define RME96_RCR_F0   (1 << 27)

Definition at line 143 of file rme96.c.

#define RME96_RCR_F1   (1 << 28)

Definition at line 144 of file rme96.c.

#define RME96_RCR_F2   (1 << 29)

Definition at line 145 of file rme96.c.

#define RME96_RCR_IRQ   (1 << 31)

Definition at line 147 of file rme96.c.

#define RME96_RCR_IRQ_2   (1 << 16)

Definition at line 137 of file rme96.c.

#define RME96_RCR_LOCK   (1 << 23)

Definition at line 141 of file rme96.c.

#define RME96_RCR_T_OUT   (1 << 17)

Definition at line 138 of file rme96.c.

#define RME96_RCR_VERF   (1 << 26)

Definition at line 142 of file rme96.c.

#define RME96_SMALL_BLOCK_SIZE   2048

Definition at line 194 of file rme96.c.

#define RME96_SPDIF_NCHANNELS   2

Definition at line 70 of file rme96.c.

#define RME96_WCR_ADAT   (1 << 8)

Definition at line 101 of file rme96.c.

#define RME96_WCR_BITPOS_FREQ_0   9

Definition at line 128 of file rme96.c.

#define RME96_WCR_BITPOS_FREQ_1   10

Definition at line 129 of file rme96.c.

#define RME96_WCR_BITPOS_GAIN_0   2

Definition at line 126 of file rme96.c.

#define RME96_WCR_BITPOS_GAIN_1   3

Definition at line 127 of file rme96.c.

#define RME96_WCR_BITPOS_INP_0   17

Definition at line 130 of file rme96.c.

#define RME96_WCR_BITPOS_INP_1   18

Definition at line 131 of file rme96.c.

#define RME96_WCR_BITPOS_MONITOR_0   28

Definition at line 132 of file rme96.c.

#define RME96_WCR_BITPOS_MONITOR_1   29

Definition at line 133 of file rme96.c.

#define RME96_WCR_BM   (1 << 6)

Definition at line 99 of file rme96.c.

#define RME96_WCR_BM_2   (1 << 7)

Definition at line 100 of file rme96.c.

#define RME96_WCR_DOLBY   (1 << 27)

Definition at line 120 of file rme96.c.

#define RME96_WCR_DS   (1 << 11)

Definition at line 104 of file rme96.c.

#define RME96_WCR_EMP   (1 << 13)

Definition at line 106 of file rme96.c.

#define RME96_WCR_FREQ_0   (1 << 9)

Definition at line 102 of file rme96.c.

#define RME96_WCR_FREQ_1   (1 << 10)

Definition at line 103 of file rme96.c.

#define RME96_WCR_GAIN_0   (1 << 2)

Definition at line 95 of file rme96.c.

#define RME96_WCR_GAIN_1   (1 << 3)

Definition at line 96 of file rme96.c.

#define RME96_WCR_IDIS   (1 << 31)

Definition at line 124 of file rme96.c.

#define RME96_WCR_INP_0   (1 << 17)

Definition at line 110 of file rme96.c.

#define RME96_WCR_INP_1   (1 << 18)

Definition at line 111 of file rme96.c.

#define RME96_WCR_ISEL   (1 << 30)

Definition at line 123 of file rme96.c.

#define RME96_WCR_MASTER   (1 << 15)

Definition at line 108 of file rme96.c.

#define RME96_WCR_MODE24   (1 << 4)

Definition at line 97 of file rme96.c.

#define RME96_WCR_MODE24_2   (1 << 5)

Definition at line 98 of file rme96.c.

#define RME96_WCR_MONITOR_0   (1 << 28)

Definition at line 121 of file rme96.c.

#define RME96_WCR_MONITOR_1   (1 << 29)

Definition at line 122 of file rme96.c.

#define RME96_WCR_PD   (1 << 16)

Definition at line 109 of file rme96.c.

#define RME96_WCR_PRO   (1 << 12)

Definition at line 105 of file rme96.c.

#define RME96_WCR_SEL   (1 << 14)

Definition at line 107 of file rme96.c.

#define RME96_WCR_START   (1 << 0)

Definition at line 93 of file rme96.c.

#define RME96_WCR_START_2   (1 << 1)

Definition at line 94 of file rme96.c.

#define RME96_WCR_THRU_0   (1 << 19)

Definition at line 112 of file rme96.c.

#define RME96_WCR_THRU_1   (1 << 20)

Definition at line 113 of file rme96.c.

#define RME96_WCR_THRU_2   (1 << 21)

Definition at line 114 of file rme96.c.

#define RME96_WCR_THRU_3   (1 << 22)

Definition at line 115 of file rme96.c.

#define RME96_WCR_THRU_4   (1 << 23)

Definition at line 116 of file rme96.c.

#define RME96_WCR_THRU_5   (1 << 24)

Definition at line 117 of file rme96.c.

#define RME96_WCR_THRU_6   (1 << 25)

Definition at line 118 of file rme96.c.

#define RME96_WCR_THRU_7   (1 << 26)

Definition at line 119 of file rme96.c.

#define snd_rme96_info_loopback_control   snd_ctl_boolean_mono_info

Definition at line 1802 of file rme96.c.

Function Documentation

MODULE_AUTHOR ( "Anders Torger <[email protected]>"  )
MODULE_DESCRIPTION ( "RME  Digi96,
Digi96/  8,
Digi96/8  PRO,
Digi96/8  PST,
""Digi96/8 PAD  
)
MODULE_DEVICE_TABLE ( pci  ,
snd_rme96_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 RME Digi96 soundcard."   
)
MODULE_PARM_DESC ( id  ,
"ID string for RME Digi96 soundcard."   
)
MODULE_PARM_DESC ( enable  ,
"Enable RME Digi96 soundcard."   
)
module_pci_driver ( rme96_driver  )
MODULE_SUPPORTED_DEVICE ( "{{RME,Digi96},""{RME,Digi96/8},""{RME,Digi96/8 PRO},""{RME,Digi96/8 PST},""{RME,Digi96/8 PAD}}"  )