76 #include <linux/pci.h>
77 #include <linux/module.h>
109 #define RME32_SPDIF_NCHANNELS 2
112 #define RME32_BUFFER_SIZE 0x20000
115 #define RME32_IO_SIZE 0x30000
118 #define RME32_IO_DATA_BUFFER 0x0
119 #define RME32_IO_CONTROL_REGISTER 0x20000
120 #define RME32_IO_GET_POS 0x20000
121 #define RME32_IO_CONFIRM_ACTION_IRQ 0x20004
122 #define RME32_IO_RESET_POS 0x20100
125 #define RME32_WCR_START (1 << 0)
126 #define RME32_WCR_MONO (1 << 1)
134 #define RME32_WCR_MODE24 (1 << 2)
135 #define RME32_WCR_SEL (1 << 3)
136 #define RME32_WCR_FREQ_0 (1 << 4)
137 #define RME32_WCR_FREQ_1 (1 << 5)
138 #define RME32_WCR_INP_0 (1 << 6)
139 #define RME32_WCR_INP_1 (1 << 7)
140 #define RME32_WCR_RESET (1 << 8)
141 #define RME32_WCR_MUTE (1 << 9)
142 #define RME32_WCR_PRO (1 << 10)
143 #define RME32_WCR_DS_BM (1 << 11)
144 #define RME32_WCR_ADAT (1 << 12)
145 #define RME32_WCR_AUTOSYNC (1 << 13)
146 #define RME32_WCR_PD (1 << 14)
147 #define RME32_WCR_EMP (1 << 15)
149 #define RME32_WCR_BITPOS_FREQ_0 4
150 #define RME32_WCR_BITPOS_FREQ_1 5
151 #define RME32_WCR_BITPOS_INP_0 6
152 #define RME32_WCR_BITPOS_INP_1 7
155 #define RME32_RCR_AUDIO_ADDR_MASK 0x1ffff
156 #define RME32_RCR_LOCK (1 << 23)
157 #define RME32_RCR_ERF (1 << 26)
158 #define RME32_RCR_FREQ_0 (1 << 27)
159 #define RME32_RCR_FREQ_1 (1 << 28)
160 #define RME32_RCR_FREQ_2 (1 << 29)
161 #define RME32_RCR_KMODE (1 << 30)
162 #define RME32_RCR_IRQ (1 << 31)
164 #define RME32_RCR_BITPOS_F0 27
165 #define RME32_RCR_BITPOS_F1 28
166 #define RME32_RCR_BITPOS_F2 29
169 #define RME32_INPUT_OPTICAL 0
170 #define RME32_INPUT_COAXIAL 1
171 #define RME32_INPUT_INTERNAL 2
172 #define RME32_INPUT_XLR 3
175 #define RME32_CLOCKMODE_SLAVE 0
176 #define RME32_CLOCKMODE_MASTER_32 1
177 #define RME32_CLOCKMODE_MASTER_44 2
178 #define RME32_CLOCKMODE_MASTER_48 3
181 #define RME32_BLOCK_SIZE 8192
184 #define RME32_MID_BUFFER_SIZE (1024*1024)
187 #define RME32_32_REVISION 192
188 #define RME32_328_REVISION_OLD 100
189 #define RME32_328_REVISION_NEW 101
190 #define RME32_PRO_REVISION_WITH_8412 192
191 #define RME32_PRO_REVISION_WITH_8414 150
238 #define RME32_ISWORKING(rme32) ((rme32)->wcreg & RME32_WCR_START)
239 #define RME32_PRO_WITH_8414(rme32) ((rme32)->pci->device == PCI_DEVICE_ID_RME_DIGI32_PRO && (rme32)->rev == RME32_PRO_REVISION_WITH_8414)
247 static void snd_rme32_proc_init(
struct rme32 *
rme32);
251 static inline unsigned int snd_rme32_pcm_byteptr(
struct rme32 *
rme32)
284 static int snd_rme32_capture_copy(
struct snd_pcm_substream *substream,
int channel,
400 static void snd_rme32_reset_dac(
struct rme32 *rme32)
407 static int snd_rme32_playback_getrate(
struct rme32 * rme32)
429 static int snd_rme32_capture_getrate(
struct rme32 * rme32,
int *is_adat)
491 static int snd_rme32_playback_setrate(
struct rme32 * rme32,
int rate)
540 snd_rme32_reset_dac(rme32);
547 static int snd_rme32_setclockmode(
struct rme32 * rme32,
int mode)
577 static int snd_rme32_getclockmode(
struct rme32 * rme32)
583 static int snd_rme32_setinputtype(
struct rme32 * rme32,
int type)
609 static int snd_rme32_getinputtype(
struct rme32 * rme32)
616 snd_rme32_setframelog(
struct rme32 * rme32,
int n_channels,
int is_playback)
620 if (n_channels == 2) {
635 static int snd_rme32_setformat(
struct rme32 * rme32,
int format)
670 spin_lock_irq(&rme32->
lock);
672 (rate = snd_rme32_capture_getrate(rme32, &dummy)) > 0) {
675 spin_unlock_irq(&rme32->
lock);
678 }
else if ((err = snd_rme32_playback_setrate(rme32,
params_rate(params))) < 0) {
679 spin_unlock_irq(&rme32->
lock);
682 if ((err = snd_rme32_setformat(rme32,
params_format(params))) < 0) {
683 spin_unlock_irq(&rme32->
lock);
690 spin_unlock_irq(&rme32->
lock);
701 spin_unlock_irq(&rme32->
lock);
725 spin_lock_irq(&rme32->
lock);
730 if ((err = snd_rme32_setformat(rme32,
params_format(params))) < 0) {
731 spin_unlock_irq(&rme32->
lock);
734 if ((err = snd_rme32_playback_setrate(rme32,
params_rate(params))) < 0) {
735 spin_unlock_irq(&rme32->
lock);
738 if ((rate = snd_rme32_capture_getrate(rme32, &isadat)) > 0) {
740 spin_unlock_irq(&rme32->
lock);
743 if ((isadat && runtime->
hw.channels_min == 2) ||
744 (!isadat && runtime->
hw.channels_min == 8)) {
745 spin_unlock_irq(&rme32->
lock);
757 spin_unlock_irq(&rme32->
lock);
763 spin_unlock_irq(&rme32->
lock);
776 static void snd_rme32_pcm_start(
struct rme32 * rme32,
int from_pause)
786 static void snd_rme32_pcm_stop(
struct rme32 * rme32,
int to_pause)
806 struct rme32 *rme32 = (
struct rme32 *) dev_id;
828 .list = period_bytes,
832 static void snd_rme32_set_buffer_constraint(
struct rme32 *rme32,
struct snd_pcm_runtime *runtime)
840 &hw_constraints_period_bytes);
852 spin_lock_irq(&rme32->
lock);
854 spin_unlock_irq(&rme32->
lock);
860 spin_unlock_irq(&rme32->
lock);
863 runtime->
hw = snd_rme32_spdif_fd_info;
865 runtime->
hw = snd_rme32_spdif_info;
868 runtime->
hw.rate_max = 96000;
871 (rate = snd_rme32_capture_getrate(rme32, &dummy)) > 0) {
874 runtime->
hw.rate_min =
rate;
875 runtime->
hw.rate_max =
rate;
878 snd_rme32_set_buffer_constraint(rme32, runtime);
895 spin_lock_irq(&rme32->
lock);
897 spin_unlock_irq(&rme32->
lock);
901 spin_unlock_irq(&rme32->
lock);
904 runtime->
hw = snd_rme32_spdif_fd_info;
906 runtime->
hw = snd_rme32_spdif_info;
909 runtime->
hw.rate_max = 96000;
911 if ((rate = snd_rme32_capture_getrate(rme32, &isadat)) > 0) {
916 runtime->
hw.rate_min =
rate;
917 runtime->
hw.rate_max =
rate;
920 snd_rme32_set_buffer_constraint(rme32, runtime);
934 spin_lock_irq(&rme32->
lock);
936 spin_unlock_irq(&rme32->
lock);
942 spin_unlock_irq(&rme32->
lock);
945 runtime->
hw = snd_rme32_adat_fd_info;
947 runtime->
hw = snd_rme32_adat_info;
949 (rate = snd_rme32_capture_getrate(rme32, &dummy)) > 0) {
952 runtime->
hw.rate_min =
rate;
953 runtime->
hw.rate_max =
rate;
956 snd_rme32_set_buffer_constraint(rme32, runtime);
968 runtime->
hw = snd_rme32_adat_fd_info;
970 runtime->
hw = snd_rme32_adat_info;
971 if ((rate = snd_rme32_capture_getrate(rme32, &isadat)) > 0) {
976 runtime->
hw.rate_min =
rate;
977 runtime->
hw.rate_max =
rate;
982 spin_lock_irq(&rme32->
lock);
984 spin_unlock_irq(&rme32->
lock);
988 spin_unlock_irq(&rme32->
lock);
990 snd_rme32_set_buffer_constraint(rme32, runtime);
999 spin_lock_irq(&rme32->
lock);
1003 spin_unlock_irq(&rme32->
lock);
1017 spin_lock_irq(&rme32->
lock);
1020 spin_unlock(&rme32->
lock);
1028 spin_lock_irq(&rme32->
lock);
1032 rme32->
playback_pcm.sw_buffer_size = snd_pcm_lib_buffer_bytes(substream);
1039 spin_unlock_irq(&rme32->
lock);
1047 spin_lock_irq(&rme32->
lock);
1052 rme32->
capture_pcm.sw_buffer_size = snd_pcm_lib_buffer_bytes(substream);
1056 spin_unlock_irq(&rme32->
lock);
1066 spin_lock(&rme32->
lock);
1078 rme32->
playback_pcm.hw_data = snd_rme32_pcm_byteptr(rme32);
1081 rme32->
capture_pcm.hw_data = snd_rme32_pcm_byteptr(rme32);
1089 snd_pcm_trigger_done(s, substream);
1105 snd_rme32_pcm_start(rme32, 0);
1109 snd_rme32_pcm_stop(rme32, 0);
1113 snd_rme32_pcm_stop(rme32, 1);
1117 snd_rme32_pcm_start(rme32, 1);
1120 spin_unlock(&rme32->
lock);
1136 return snd_rme32_pcm_byteptr(rme32) >> rme32->
capture_frlog;
1156 spin_lock(&rme32->
lock);
1160 spin_unlock(&rme32->
lock);
1161 snd_pcm_indirect_playback_transfer(substream, rec,
1162 snd_rme32_pb_trans_copy);
1178 snd_pcm_indirect_capture_transfer(substream, &rme32->
capture_pcm,
1179 snd_rme32_cp_trans_copy);
1187 return snd_pcm_indirect_playback_pointer(substream, &rme32->
playback_pcm,
1188 snd_rme32_pcm_byteptr(rme32));
1195 return snd_pcm_indirect_capture_pointer(substream, &rme32->
capture_pcm,
1196 snd_rme32_pcm_byteptr(rme32));
1200 static struct snd_pcm_ops snd_rme32_playback_spdif_ops = {
1201 .open = snd_rme32_playback_spdif_open,
1202 .close = snd_rme32_playback_close,
1204 .hw_params = snd_rme32_playback_hw_params,
1205 .hw_free = snd_rme32_pcm_hw_free,
1206 .prepare = snd_rme32_playback_prepare,
1207 .trigger = snd_rme32_pcm_trigger,
1208 .pointer = snd_rme32_playback_pointer,
1209 .copy = snd_rme32_playback_copy,
1210 .silence = snd_rme32_playback_silence,
1214 static struct snd_pcm_ops snd_rme32_capture_spdif_ops = {
1215 .open = snd_rme32_capture_spdif_open,
1216 .close = snd_rme32_capture_close,
1218 .hw_params = snd_rme32_capture_hw_params,
1219 .hw_free = snd_rme32_pcm_hw_free,
1220 .prepare = snd_rme32_capture_prepare,
1221 .trigger = snd_rme32_pcm_trigger,
1222 .pointer = snd_rme32_capture_pointer,
1223 .copy = snd_rme32_capture_copy,
1227 static struct snd_pcm_ops snd_rme32_playback_adat_ops = {
1228 .open = snd_rme32_playback_adat_open,
1229 .close = snd_rme32_playback_close,
1231 .hw_params = snd_rme32_playback_hw_params,
1232 .prepare = snd_rme32_playback_prepare,
1233 .trigger = snd_rme32_pcm_trigger,
1234 .pointer = snd_rme32_playback_pointer,
1235 .copy = snd_rme32_playback_copy,
1236 .silence = snd_rme32_playback_silence,
1240 static struct snd_pcm_ops snd_rme32_capture_adat_ops = {
1241 .open = snd_rme32_capture_adat_open,
1242 .close = snd_rme32_capture_close,
1244 .hw_params = snd_rme32_capture_hw_params,
1245 .prepare = snd_rme32_capture_prepare,
1246 .trigger = snd_rme32_pcm_trigger,
1247 .pointer = snd_rme32_capture_pointer,
1248 .copy = snd_rme32_capture_copy,
1253 static struct snd_pcm_ops snd_rme32_playback_spdif_fd_ops = {
1254 .open = snd_rme32_playback_spdif_open,
1255 .close = snd_rme32_playback_close,
1257 .hw_params = snd_rme32_playback_hw_params,
1258 .hw_free = snd_rme32_pcm_hw_free,
1259 .prepare = snd_rme32_playback_prepare,
1260 .trigger = snd_rme32_pcm_trigger,
1261 .pointer = snd_rme32_playback_fd_pointer,
1262 .ack = snd_rme32_playback_fd_ack,
1265 static struct snd_pcm_ops snd_rme32_capture_spdif_fd_ops = {
1266 .open = snd_rme32_capture_spdif_open,
1267 .close = snd_rme32_capture_close,
1269 .hw_params = snd_rme32_capture_hw_params,
1270 .hw_free = snd_rme32_pcm_hw_free,
1271 .prepare = snd_rme32_capture_prepare,
1272 .trigger = snd_rme32_pcm_trigger,
1273 .pointer = snd_rme32_capture_fd_pointer,
1274 .ack = snd_rme32_capture_fd_ack,
1277 static struct snd_pcm_ops snd_rme32_playback_adat_fd_ops = {
1278 .open = snd_rme32_playback_adat_open,
1279 .close = snd_rme32_playback_close,
1281 .hw_params = snd_rme32_playback_hw_params,
1282 .prepare = snd_rme32_playback_prepare,
1283 .trigger = snd_rme32_pcm_trigger,
1284 .pointer = snd_rme32_playback_fd_pointer,
1285 .ack = snd_rme32_playback_fd_ack,
1288 static struct snd_pcm_ops snd_rme32_capture_adat_fd_ops = {
1289 .open = snd_rme32_capture_adat_open,
1290 .close = snd_rme32_capture_close,
1292 .hw_params = snd_rme32_capture_hw_params,
1293 .prepare = snd_rme32_capture_prepare,
1294 .trigger = snd_rme32_pcm_trigger,
1295 .pointer = snd_rme32_capture_fd_pointer,
1296 .ack = snd_rme32_capture_fd_ack,
1301 struct rme32 *rme32 = (
struct rme32 *) private_data;
1303 if (rme32 ==
NULL) {
1306 if (rme32->
irq >= 0) {
1307 snd_rme32_pcm_stop(rme32, 0);
1322 static void snd_rme32_free_spdif_pcm(
struct snd_pcm *pcm)
1324 struct rme32 *rme32 = (
struct rme32 *) pcm->
private_data;
1329 snd_rme32_free_adat_pcm(
struct snd_pcm *pcm)
1331 struct rme32 *rme32 = (
struct rme32 *) pcm->
private_data;
1335 static int __devinit snd_rme32_create(
struct rme32 * rme32)
1358 KBUILD_MODNAME, rme32)) {
1365 pci_read_config_byte(pci, 8, &rme32->
rev);
1372 rme32->
spdif_pcm->private_free = snd_rme32_free_spdif_pcm;
1376 &snd_rme32_playback_spdif_fd_ops);
1378 &snd_rme32_capture_spdif_fd_ops);
1385 &snd_rme32_playback_spdif_ops);
1387 &snd_rme32_capture_spdif_ops);
1403 rme32->
adat_pcm->private_data = rme32;
1404 rme32->
adat_pcm->private_free = snd_rme32_free_adat_pcm;
1408 &snd_rme32_playback_adat_fd_ops);
1410 &snd_rme32_capture_adat_fd_ops);
1417 &snd_rme32_playback_adat_ops);
1419 &snd_rme32_capture_adat_ops);
1429 snd_rme32_pcm_stop(rme32, 0);
1432 snd_rme32_reset_dac(rme32);
1445 if ((err = snd_rme32_create_switches(rme32->
card, rme32)) < 0) {
1450 snd_rme32_proc_init(rme32);
1466 struct rme32 *rme32 = (
struct rme32 *) entry->
private_data;
1470 snd_iprintf(buffer, rme32->
card->longname);
1471 snd_iprintf(buffer,
" (index #%d)\n", rme32->
card->number + 1);
1473 snd_iprintf(buffer,
"\nGeneral settings\n");
1475 snd_iprintf(buffer,
" Full-duplex mode\n");
1477 snd_iprintf(buffer,
" Half-duplex mode\n");
1479 snd_iprintf(buffer,
" receiver: CS8414\n");
1481 snd_iprintf(buffer,
" receiver: CS8412\n");
1484 snd_iprintf(buffer,
" format: 24 bit");
1486 snd_iprintf(buffer,
" format: 16 bit");
1489 snd_iprintf(buffer,
", Mono\n");
1491 snd_iprintf(buffer,
", Stereo\n");
1494 snd_iprintf(buffer,
"\nInput settings\n");
1495 switch (snd_rme32_getinputtype(rme32)) {
1497 snd_iprintf(buffer,
" input: optical");
1500 snd_iprintf(buffer,
" input: coaxial");
1503 snd_iprintf(buffer,
" input: internal");
1506 snd_iprintf(buffer,
" input: XLR");
1509 if (snd_rme32_capture_getrate(rme32, &n) < 0) {
1510 snd_iprintf(buffer,
"\n sample rate: no valid signal\n");
1513 snd_iprintf(buffer,
" (8 channels)\n");
1515 snd_iprintf(buffer,
" (2 channels)\n");
1517 snd_iprintf(buffer,
" sample rate: %d Hz\n",
1518 snd_rme32_capture_getrate(rme32, &n));
1521 snd_iprintf(buffer,
"\nOutput settings\n");
1523 snd_iprintf(buffer,
" output signal: normal playback");
1525 snd_iprintf(buffer,
" output signal: same as input");
1528 snd_iprintf(buffer,
" (muted)\n");
1530 snd_iprintf(buffer,
"\n");
1537 snd_iprintf(buffer,
" sample rate: %d Hz\n",
1538 snd_rme32_playback_getrate(rme32));
1541 snd_iprintf(buffer,
" sample clock source: AutoSync\n");
1543 snd_iprintf(buffer,
" sample clock source: Internal\n");
1546 snd_iprintf(buffer,
" format: AES/EBU (professional)\n");
1548 snd_iprintf(buffer,
" format: IEC958 (consumer)\n");
1551 snd_iprintf(buffer,
" emphasis: on\n");
1553 snd_iprintf(buffer,
" emphasis: off\n");
1557 static void __devinit snd_rme32_proc_init(
struct rme32 * rme32)
1561 if (! snd_card_proc_new(rme32->
card,
"rme32", &entry))
1562 snd_info_set_text_ops(entry, rme32, snd_rme32_proc_read);
1569 #define snd_rme32_info_loopback_control snd_ctl_boolean_mono_info
1572 snd_rme32_get_loopback_control(
struct snd_kcontrol *kcontrol,
1577 spin_lock_irq(&rme32->
lock);
1578 ucontrol->
value.integer.value[0] =
1580 spin_unlock_irq(&rme32->
lock);
1584 snd_rme32_put_loopback_control(
struct snd_kcontrol *kcontrol,
1592 spin_lock_irq(&rme32->
lock);
1594 change = val != rme32->
wcreg;
1595 if (ucontrol->
value.integer.value[0])
1601 spin_unlock_irq(&rme32->
lock);
1606 snd_rme32_info_inputtype_control(
struct snd_kcontrol *kcontrol,
1610 static char *texts[4] = {
"Optical",
"Coaxial",
"Internal",
"XLR" };
1614 switch (rme32->
pci->device) {
1636 snd_rme32_get_inputtype_control(
struct snd_kcontrol *kcontrol,
1640 unsigned int items = 3;
1642 spin_lock_irq(&rme32->
lock);
1643 ucontrol->
value.enumerated.item[0] = snd_rme32_getinputtype(rme32);
1645 switch (rme32->
pci->device) {
1657 if (ucontrol->
value.enumerated.item[0] >= items) {
1658 ucontrol->
value.enumerated.item[0] = items - 1;
1661 spin_unlock_irq(&rme32->
lock);
1665 snd_rme32_put_inputtype_control(
struct snd_kcontrol *kcontrol,
1670 int change, items = 3;
1672 switch (rme32->
pci->device) {
1684 val = ucontrol->
value.enumerated.item[0] % items;
1686 spin_lock_irq(&rme32->
lock);
1687 change = val != (
unsigned int)snd_rme32_getinputtype(rme32);
1688 snd_rme32_setinputtype(rme32, val);
1689 spin_unlock_irq(&rme32->
lock);
1694 snd_rme32_info_clockmode_control(
struct snd_kcontrol *kcontrol,
1697 static char *texts[4] = {
"AutoSync",
1700 "Internal 48.0kHz" };
1713 snd_rme32_get_clockmode_control(
struct snd_kcontrol *kcontrol,
1718 spin_lock_irq(&rme32->
lock);
1719 ucontrol->
value.enumerated.item[0] = snd_rme32_getclockmode(rme32);
1720 spin_unlock_irq(&rme32->
lock);
1724 snd_rme32_put_clockmode_control(
struct snd_kcontrol *kcontrol,
1731 val = ucontrol->
value.enumerated.item[0] % 3;
1732 spin_lock_irq(&rme32->
lock);
1733 change = val != (
unsigned int)snd_rme32_getclockmode(rme32);
1734 snd_rme32_setclockmode(rme32, val);
1735 spin_unlock_irq(&rme32->
lock);
1759 static int snd_rme32_control_spdif_info(
struct snd_kcontrol *kcontrol,
1767 static int snd_rme32_control_spdif_get(
struct snd_kcontrol *kcontrol,
1772 snd_rme32_convert_to_aes(&ucontrol->
value.iec958,
1777 static int snd_rme32_control_spdif_put(
struct snd_kcontrol *kcontrol,
1784 val = snd_rme32_convert_from_aes(&ucontrol->
value.iec958);
1785 spin_lock_irq(&rme32->
lock);
1788 spin_unlock_irq(&rme32->
lock);
1792 static int snd_rme32_control_spdif_stream_info(
struct snd_kcontrol *kcontrol,
1800 static int snd_rme32_control_spdif_stream_get(
struct snd_kcontrol *kcontrol,
1806 snd_rme32_convert_to_aes(&ucontrol->
value.iec958,
1811 static int snd_rme32_control_spdif_stream_put(
struct snd_kcontrol *kcontrol,
1819 val = snd_rme32_convert_from_aes(&ucontrol->
value.iec958);
1820 spin_lock_irq(&rme32->
lock);
1826 spin_unlock_irq(&rme32->
lock);
1830 static int snd_rme32_control_spdif_mask_info(
struct snd_kcontrol *kcontrol,
1838 static int snd_rme32_control_spdif_mask_get(
struct snd_kcontrol *kcontrol,
1850 .info = snd_rme32_control_spdif_info,
1851 .get = snd_rme32_control_spdif_get,
1852 .put = snd_rme32_control_spdif_put
1858 .info = snd_rme32_control_spdif_stream_info,
1859 .get = snd_rme32_control_spdif_stream_get,
1860 .put = snd_rme32_control_spdif_stream_put
1866 .info = snd_rme32_control_spdif_mask_info,
1867 .get = snd_rme32_control_spdif_mask_get,
1874 .info = snd_rme32_control_spdif_mask_info,
1875 .get = snd_rme32_control_spdif_mask_get,
1880 .name =
"Input Connector",
1881 .info = snd_rme32_info_inputtype_control,
1882 .get = snd_rme32_get_inputtype_control,
1883 .put = snd_rme32_put_inputtype_control
1887 .name =
"Loopback Input",
1889 .get = snd_rme32_get_loopback_control,
1890 .put = snd_rme32_put_loopback_control
1894 .name =
"Sample Clock Source",
1895 .info = snd_rme32_info_clockmode_control,
1896 .get = snd_rme32_get_clockmode_control,
1897 .put = snd_rme32_put_clockmode_control
1901 static int snd_rme32_create_switches(
struct snd_card *
card,
struct rme32 * rme32)
1906 for (idx = 0; idx < (
int)
ARRAY_SIZE(snd_rme32_controls); idx++) {
1920 static void snd_rme32_card_free(
struct snd_card *card)
1929 struct rme32 *rme32;
1942 sizeof(
struct rme32), &card);
1950 if (fullduplex[dev])
1952 if ((err = snd_rme32_create(rme32)) < 0) {
1958 switch (rme32->
pci->device) {
1976 pci_set_drvdata(pci, card);
1984 pci_set_drvdata(pci,
NULL);
1988 .name = KBUILD_MODNAME,
1989 .id_table = snd_rme32_ids,
1990 .probe = snd_rme32_probe,