blob: 40e92f5cd69c760111073cfe8e8a9c60e1f00cce [file] [log] [blame]
Clemens Ladisch1b8ff222007-12-23 19:52:08 +01001/*
2 * C-Media CMI8788 driver for Asus Xonar cards
3 *
4 * Copyright (c) Clemens Ladisch <clemens@ladisch.de>
5 *
6 *
7 * This driver is free software; you can redistribute it and/or modify
8 * it under the terms of the GNU General Public License, version 2.
9 *
10 * This driver is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 * GNU General Public License for more details.
14 *
15 * You should have received a copy of the GNU General Public License
16 * along with this driver; if not, write to the Free Software
17 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
18 */
19
20/*
Clemens Ladisch878ac3e2008-01-21 08:50:19 +010021 * CMI8788:
22 *
Clemens Ladisch1b8ff222007-12-23 19:52:08 +010023 * SPI 0 -> 1st PCM1796 (front)
Clemens Ladisch7113e952008-01-14 08:55:03 +010024 * SPI 1 -> 2nd PCM1796 (surround)
Clemens Ladisch1b8ff222007-12-23 19:52:08 +010025 * SPI 2 -> 3rd PCM1796 (center/LFE)
Clemens Ladisch7113e952008-01-14 08:55:03 +010026 * SPI 4 -> 4th PCM1796 (back)
Clemens Ladisch1b8ff222007-12-23 19:52:08 +010027 *
28 * GPIO 2 -> M0 of CS5381
29 * GPIO 3 -> M1 of CS5381
Clemens Ladisch878ac3e2008-01-21 08:50:19 +010030 * GPIO 5 <- external power present (D2X only)
Clemens Ladisch1b8ff222007-12-23 19:52:08 +010031 * GPIO 7 -> ALT
Clemens Ladisch878ac3e2008-01-21 08:50:19 +010032 * GPIO 8 -> enable output to speakers
33 *
34 * CM9780:
35 *
36 * GPIO 0 -> enable AC'97 bypass (line in -> ADC)
Clemens Ladisch1b8ff222007-12-23 19:52:08 +010037 */
38
Clemens Ladisch1b8ff222007-12-23 19:52:08 +010039#include <linux/pci.h>
40#include <linux/delay.h>
Clemens Ladischccc80fb2008-01-16 08:32:08 +010041#include <linux/mutex.h>
42#include <sound/ac97_codec.h>
Clemens Ladisch1b8ff222007-12-23 19:52:08 +010043#include <sound/control.h>
44#include <sound/core.h>
45#include <sound/initval.h>
46#include <sound/pcm.h>
47#include <sound/tlv.h>
48#include "oxygen.h"
Clemens Ladisch878ac3e2008-01-21 08:50:19 +010049#include "cm9780.h"
Clemens Ladisch1b8ff222007-12-23 19:52:08 +010050
51MODULE_AUTHOR("Clemens Ladisch <clemens@ladisch.de>");
52MODULE_DESCRIPTION("Asus AV200 driver");
53MODULE_LICENSE("GPL");
54MODULE_SUPPORTED_DEVICE("{{Asus,AV200}}");
55
56static int index[SNDRV_CARDS] = SNDRV_DEFAULT_IDX;
57static char *id[SNDRV_CARDS] = SNDRV_DEFAULT_STR;
58static int enable[SNDRV_CARDS] = SNDRV_DEFAULT_ENABLE_PNP;
59
60module_param_array(index, int, NULL, 0444);
61MODULE_PARM_DESC(index, "card index");
62module_param_array(id, charp, NULL, 0444);
63MODULE_PARM_DESC(id, "ID string");
64module_param_array(enable, bool, NULL, 0444);
65MODULE_PARM_DESC(enable, "enable card");
66
67static struct pci_device_id xonar_ids[] __devinitdata = {
68 { OXYGEN_PCI_SUBID(0x1043, 0x8269) }, /* Asus Xonar D2 */
69 { OXYGEN_PCI_SUBID(0x1043, 0x82b7) }, /* Asus Xonar D2X */
70 { }
71};
72MODULE_DEVICE_TABLE(pci, xonar_ids);
73
Clemens Ladisch878ac3e2008-01-21 08:50:19 +010074
75#define GPIO_CS5381_M_MASK 0x000c
76#define GPIO_CS5381_M_SINGLE 0x0000
77#define GPIO_CS5381_M_DOUBLE 0x0004
78#define GPIO_CS5381_M_QUAD 0x0008
79#define GPIO_EXT_POWER 0x0020
80#define GPIO_ALT 0x0080
81#define GPIO_OUTPUT_ENABLE 0x0100
82
Clemens Ladisch911b4992008-01-28 08:33:44 +010083#define GPIO_LINE_MUTE CM9780_GPO0
84
Clemens Ladisch878ac3e2008-01-21 08:50:19 +010085/* register 16 */
86#define PCM1796_ATL_MASK 0xff
87/* register 17 */
88#define PCM1796_ATR_MASK 0xff
89/* register 18 */
Clemens Ladisch1b8ff222007-12-23 19:52:08 +010090#define PCM1796_MUTE 0x01
Clemens Ladisch878ac3e2008-01-21 08:50:19 +010091#define PCM1796_DME 0x02
92#define PCM1796_DMF_MASK 0x0c
93#define PCM1796_DMF_DISABLED 0x00
94#define PCM1796_DMF_48 0x04
95#define PCM1796_DMF_441 0x08
96#define PCM1796_DMF_32 0x0c
97#define PCM1796_FMT_MASK 0x70
98#define PCM1796_FMT_16_RJUST 0x00
99#define PCM1796_FMT_20_RJUST 0x10
100#define PCM1796_FMT_24_RJUST 0x20
101#define PCM1796_FMT_24_LJUST 0x30
102#define PCM1796_FMT_16_I2S 0x40
103#define PCM1796_FMT_24_I2S 0x50
Clemens Ladisch1b8ff222007-12-23 19:52:08 +0100104#define PCM1796_ATLD 0x80
Clemens Ladisch878ac3e2008-01-21 08:50:19 +0100105/* register 19 */
106#define PCM1796_INZD 0x01
107#define PCM1796_FLT_MASK 0x02
108#define PCM1796_FLT_SHARP 0x00
109#define PCM1796_FLT_SLOW 0x02
110#define PCM1796_DFMS 0x04
111#define PCM1796_OPE 0x10
112#define PCM1796_ATS_MASK 0x60
113#define PCM1796_ATS_1 0x00
114#define PCM1796_ATS_2 0x20
115#define PCM1796_ATS_4 0x40
116#define PCM1796_ATS_8 0x60
117#define PCM1796_REV 0x80
118/* register 20 */
119#define PCM1796_OS_MASK 0x03
Clemens Ladisch1b8ff222007-12-23 19:52:08 +0100120#define PCM1796_OS_64 0x00
121#define PCM1796_OS_32 0x01
122#define PCM1796_OS_128 0x02
Clemens Ladisch878ac3e2008-01-21 08:50:19 +0100123#define PCM1796_CHSL_MASK 0x04
124#define PCM1796_CHSL_LEFT 0x00
125#define PCM1796_CHSL_RIGHT 0x04
126#define PCM1796_MONO 0x08
127#define PCM1796_DFTH 0x10
128#define PCM1796_DSD 0x20
129#define PCM1796_SRST 0x40
130/* register 21 */
131#define PCM1796_PCMZ 0x01
132#define PCM1796_DZ_MASK 0x06
133/* register 22 */
134#define PCM1796_ZFGL 0x01
135#define PCM1796_ZFGR 0x02
136/* register 23 */
137#define PCM1796_ID_MASK 0x1f
Clemens Ladisch1b8ff222007-12-23 19:52:08 +0100138
Clemens Ladisch7c014152008-01-28 08:36:55 +0100139struct xonar_data {
140 u8 is_d2x;
141 u8 has_power;
142};
143
Clemens Ladisch1b8ff222007-12-23 19:52:08 +0100144static void pcm1796_write(struct oxygen *chip, unsigned int codec,
145 u8 reg, u8 value)
146{
147 /* maps ALSA channel pair number to SPI output */
148 static const u8 codec_map[4] = {
Clemens Ladisch7113e952008-01-14 08:55:03 +0100149 0, 1, 2, 4
Clemens Ladisch1b8ff222007-12-23 19:52:08 +0100150 };
Clemens Ladischc2353a02008-01-18 09:17:53 +0100151 oxygen_write_spi(chip, OXYGEN_SPI_TRIGGER |
Clemens Ladisch1b8ff222007-12-23 19:52:08 +0100152 OXYGEN_SPI_DATA_LENGTH_2 |
Clemens Ladischc2353a02008-01-18 09:17:53 +0100153 OXYGEN_SPI_CLOCK_160 |
Clemens Ladisch1b8ff222007-12-23 19:52:08 +0100154 (codec_map[codec] << OXYGEN_SPI_CODEC_SHIFT) |
Clemens Ladischc2353a02008-01-18 09:17:53 +0100155 OXYGEN_SPI_CEN_LATCH_CLOCK_HI,
Clemens Ladisch1b8ff222007-12-23 19:52:08 +0100156 (reg << 8) | value);
157}
158
159static void xonar_init(struct oxygen *chip)
160{
Clemens Ladisch7c014152008-01-28 08:36:55 +0100161 struct xonar_data *data = chip->model_data;
Clemens Ladisch1b8ff222007-12-23 19:52:08 +0100162 unsigned int i;
163
Clemens Ladisch7c014152008-01-28 08:36:55 +0100164 data->is_d2x = chip->pci->subsystem_device == 0x82b7;
165
Clemens Ladisch1b8ff222007-12-23 19:52:08 +0100166 for (i = 0; i < 4; ++i) {
Clemens Ladisch878ac3e2008-01-21 08:50:19 +0100167 pcm1796_write(chip, i, 18, PCM1796_FMT_24_LJUST | PCM1796_ATLD);
168 pcm1796_write(chip, i, 19, PCM1796_FLT_SHARP | PCM1796_ATS_1);
169 pcm1796_write(chip, i, 20, PCM1796_OS_64);
170 pcm1796_write(chip, i, 21, 0);
171 pcm1796_write(chip, i, 16, 0xff); /* set ATL/ATR after ATLD */
172 pcm1796_write(chip, i, 17, 0xff);
Clemens Ladisch1b8ff222007-12-23 19:52:08 +0100173 }
174
Clemens Ladisch878ac3e2008-01-21 08:50:19 +0100175 oxygen_set_bits16(chip, OXYGEN_GPIO_CONTROL,
176 GPIO_CS5381_M_MASK | GPIO_ALT);
177 oxygen_write16_masked(chip, OXYGEN_GPIO_DATA,
178 GPIO_CS5381_M_SINGLE,
179 GPIO_CS5381_M_MASK | GPIO_ALT);
Clemens Ladisch7c014152008-01-28 08:36:55 +0100180 if (data->is_d2x) {
181 oxygen_clear_bits16(chip, OXYGEN_GPIO_CONTROL,
182 GPIO_EXT_POWER);
183 oxygen_set_bits16(chip, OXYGEN_GPIO_INTERRUPT_MASK,
184 GPIO_EXT_POWER);
185 chip->interrupt_mask |= OXYGEN_INT_GPIO;
186 data->has_power = !!(oxygen_read16(chip, OXYGEN_GPIO_DATA)
187 & GPIO_EXT_POWER);
188 }
Clemens Ladisch878ac3e2008-01-21 08:50:19 +0100189 oxygen_ac97_set_bits(chip, 0, CM9780_JACK, CM9780_FMIC2MIC);
Clemens Ladisch911b4992008-01-28 08:33:44 +0100190 oxygen_ac97_clear_bits(chip, 0, CM9780_GPIO_STATUS, GPIO_LINE_MUTE);
Clemens Ladisch1b8ff222007-12-23 19:52:08 +0100191 msleep(300);
Clemens Ladisch878ac3e2008-01-21 08:50:19 +0100192 oxygen_set_bits16(chip, OXYGEN_GPIO_CONTROL, GPIO_OUTPUT_ENABLE);
193 oxygen_set_bits16(chip, OXYGEN_GPIO_DATA, GPIO_OUTPUT_ENABLE);
Clemens Ladisch1b8ff222007-12-23 19:52:08 +0100194
195 snd_component_add(chip->card, "PCM1796");
196 snd_component_add(chip->card, "CS5381");
197}
198
199static void xonar_cleanup(struct oxygen *chip)
200{
Clemens Ladisch878ac3e2008-01-21 08:50:19 +0100201 oxygen_clear_bits16(chip, OXYGEN_GPIO_DATA, GPIO_OUTPUT_ENABLE);
Clemens Ladisch1b8ff222007-12-23 19:52:08 +0100202}
203
204static void set_pcm1796_params(struct oxygen *chip,
205 struct snd_pcm_hw_params *params)
206{
207#if 0
208 unsigned int i;
209 u8 value;
210
211 value = params_rate(params) >= 96000 ? PCM1796_OS_32 : PCM1796_OS_64;
212 for (i = 0; i < 4; ++i)
Clemens Ladisch878ac3e2008-01-21 08:50:19 +0100213 pcm1796_write(chip, i, 20, value);
Clemens Ladisch1b8ff222007-12-23 19:52:08 +0100214#endif
215}
216
217static void update_pcm1796_volume(struct oxygen *chip)
218{
219 unsigned int i;
220
221 for (i = 0; i < 4; ++i) {
Clemens Ladisch878ac3e2008-01-21 08:50:19 +0100222 pcm1796_write(chip, i, 16, chip->dac_volume[i * 2]);
223 pcm1796_write(chip, i, 17, chip->dac_volume[i * 2 + 1]);
Clemens Ladisch1b8ff222007-12-23 19:52:08 +0100224 }
225}
226
227static void update_pcm1796_mute(struct oxygen *chip)
228{
229 unsigned int i;
230 u8 value;
231
Clemens Ladisch878ac3e2008-01-21 08:50:19 +0100232 value = PCM1796_FMT_24_LJUST | PCM1796_ATLD;
Clemens Ladisch1b8ff222007-12-23 19:52:08 +0100233 if (chip->dac_mute)
234 value |= PCM1796_MUTE;
235 for (i = 0; i < 4; ++i)
Clemens Ladisch878ac3e2008-01-21 08:50:19 +0100236 pcm1796_write(chip, i, 18, value);
Clemens Ladisch1b8ff222007-12-23 19:52:08 +0100237}
238
239static void set_cs5381_params(struct oxygen *chip,
240 struct snd_pcm_hw_params *params)
241{
242 unsigned int value;
243
244 if (params_rate(params) <= 54000)
Clemens Ladisch878ac3e2008-01-21 08:50:19 +0100245 value = GPIO_CS5381_M_SINGLE;
Clemens Ladisch1b8ff222007-12-23 19:52:08 +0100246 else if (params_rate(params) <= 108000)
Clemens Ladisch878ac3e2008-01-21 08:50:19 +0100247 value = GPIO_CS5381_M_DOUBLE;
Clemens Ladisch1b8ff222007-12-23 19:52:08 +0100248 else
Clemens Ladisch878ac3e2008-01-21 08:50:19 +0100249 value = GPIO_CS5381_M_QUAD;
250 oxygen_write16_masked(chip, OXYGEN_GPIO_DATA,
251 value, GPIO_CS5381_M_MASK);
Clemens Ladisch1b8ff222007-12-23 19:52:08 +0100252}
253
Clemens Ladisch7c014152008-01-28 08:36:55 +0100254static void xonar_gpio_changed(struct oxygen *chip)
255{
256 struct xonar_data *data = chip->model_data;
257 u8 has_power;
258
259 if (!data->is_d2x)
260 return;
261 has_power = !!(oxygen_read16(chip, OXYGEN_GPIO_DATA)
262 & GPIO_EXT_POWER);
263 if (has_power != data->has_power) {
264 data->has_power = has_power;
265 if (has_power) {
266 snd_printk(KERN_NOTICE "power restored\n");
267 } else {
268 snd_printk(KERN_CRIT
269 "Hey! Don't unplug the power cable!\n");
270 /* TODO: stop PCMs */
271 }
272 }
273}
274
Clemens Ladisch911b4992008-01-28 08:33:44 +0100275static void mute_ac97_ctl(struct oxygen *chip, unsigned int control)
276{
277 unsigned int index = chip->controls[control]->private_value & 0xff;
278 u16 value;
279
280 value = oxygen_read_ac97(chip, 0, index);
281 if (!(value & 0x8000)) {
282 oxygen_write_ac97(chip, 0, index, value | 0x8000);
283 snd_ctl_notify(chip->card, SNDRV_CTL_EVENT_MASK_VALUE,
284 &chip->controls[control]->id);
285 }
286}
287
Clemens Ladischa3601562008-01-28 08:35:20 +0100288static void xonar_ac97_switch_hook(struct oxygen *chip, unsigned int codec,
Clemens Ladisch911b4992008-01-28 08:33:44 +0100289 unsigned int reg, int mute)
290{
Clemens Ladischa3601562008-01-28 08:35:20 +0100291 if (codec != 0)
292 return;
Clemens Ladisch911b4992008-01-28 08:33:44 +0100293 /* line-in is exclusive */
294 switch (reg) {
295 case AC97_LINE:
296 oxygen_write_ac97_masked(chip, 0, CM9780_GPIO_STATUS,
297 mute ? GPIO_LINE_MUTE : 0,
298 GPIO_LINE_MUTE);
299 if (!mute) {
300 mute_ac97_ctl(chip, CONTROL_MIC_CAPTURE_SWITCH);
301 mute_ac97_ctl(chip, CONTROL_CD_CAPTURE_SWITCH);
302 mute_ac97_ctl(chip, CONTROL_AUX_CAPTURE_SWITCH);
303 }
304 break;
305 case AC97_MIC:
306 case AC97_CD:
307 case AC97_VIDEO:
308 case AC97_AUX:
309 if (!mute) {
310 oxygen_ac97_set_bits(chip, 0, CM9780_GPIO_STATUS,
311 GPIO_LINE_MUTE);
312 mute_ac97_ctl(chip, CONTROL_LINE_CAPTURE_SWITCH);
313 }
314 break;
315 }
316}
317
Clemens Ladischccc80fb2008-01-16 08:32:08 +0100318static int pcm1796_volume_info(struct snd_kcontrol *ctl,
319 struct snd_ctl_elem_info *info)
320{
321 info->type = SNDRV_CTL_ELEM_TYPE_INTEGER;
322 info->count = 8;
323 info->value.integer.min = 0x0f;
324 info->value.integer.max = 0xff;
325 return 0;
326}
327
Clemens Ladisch1b8ff222007-12-23 19:52:08 +0100328static int alt_switch_get(struct snd_kcontrol *ctl,
329 struct snd_ctl_elem_value *value)
330{
331 struct oxygen *chip = ctl->private_data;
332
333 value->value.integer.value[0] =
Clemens Ladisch878ac3e2008-01-21 08:50:19 +0100334 !!(oxygen_read16(chip, OXYGEN_GPIO_DATA) & GPIO_ALT);
Clemens Ladisch1b8ff222007-12-23 19:52:08 +0100335 return 0;
336}
337
338static int alt_switch_put(struct snd_kcontrol *ctl,
339 struct snd_ctl_elem_value *value)
340{
341 struct oxygen *chip = ctl->private_data;
342 u16 old_bits, new_bits;
343 int changed;
344
345 spin_lock_irq(&chip->reg_lock);
346 old_bits = oxygen_read16(chip, OXYGEN_GPIO_DATA);
347 if (value->value.integer.value[0])
Clemens Ladisch878ac3e2008-01-21 08:50:19 +0100348 new_bits = old_bits | GPIO_ALT;
Clemens Ladisch1b8ff222007-12-23 19:52:08 +0100349 else
Clemens Ladisch878ac3e2008-01-21 08:50:19 +0100350 new_bits = old_bits & ~GPIO_ALT;
Clemens Ladisch1b8ff222007-12-23 19:52:08 +0100351 changed = new_bits != old_bits;
352 if (changed)
353 oxygen_write16(chip, OXYGEN_GPIO_DATA, new_bits);
354 spin_unlock_irq(&chip->reg_lock);
355 return changed;
356}
357
358static const struct snd_kcontrol_new alt_switch = {
359 .iface = SNDRV_CTL_ELEM_IFACE_MIXER,
360 .name = "Analog Loopback Switch",
361 .info = snd_ctl_boolean_mono_info,
362 .get = alt_switch_get,
363 .put = alt_switch_put,
364};
365
366static const DECLARE_TLV_DB_SCALE(pcm1796_db_scale, -12000, 50, 0);
367
Clemens Ladischccc80fb2008-01-16 08:32:08 +0100368static int xonar_control_filter(struct snd_kcontrol_new *template)
369{
370 if (!strcmp(template->name, "Master Playback Volume")) {
371 template->access |= SNDRV_CTL_ELEM_ACCESS_TLV_READ;
372 template->info = pcm1796_volume_info,
373 template->tlv.p = pcm1796_db_scale;
374 } else if (!strncmp(template->name, "CD Capture ", 11)) {
Clemens Ladisch911b4992008-01-28 08:33:44 +0100375 /* CD in is actually connected to the video in pin */
Clemens Ladischccc80fb2008-01-16 08:32:08 +0100376 template->private_value ^= AC97_CD ^ AC97_VIDEO;
Clemens Ladisch911b4992008-01-28 08:33:44 +0100377 } else if (!strcmp(template->name, "Line Capture Volume")) {
378 return 1; /* line-in bypasses the AC'97 mixer */
Clemens Ladischccc80fb2008-01-16 08:32:08 +0100379 }
380 return 0;
381}
382
Clemens Ladisch1b8ff222007-12-23 19:52:08 +0100383static int xonar_mixer_init(struct oxygen *chip)
384{
385 return snd_ctl_add(chip->card, snd_ctl_new1(&alt_switch, chip));
386}
387
388static const struct oxygen_model model_xonar = {
389 .shortname = "Asus AV200",
390 .longname = "Asus Virtuoso 200",
391 .chip = "AV200",
392 .init = xonar_init,
Clemens Ladischccc80fb2008-01-16 08:32:08 +0100393 .control_filter = xonar_control_filter,
Clemens Ladisch1b8ff222007-12-23 19:52:08 +0100394 .mixer_init = xonar_mixer_init,
395 .cleanup = xonar_cleanup,
396 .set_dac_params = set_pcm1796_params,
397 .set_adc_params = set_cs5381_params,
398 .update_dac_volume = update_pcm1796_volume,
399 .update_dac_mute = update_pcm1796_mute,
Clemens Ladisch911b4992008-01-28 08:33:44 +0100400 .ac97_switch_hook = xonar_ac97_switch_hook,
Clemens Ladisch7c014152008-01-28 08:36:55 +0100401 .gpio_changed = xonar_gpio_changed,
402 .model_data_size = sizeof(struct xonar_data),
Clemens Ladisch976cd622008-01-25 08:37:49 +0100403 .dac_channels = 8,
Clemens Ladische85e0922008-01-16 08:30:38 +0100404 .used_channels = OXYGEN_CHANNEL_B |
405 OXYGEN_CHANNEL_C |
406 OXYGEN_CHANNEL_SPDIF |
407 OXYGEN_CHANNEL_MULTICH,
Clemens Ladisch84aa6b72008-01-16 08:28:54 +0100408 .function_flags = OXYGEN_FUNCTION_ENABLE_SPI_4_5,
Clemens Ladisch05855ba2008-01-17 09:05:09 +0100409 .dac_i2s_format = OXYGEN_I2S_FORMAT_LJUST,
410 .adc_i2s_format = OXYGEN_I2S_FORMAT_LJUST,
Clemens Ladisch1b8ff222007-12-23 19:52:08 +0100411};
412
413static int __devinit xonar_probe(struct pci_dev *pci,
414 const struct pci_device_id *pci_id)
415{
416 static int dev;
417 int err;
418
419 if (dev >= SNDRV_CARDS)
420 return -ENODEV;
421 if (!enable[dev]) {
422 ++dev;
423 return -ENOENT;
424 }
Clemens Ladisch44fb7aa2008-01-21 08:45:37 +0100425 err = oxygen_pci_probe(pci, index[dev], id[dev], 1, &model_xonar);
Clemens Ladisch1b8ff222007-12-23 19:52:08 +0100426 if (err >= 0)
427 ++dev;
428 return err;
429}
430
431static struct pci_driver xonar_driver = {
432 .name = "AV200",
433 .id_table = xonar_ids,
434 .probe = xonar_probe,
435 .remove = __devexit_p(oxygen_pci_remove),
436};
437
438static int __init alsa_card_xonar_init(void)
439{
440 return pci_register_driver(&xonar_driver);
441}
442
443static void __exit alsa_card_xonar_exit(void)
444{
445 pci_unregister_driver(&xonar_driver);
446}
447
448module_init(alsa_card_xonar_init)
449module_exit(alsa_card_xonar_exit)