File: mpu401.patch

package info (click to toggle)
alsa-driver 1.0.23%2Bdfsg-2
  • links: PTS, VCS
  • area: main
  • in suites: squeeze
  • size: 28,448 kB
  • ctags: 77,491
  • sloc: ansic: 473,525; sh: 3,307; makefile: 2,661; python: 1,527; perl: 1,316; awk: 66
file content (58 lines) | stat: -rw-r--r-- 1,908 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
--- ../../alsa-kernel/drivers/mpu401/mpu401.c	2007-12-20 10:20:44.000000000 +0100
+++ mpu401.c	2007-12-20 11:08:49.000000000 +0100
@@ -1,3 +1,4 @@
+#include "adriver.h"
 /*
  *  Driver for generic MPU-401 boards (UART mode only)
  *  Copyright (c) by Jaroslav Kysela <perex@perex.cz>
@@ -29,6 +30,10 @@
 #include <sound/mpu401.h>
 #include <sound/initval.h>
 
+#ifndef IORESOURCE_DISABLED
+#define IORESOURCE_DISABLED 0	/* ugly hack */
+#endif
+
 MODULE_AUTHOR("Jaroslav Kysela <perex@perex.cz>");
 MODULE_DESCRIPTION("MPU-401 UART");
 MODULE_LICENSE("GPL");
@@ -42,6 +47,9 @@
 static long port[SNDRV_CARDS] = SNDRV_DEFAULT_PORT;	/* MPU-401 port number */
 static int irq[SNDRV_CARDS] = SNDRV_DEFAULT_IRQ;	/* MPU-401 IRQ */
 static int uart_enter[SNDRV_CARDS] = {[0 ... (SNDRV_CARDS - 1)] = 1};
+#ifdef CONFIG_X86_PC9800
+static int pc98ii[SNDRV_CARDS];				/* PC98-II dauther board */
+#endif
 
 module_param_array(index, int, NULL, 0444);
 MODULE_PARM_DESC(index, "Index value for MPU-401 device.");
@@ -59,6 +67,10 @@
 MODULE_PARM_DESC(irq, "IRQ # for MPU-401 device.");
 module_param_array(uart_enter, bool, NULL, 0444);
 MODULE_PARM_DESC(uart_enter, "Issue UART_ENTER command at open.");
+#ifdef CONFIG_X86_PC9800
+module_param_array(pc98ii, bool, boot_devs, 0444);
+MODULE_PARM_DESC(pc98ii, "Roland MPU-PC98II support.");
+#endif
 
 static struct platform_device *platform_devices[SNDRV_CARDS];
 static int pnp_registered;
@@ -85,7 +97,11 @@
 		strcat(card->longname, "polled");
 	}
 
-	err = snd_mpu401_uart_new(card, 0, MPU401_HW_MPU401, port[dev], 0,
+	err = snd_mpu401_uart_new(card, 0,
+#ifdef CONFIG_X86_PC9800
+				  pc98ii[dev] ? MPU401_HW_PC98II :
+#endif
+				  MPU401_HW_MPU401, port[dev], 0,
 				  irq[dev], irq[dev] >= 0 ? IRQF_DISABLED : 0,
 				  NULL);
 	if (err < 0) {
@@ -287,3 +303,5 @@
 
 module_init(alsa_card_mpu401_init)
 module_exit(alsa_card_mpu401_exit)
+
+EXPORT_NO_SYMBOLS;