Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Data Structures | Macros | Functions
rme32.c File Reference
#include <linux/delay.h>
#include <linux/gfp.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/pcm-indirect.h>
#include <sound/asoundef.h>
#include <sound/initval.h>
#include <asm/io.h>

Go to the source code of this file.

Data Structures

struct  rme32
 

Macros

#define RME32_SPDIF_NCHANNELS   2
 
#define RME32_BUFFER_SIZE   0x20000
 
#define RME32_IO_SIZE   0x30000
 
#define RME32_IO_DATA_BUFFER   0x0
 
#define RME32_IO_CONTROL_REGISTER   0x20000
 
#define RME32_IO_GET_POS   0x20000
 
#define RME32_IO_CONFIRM_ACTION_IRQ   0x20004
 
#define RME32_IO_RESET_POS   0x20100
 
#define RME32_WCR_START   (1 << 0) /* startbit */
 
#define RME32_WCR_MONO
 
#define RME32_WCR_MODE24   (1 << 2) /* 0=16bit, 1=32bit */
 
#define RME32_WCR_SEL   (1 << 3) /* 0=input on output, 1=normal playback/capture */
 
#define RME32_WCR_FREQ_0   (1 << 4) /* frequency (play) */
 
#define RME32_WCR_FREQ_1   (1 << 5)
 
#define RME32_WCR_INP_0   (1 << 6) /* input switch */
 
#define RME32_WCR_INP_1   (1 << 7)
 
#define RME32_WCR_RESET   (1 << 8) /* Reset address */
 
#define RME32_WCR_MUTE   (1 << 9) /* digital mute for output */
 
#define RME32_WCR_PRO   (1 << 10) /* 1=professional, 0=consumer */
 
#define RME32_WCR_DS_BM   (1 << 11) /* 1=DoubleSpeed (only PRO-Version); 1=BlockMode (only Adat-Version) */
 
#define RME32_WCR_ADAT   (1 << 12) /* Adat Mode (only Adat-Version) */
 
#define RME32_WCR_AUTOSYNC   (1 << 13) /* AutoSync */
 
#define RME32_WCR_PD   (1 << 14) /* DAC Reset (only PRO-Version) */
 
#define RME32_WCR_EMP   (1 << 15) /* 1=Emphasis on (only PRO-Version) */
 
#define RME32_WCR_BITPOS_FREQ_0   4
 
#define RME32_WCR_BITPOS_FREQ_1   5
 
#define RME32_WCR_BITPOS_INP_0   6
 
#define RME32_WCR_BITPOS_INP_1   7
 
#define RME32_RCR_AUDIO_ADDR_MASK   0x1ffff
 
#define RME32_RCR_LOCK   (1 << 23) /* 1=locked, 0=not locked */
 
#define RME32_RCR_ERF   (1 << 26) /* 1=Error, 0=no Error */
 
#define RME32_RCR_FREQ_0   (1 << 27) /* CS841x frequency (record) */
 
#define RME32_RCR_FREQ_1   (1 << 28)
 
#define RME32_RCR_FREQ_2   (1 << 29)
 
#define RME32_RCR_KMODE   (1 << 30) /* card mode: 1=PLL, 0=quartz */
 
#define RME32_RCR_IRQ   (1 << 31) /* interrupt */
 
#define RME32_RCR_BITPOS_F0   27
 
#define RME32_RCR_BITPOS_F1   28
 
#define RME32_RCR_BITPOS_F2   29
 
#define RME32_INPUT_OPTICAL   0
 
#define RME32_INPUT_COAXIAL   1
 
#define RME32_INPUT_INTERNAL   2
 
#define RME32_INPUT_XLR   3
 
#define RME32_CLOCKMODE_SLAVE   0
 
#define RME32_CLOCKMODE_MASTER_32   1
 
#define RME32_CLOCKMODE_MASTER_44   2
 
#define RME32_CLOCKMODE_MASTER_48   3
 
#define RME32_BLOCK_SIZE   8192
 
#define RME32_MID_BUFFER_SIZE   (1024*1024)
 
#define RME32_32_REVISION   192
 
#define RME32_328_REVISION_OLD   100
 
#define RME32_328_REVISION_NEW   101
 
#define RME32_PRO_REVISION_WITH_8412   192
 
#define RME32_PRO_REVISION_WITH_8414   150
 
#define RME32_ISWORKING(rme32)   ((rme32)->wcreg & RME32_WCR_START)
 
#define RME32_PRO_WITH_8414(rme32)   ((rme32)->pci->device == PCI_DEVICE_ID_RME_DIGI32_PRO && (rme32)->rev == RME32_PRO_REVISION_WITH_8414)
 
#define snd_rme32_info_loopback_control   snd_ctl_boolean_mono_info
 

Functions

 module_param_array (index, int, NULL, 0444)
 
 MODULE_PARM_DESC (index,"Index value for RME Digi32 soundcard.")
 
 module_param_array (id, charp, NULL, 0444)
 
 MODULE_PARM_DESC (id,"ID string for RME Digi32 soundcard.")
 
 module_param_array (enable, bool, NULL, 0444)
 
 MODULE_PARM_DESC (enable,"Enable RME Digi32 soundcard.")
 
 module_param_array (fullduplex, bool, NULL, 0444)
 
 MODULE_PARM_DESC (fullduplex,"Support full-duplex mode.")
 
 MODULE_AUTHOR ("Martin Langer <[email protected]>, Pilo Chambert <pilo.c@wanadoo.fr>")
 
 MODULE_DESCRIPTION ("RME Digi32, Digi32/8, Digi32 PRO")
 
 MODULE_LICENSE ("GPL")
 
 MODULE_SUPPORTED_DEVICE ("{{RME,Digi32},""{RME,Digi32/8},""{RME,Digi32 PRO}}")
 
 MODULE_DEVICE_TABLE (pci, snd_rme32_ids)
 
 module_pci_driver (rme32_driver)
 

Macro Definition Documentation

#define RME32_328_REVISION_NEW   101

Definition at line 182 of file rme32.c.

#define RME32_328_REVISION_OLD   100

Definition at line 181 of file rme32.c.

#define RME32_32_REVISION   192

Definition at line 180 of file rme32.c.

#define RME32_BLOCK_SIZE   8192

Definition at line 174 of file rme32.c.

#define RME32_BUFFER_SIZE   0x20000

Definition at line 112 of file rme32.c.

#define RME32_CLOCKMODE_MASTER_32   1

Definition at line 169 of file rme32.c.

#define RME32_CLOCKMODE_MASTER_44   2

Definition at line 170 of file rme32.c.

#define RME32_CLOCKMODE_MASTER_48   3

Definition at line 171 of file rme32.c.

#define RME32_CLOCKMODE_SLAVE   0

Definition at line 168 of file rme32.c.

#define RME32_INPUT_COAXIAL   1

Definition at line 163 of file rme32.c.

#define RME32_INPUT_INTERNAL   2

Definition at line 164 of file rme32.c.

#define RME32_INPUT_OPTICAL   0

Definition at line 162 of file rme32.c.

#define RME32_INPUT_XLR   3

Definition at line 165 of file rme32.c.

#define RME32_IO_CONFIRM_ACTION_IRQ   0x20004

Definition at line 121 of file rme32.c.

#define RME32_IO_CONTROL_REGISTER   0x20000

Definition at line 119 of file rme32.c.

#define RME32_IO_DATA_BUFFER   0x0

Definition at line 118 of file rme32.c.

#define RME32_IO_GET_POS   0x20000

Definition at line 120 of file rme32.c.

#define RME32_IO_RESET_POS   0x20100

Definition at line 122 of file rme32.c.

#define RME32_IO_SIZE   0x30000

Definition at line 115 of file rme32.c.

#define RME32_ISWORKING (   rme32)    ((rme32)->wcreg & RME32_WCR_START)

Definition at line 231 of file rme32.c.

#define RME32_MID_BUFFER_SIZE   (1024*1024)

Definition at line 177 of file rme32.c.

#define RME32_PRO_REVISION_WITH_8412   192

Definition at line 183 of file rme32.c.

#define RME32_PRO_REVISION_WITH_8414   150

Definition at line 184 of file rme32.c.

#define RME32_PRO_WITH_8414 (   rme32)    ((rme32)->pci->device == PCI_DEVICE_ID_RME_DIGI32_PRO && (rme32)->rev == RME32_PRO_REVISION_WITH_8414)

Definition at line 232 of file rme32.c.

#define RME32_RCR_AUDIO_ADDR_MASK   0x1ffff

Definition at line 148 of file rme32.c.

#define RME32_RCR_BITPOS_F0   27

Definition at line 157 of file rme32.c.

#define RME32_RCR_BITPOS_F1   28

Definition at line 158 of file rme32.c.

#define RME32_RCR_BITPOS_F2   29

Definition at line 159 of file rme32.c.

#define RME32_RCR_ERF   (1 << 26) /* 1=Error, 0=no Error */

Definition at line 150 of file rme32.c.

#define RME32_RCR_FREQ_0   (1 << 27) /* CS841x frequency (record) */

Definition at line 151 of file rme32.c.

#define RME32_RCR_FREQ_1   (1 << 28)

Definition at line 152 of file rme32.c.

#define RME32_RCR_FREQ_2   (1 << 29)

Definition at line 153 of file rme32.c.

#define RME32_RCR_IRQ   (1 << 31) /* interrupt */

Definition at line 155 of file rme32.c.

#define RME32_RCR_KMODE   (1 << 30) /* card mode: 1=PLL, 0=quartz */

Definition at line 154 of file rme32.c.

#define RME32_RCR_LOCK   (1 << 23) /* 1=locked, 0=not locked */

Definition at line 149 of file rme32.c.

#define RME32_SPDIF_NCHANNELS   2

Definition at line 109 of file rme32.c.

#define RME32_WCR_ADAT   (1 << 12) /* Adat Mode (only Adat-Version) */

Definition at line 137 of file rme32.c.

#define RME32_WCR_AUTOSYNC   (1 << 13) /* AutoSync */

Definition at line 138 of file rme32.c.

#define RME32_WCR_BITPOS_FREQ_0   4

Definition at line 142 of file rme32.c.

#define RME32_WCR_BITPOS_FREQ_1   5

Definition at line 143 of file rme32.c.

#define RME32_WCR_BITPOS_INP_0   6

Definition at line 144 of file rme32.c.

#define RME32_WCR_BITPOS_INP_1   7

Definition at line 145 of file rme32.c.

#define RME32_WCR_DS_BM   (1 << 11) /* 1=DoubleSpeed (only PRO-Version); 1=BlockMode (only Adat-Version) */

Definition at line 136 of file rme32.c.

#define RME32_WCR_EMP   (1 << 15) /* 1=Emphasis on (only PRO-Version) */

Definition at line 140 of file rme32.c.

#define RME32_WCR_FREQ_0   (1 << 4) /* frequency (play) */

Definition at line 129 of file rme32.c.

#define RME32_WCR_FREQ_1   (1 << 5)

Definition at line 130 of file rme32.c.

#define RME32_WCR_INP_0   (1 << 6) /* input switch */

Definition at line 131 of file rme32.c.

#define RME32_WCR_INP_1   (1 << 7)

Definition at line 132 of file rme32.c.

#define RME32_WCR_MODE24   (1 << 2) /* 0=16bit, 1=32bit */

Definition at line 127 of file rme32.c.

#define RME32_WCR_MONO
Value:
(1 << 1) /* 0=stereo, 1=mono
Setting the whole card to mono
doesn't seem to be very useful.
A software-solution can handle
full-duplex with one direction in
stereo and the other way in mono.
So, the hardware should work all
the time in stereo! */

Definition at line 126 of file rme32.c.

#define RME32_WCR_MUTE   (1 << 9) /* digital mute for output */

Definition at line 134 of file rme32.c.

#define RME32_WCR_PD   (1 << 14) /* DAC Reset (only PRO-Version) */

Definition at line 139 of file rme32.c.

#define RME32_WCR_PRO   (1 << 10) /* 1=professional, 0=consumer */

Definition at line 135 of file rme32.c.

#define RME32_WCR_RESET   (1 << 8) /* Reset address */

Definition at line 133 of file rme32.c.

#define RME32_WCR_SEL   (1 << 3) /* 0=input on output, 1=normal playback/capture */

Definition at line 128 of file rme32.c.

#define RME32_WCR_START   (1 << 0) /* startbit */

Definition at line 125 of file rme32.c.

#define snd_rme32_info_loopback_control   snd_ctl_boolean_mono_info

Definition at line 1562 of file rme32.c.

Function Documentation

MODULE_AUTHOR ( "Martin Langer <[email protected] ,
Pilo Chambert< pilo.c @wanadoo.fr >"   
)
MODULE_DESCRIPTION ( "RME  Digi32,
Digi32/  8,
Digi32 PRO"   
)
MODULE_DEVICE_TABLE ( pci  ,
snd_rme32_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_param_array ( fullduplex  ,
bool  ,
NULL  ,
0444   
)
MODULE_PARM_DESC ( index  ,
"Index value for RME Digi32 soundcard."   
)
MODULE_PARM_DESC ( id  ,
"ID string for RME Digi32 soundcard."   
)
MODULE_PARM_DESC ( enable  ,
"Enable RME Digi32 soundcard."   
)
MODULE_PARM_DESC ( fullduplex  ,
"Support full-duplex mode."   
)
module_pci_driver ( rme32_driver  )
MODULE_SUPPORTED_DEVICE ( "{{RME,Digi32},""{RME,Digi32/8},""{RME,Digi32 PRO}}"  )