diff options
Diffstat (limited to 'sound/drivers/mpu401/mpu401.c')
-rw-r--r-- | sound/drivers/mpu401/mpu401.c | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/sound/drivers/mpu401/mpu401.c b/sound/drivers/mpu401/mpu401.c index 2de181ad0b05..1d563e515c17 100644 --- a/sound/drivers/mpu401/mpu401.c +++ b/sound/drivers/mpu401/mpu401.c | |||
@@ -42,6 +42,7 @@ static int pnp[SNDRV_CARDS] = {[0 ... (SNDRV_CARDS - 1)] = 1}; | |||
42 | #endif | 42 | #endif |
43 | static long port[SNDRV_CARDS] = SNDRV_DEFAULT_PORT; /* MPU-401 port number */ | 43 | static long port[SNDRV_CARDS] = SNDRV_DEFAULT_PORT; /* MPU-401 port number */ |
44 | static int irq[SNDRV_CARDS] = SNDRV_DEFAULT_IRQ; /* MPU-401 IRQ */ | 44 | static int irq[SNDRV_CARDS] = SNDRV_DEFAULT_IRQ; /* MPU-401 IRQ */ |
45 | static int uart_enter[SNDRV_CARDS] = {[0 ... (SNDRV_CARDS - 1)] = 1}; | ||
45 | 46 | ||
46 | module_param_array(index, int, NULL, 0444); | 47 | module_param_array(index, int, NULL, 0444); |
47 | MODULE_PARM_DESC(index, "Index value for MPU-401 device."); | 48 | MODULE_PARM_DESC(index, "Index value for MPU-401 device."); |
@@ -57,6 +58,8 @@ module_param_array(port, long, NULL, 0444); | |||
57 | MODULE_PARM_DESC(port, "Port # for MPU-401 device."); | 58 | MODULE_PARM_DESC(port, "Port # for MPU-401 device."); |
58 | module_param_array(irq, int, NULL, 0444); | 59 | module_param_array(irq, int, NULL, 0444); |
59 | MODULE_PARM_DESC(irq, "IRQ # for MPU-401 device."); | 60 | MODULE_PARM_DESC(irq, "IRQ # for MPU-401 device."); |
61 | module_param_array(uart_enter, bool, NULL, 0444); | ||
62 | MODULE_PARM_DESC(uart_enter, "Issue UART_ENTER command at open."); | ||
60 | 63 | ||
61 | static struct platform_device *platform_devices[SNDRV_CARDS]; | 64 | static struct platform_device *platform_devices[SNDRV_CARDS]; |
62 | static int pnp_registered; | 65 | static int pnp_registered; |
@@ -80,10 +83,11 @@ static int snd_mpu401_create(int dev, struct snd_card **rcard) | |||
80 | strcat(card->longname, "polled"); | 83 | strcat(card->longname, "polled"); |
81 | } | 84 | } |
82 | 85 | ||
83 | if ((err = snd_mpu401_uart_new(card, 0, | 86 | err = snd_mpu401_uart_new(card, 0, MPU401_HW_MPU401, port[dev], |
84 | MPU401_HW_MPU401, | 87 | uart_enter[dev] ? 0 : MPU401_INFO_UART_ONLY, |
85 | port[dev], 0, | 88 | irq[dev], irq[dev] >= 0 ? IRQF_DISABLED : 0, |
86 | irq[dev], irq[dev] >= 0 ? IRQF_DISABLED : 0, NULL)) < 0) { | 89 | NULL); |
90 | if (err < 0) { | ||
87 | printk(KERN_ERR "MPU401 not detected at 0x%lx\n", port[dev]); | 91 | printk(KERN_ERR "MPU401 not detected at 0x%lx\n", port[dev]); |
88 | goto _err; | 92 | goto _err; |
89 | } | 93 | } |