Skip to contentSkip to conversation

mpu401_uart -how to set for output only?

DISCUSSION Alan Horstmann 2 participants 9 messages May 19, 2006 – May 24, 2006 Documentation

lore
Share & tools
lore
#0 lore raw

When a mpu401 midi device is created, it seems to appear as available for both input and output.

However, several ice1712 cards use the 2nd mpu401 port for midi out only and do not make any connection available for input.

How can the 2nd device be created for output only so the device does not appear as available for input?

Regards Alan

-------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642

#1 lore raw

At Fri, 19 May 2006 11:51:24 +0100,

Quoted 9 lines · Alan Horstmann

When a mpu401 midi device is created, it seems to appear as available for both input and output.

However, several ice1712 cards use the 2nd mpu401 port for midi out only and do not make any connection available for input.

How can the 2nd device be created for output only so the device does not appear as available for input?

I have the following pending patch on my local tree.
It changes the 5th parameter in snd_mpu401_uart_new() to bit flags, and allows you to choose duplex, separate tx, and mmio mode.

If it looks OK to you, I'll commit it.

Takashi

Documentation/DocBook/writing-an-alsa-driver.tmpl +25 -4
diff -r f0a0b4edd60b Documentation/DocBook/writing-an-alsa-driver.tmpl
@@ -4215,7 +4215,7 @@ struct _snd_pcm_runtime {
           <programlisting>
 <![CDATA[
   struct snd_rawmidi *rmidi;
-  snd_mpu401_uart_new(card, 0, MPU401_HW_MPU401, port, integrated,
+  snd_mpu401_uart_new(card, 0, MPU401_HW_MPU401, port, info_flags,
                       irq, irq_flags, &rmidi);
 ]]>
           </programlisting>
@@ -4242,14 +4242,35 @@ struct _snd_pcm_runtime {
       </para>
 
       <para>
+	The 5th argument is bitflags for additional information.
         When the i/o port address above is a part of the PCI i/o
       region, the MPU401 i/o port might have been already allocated
-      (reserved) by the driver itself. In such a case, pass non-zero
-      to the 5th argument
-      (<parameter>integrated</parameter>). Otherwise, pass 0 to it,
+      (reserved) by the driver itself. In such a case, pass a bit flag
+      <constant>MPU401_INFO_INTEGRATED</constant>,
       and 
       the mpu401-uart layer will allocate the i/o ports by itself. 
       </para>
+
+	<para>
+	When the controller supports only the input or output MIDI stream,
+	pass <constant>MPU401_INFO_INPUT</constant> or
+	<constant>MPU401_INFO_OUTPUT</constant> bitflag, respectively.
+	Then the rawmidi instance is created as a single stream.
+	</para>
+
+	<para>
+	<constant>MPU401_INFO_MMIO</constant> bitflag is used to change
+	the access method to MMIO (via readb and writeb) instead of
+	iob and outb.  In this case, you have to pass the iomapped address
+	to <function>snd_mpu401_uart_new()</function>.
+	</para>
+
+	<para>
+	When <constant>MPU401_INFO_TX_IRQ</constant> is set, the output
+	stream isn't checked in the default interrupt handler.  The driver
+	needs to call <function>snd_mpu401_uart_interrupt_tx()</function>
+	by itself to start processing the output stream in irq handler.
+	</para>
 
       <para>
         Usually, the port address corresponds to the command port and
drivers/mpu401/mpu401_uart.c +69 -29

177 lines not on this page · raw message

include/mpu401.h +12 -2
diff -r f0a0b4edd60b include/mpu401.h
@@ -45,6 +45,12 @@
 #define MPU401_HW_PC98II		18	/* Roland PC98II */
 #define MPU401_HW_AUREAL		19	/* Aureal Vortex */
 
+#define MPU401_INFO_INPUT	(1 << 0)	/* input stream */
+#define MPU401_INFO_OUTPUT	(1 << 1)	/* output stream */
+#define MPU401_INFO_INTEGRATED	(1 << 2)	/* integrated h/w port */
+#define MPU401_INFO_MMIO	(1 << 3)	/* MMIO access */
+#define MPU401_INFO_TX_IRQ	(1 << 4)	/* independent TX irq */
+
 #define MPU401_MODE_BIT_INPUT		0
 #define MPU401_MODE_BIT_OUTPUT		1
 #define MPU401_MODE_BIT_INPUT_TRIGGER	2
@@ -62,6 +68,7 @@ struct snd_mpu401 {
 	struct snd_rawmidi *rmidi;
 
 	unsigned short hardware;	/* MPU401_HW_XXXX */
+	unsigned int info_flags;	/* MPU401_INFO_XXX */
 	unsigned long port;		/* base port of MPU-401 chip */
 	unsigned long cport;		/* port + 1 (usually) */
 	struct resource *res;		/* port resource */
@@ -99,13 +106,16 @@ struct snd_mpu401 {
 
  */
 
-irqreturn_t snd_mpu401_uart_interrupt(int irq, void *dev_id, struct pt_regs *regs);
+irqreturn_t snd_mpu401_uart_interrupt(int irq, void *dev_id,
+				      struct pt_regs *regs);
+irqreturn_t snd_mpu401_uart_interrupt_tx(int irq, void *dev_id,
+					 struct pt_regs *regs);
 
 int snd_mpu401_uart_new(struct snd_card *card,
 			int device,
 			unsigned short hardware,
 			unsigned long port,
-			int integrated,
+			unsigned int info_flags,
 			int irq,
 			int irq_flags,
 			struct snd_rawmidi ** rrawmidi);
isa/sscape.c +1 -2
diff -r f0a0b4edd60b isa/sscape.c
@@ -897,10 +897,9 @@ static int __devinit create_mpu401(struc
 	struct snd_rawmidi *rawmidi;
 	int err;
 
-#define MPU401_SHARE_HARDWARE  1
 	if ((err = snd_mpu401_uart_new(card, devnum,
 	                               MPU401_HW_MPU401,
-	                               port, MPU401_SHARE_HARDWARE,
+	                               port, MPU401_INFO_INTEGRATED,
 	                               irq, SA_INTERRUPT,
 	                               &rawmidi)) == 0) {
 		struct snd_mpu401 *mpu = (struct snd_mpu401 *) rawmidi->private_data;
pci/als4000.c +2 -2
diff -r f0a0b4edd60b pci/als4000.c
@@ -746,8 +746,8 @@ static int __devinit snd_card_als4000_pr
 		card->shortname, chip->alt_port, chip->irq);
 
 	if ((err = snd_mpu401_uart_new( card, 0, MPU401_HW_ALS4000,
-				        gcr+0x30, 1, pci->irq, 0,
-				        &chip->rmidi)) < 0) {
+				        gcr+0x30, MPU401_INFO_INTEGRATED,
+					pci->irq, 0, &chip->rmidi)) < 0) {
 		printk(KERN_ERR "als4000: no MPU-401 device at 0x%lx?\n", gcr+0x30);
 		goto out_err;
 	}
pci/au88x0/au88x0_mpu401.c +2 -1
diff -r f0a0b4edd60b pci/au88x0/au88x0_mpu401.c
@@ -95,7 +95,8 @@ static int __devinit snd_vortex_midi(vor
 	port = (unsigned long)(vortex->mmio + VORTEX_MIDI_DATA);
 	if ((temp =
 	     snd_mpu401_uart_new(vortex->card, 0, MPU401_HW_AUREAL, port,
-				 1, 0, 0, &rmidi)) != 0) {
+				 MPU401_INFO_INTEGRATED | MPU401_INFO_MMIO,
+				 0, 0, &rmidi)) != 0) {
 		hwwrite(vortex->mmio, VORTEX_CTRL,
 			(hwread(vortex->mmio, VORTEX_CTRL) &
 			 ~CTRL_MIDI_PORT) & ~CTRL_MIDI_EN);
pci/azt3328.c +2 -2
diff -r f0a0b4edd60b pci/azt3328.c
@@ -1806,8 +1806,8 @@ snd_azf3328_probe(struct pci_dev *pci, c
 	card->private_data = chip;
 
 	if ((err = snd_mpu401_uart_new( card, 0, MPU401_HW_MPU401,
-				        chip->mpu_port, 1, pci->irq, 0,
-				        &chip->rmidi)) < 0) {
+				        chip->mpu_port, MPU401_INFO_INTEGRATED,
+					pci->irq, 0, &chip->rmidi)) < 0) {
 		snd_printk(KERN_ERR "azf3328: no MPU-401 device at 0x%lx?\n", chip->mpu_port);
 		goto out_err;
 	}
pci/cmipci.c +3 -1
diff -r f0a0b4edd60b pci/cmipci.c
@@ -2981,7 +2981,9 @@ static int __devinit snd_cmipci_create(s
 
 	if (iomidi > 0) {
 		if ((err = snd_mpu401_uart_new(card, 0, MPU401_HW_CMIPCI,
-					       iomidi, integrated_midi,
+					       iomidi,
+					       (integrated_midi ?
+						MPU401_INFO_INTEGRATED : 0),
 					       cm->irq, 0, &cm->rmidi)) < 0) {
 			printk(KERN_ERR "cmipci: no UART401 device at 0x%lx\n", iomidi);
 		}
pci/cs5535audio/cs5535audio.c +14 -11
diff -r f0a0b4edd60b pci/cs5535audio/cs5535audio.c
@@ -56,17 +56,16 @@ static struct ac97_quirk ac97_quirks[] _
 	{}
 };
 
-static int index = SNDRV_DEFAULT_IDX1;
-static char *id = SNDRV_DEFAULT_STR1;
-/* for backward compatibility */
-static int enable; 
-
-module_param(index, int, 0444);
+static int index[SNDRV_CARDS] = SNDRV_DEFAULT_IDX;
+static char *id[SNDRV_CARDS] = SNDRV_DEFAULT_STR;
+static int enable[SNDRV_CARDS] = SNDRV_DEFAULT_ENABLE_PNP;
+
+module_param_array(index, int, NULL, 0444);
 MODULE_PARM_DESC(index, "Index value for " DRIVER_NAME);
-module_param(id, charp, 0444);
+module_param_array(id, charp, NULL, 0444);
 MODULE_PARM_DESC(id, "ID string for " DRIVER_NAME);
-module_param(enable, bool, 0444);
-MODULE_PARM_DESC(enable, "Enable for " DRIVER_NAME);
+module_param_array(enable, bool, NULL, 0444);
+MODULE_PARM_DESC(enable, "Enable " DRIVER_NAME);
 
 static struct pci_device_id snd_cs5535audio_ids[] __devinitdata = {
 	{ PCI_DEVICE(PCI_VENDOR_ID_NS, PCI_DEVICE_ID_NS_CS5535_AUDIO) },
@@ -358,8 +357,12 @@ static int __devinit snd_cs5535audio_pro
 
 	if (dev >= SNDRV_CARDS)
 		return -ENODEV;
-
-	card = snd_card_new(index, id, THIS_MODULE, 0);
+	if (!enable[dev]) {
+		dev++;
+		return -ENOENT;
+	}
+
+	card = snd_card_new(index[dev], id[dev], THIS_MODULE, 0);
 	if (card == NULL)
 		return -ENOMEM;
 
pci/es1938.c +2 -1
diff -r f0a0b4edd60b pci/es1938.c
@@ -1756,7 +1756,8 @@ static int __devinit snd_es1938_probe(st
 		}
 	}
 	if (snd_mpu401_uart_new(card, 0, MPU401_HW_MPU401,
-				chip->mpu_port, 1, chip->irq, 0, &chip->rmidi) < 0) {
+				chip->mpu_port, MPU401_INFO_INTEGRATED,
+				chip->irq, 0, &chip->rmidi) < 0) {
 		printk(KERN_ERR "es1938: unable to initialize MPU-401\n");
 	} else {
 		// this line is vital for MIDI interrupt handling on ess-solo1
pci/es1968.c +2 -1
diff -r f0a0b4edd60b pci/es1968.c
@@ -2727,7 +2727,8 @@ static int __devinit snd_es1968_probe(st
 	}
 	if (enable_mpu[dev]) {
 		if ((err = snd_mpu401_uart_new(card, 0, MPU401_HW_MPU401,
-					       chip->io_port + ESM_MPU401_PORT, 1,
+					       chip->io_port + ESM_MPU401_PORT,
+					       MPU401_INFO_INTEGRATED,
 					       chip->irq, 0, &chip->rmidi)) < 0) {
 			printk(KERN_WARNING "es1968: skipping MPU-401 MIDI support..\n");
 		}
pci/fm801.c +2 -1
diff -r f0a0b4edd60b pci/fm801.c
@@ -1448,7 +1448,8 @@ static int __devinit snd_card_fm801_prob
 		return err;
 	}
 	if ((err = snd_mpu401_uart_new(card, 0, MPU401_HW_FM801,
-				       FM801_REG(chip, MPU401_DATA), 1,
+				       FM801_REG(chip, MPU401_DATA),
+				       MPU401_INFO_INTEGRATED,
 				       chip->irq, 0, &chip->rmidi)) < 0) {
 		snd_card_free(card);
 		return err;
pci/ice1712/ice1712.c +4 -2
diff -r f0a0b4edd60b pci/ice1712/ice1712.c
@@ -2737,7 +2737,8 @@ static int __devinit snd_ice1712_probe(s
 
 	if (! c->no_mpu401) {
 		if ((err = snd_mpu401_uart_new(card, 0, MPU401_HW_ICE1712,
-					       ICEREG(ice, MPU1_CTRL), 1,
+					       ICEREG(ice, MPU1_CTRL),
+					       MPU401_INFO_INTEGRATED,
 					       ice->irq, 0,
 					       &ice->rmidi[0])) < 0) {
 			snd_card_free(card);
@@ -2752,7 +2753,8 @@ static int __devinit snd_ice1712_probe(s
 		if (ice->eeprom.data[ICE_EEP1_CODEC] & ICE1712_CFG_2xMPU401) {
 			/*  2nd port used  */
 			if ((err = snd_mpu401_uart_new(card, 1, MPU401_HW_ICE1712,
-						       ICEREG(ice, MPU2_CTRL), 1,
+						       ICEREG(ice, MPU2_CTRL),
+						       MPU401_INFO_INTEGRATED,
 						       ice->irq, 0,
 						       &ice->rmidi[1])) < 0) {
 				snd_card_free(card);
pci/ice1712/ice1724.c +2 -1
diff -r f0a0b4edd60b pci/ice1712/ice1724.c
@@ -2388,7 +2388,8 @@ static int __devinit snd_vt1724_probe(st
 	if (! c->no_mpu401) {
 		if (ice->eeprom.data[ICE_EEP2_SYSCONF] & VT1724_CFG_MPU401) {
 			if ((err = snd_mpu401_uart_new(card, 0, MPU401_HW_ICE1712,
-						       ICEREG1724(ice, MPU_CTRL), 1,
+						       ICEREG1724(ice, MPU_CTRL),
+						       MPU401_INFO_INTEGRATED,
 						       ice->irq, 0,
 						       &ice->rmidi[0])) < 0) {
 				snd_card_free(card);
pci/maestro3.c +2 -1
diff -r f0a0b4edd60b pci/maestro3.c
@@ -2861,7 +2861,8 @@ snd_m3_probe(struct pci_dev *pci, const 
 #if 0 /* TODO: not supported yet */
 	/* TODO enable MIDI IRQ and I/O */
 	err = snd_mpu401_uart_new(chip->card, 0, MPU401_HW_MPU401,
-				  chip->iobase + MPU401_DATA_PORT, 1,
+				  chip->iobase + MPU401_DATA_PORT,
+				  MPU401_INFO_INTEGRATED,
 				  chip->irq, 0, &chip->rmidi);
 	if (err < 0)
 		printk(KERN_WARNING "maestro3: no MIDI support.\n");
pci/sonicvibes.c +1 -1
diff -r f0a0b4edd60b pci/sonicvibes.c
@@ -1456,7 +1456,7 @@ static int __devinit snd_sonic_probe(str
 		return err;
 	}
 	if ((err = snd_mpu401_uart_new(card, 0, MPU401_HW_SONICVIBES,
-				       sonic->midi_port, 1,
+				       sonic->midi_port, MPU401_INFO_INTEGRATED,
 				       sonic->irq, 0,
 				       &midi_uart)) < 0) {
 		snd_card_free(card);
pci/trident/trident.c +2 -1
diff -r f0a0b4edd60b pci/trident/trident.c
@@ -148,7 +148,8 @@ static int __devinit snd_trident_probe(s
 	}
 	if (trident->device != TRIDENT_DEVICE_ID_SI7018 &&
 	    (err = snd_mpu401_uart_new(card, 0, MPU401_HW_TRID4DWAVE,
-				       trident->midi_port, 1,
+				       trident->midi_port,
+				       MPU401_INFO_INTEGRATED,
 				       trident->irq, 0, &trident->rmidi)) < 0) {
 		snd_card_free(card);
 		return err;
pci/via82xx.c +1 -1
diff -r f0a0b4edd60b pci/via82xx.c
@@ -1973,7 +1973,7 @@ static int __devinit snd_via686_init_mis
 	pci_write_config_byte(chip->pci, VIA_PNP_CONTROL, legacy_cfg);
 	if (chip->mpu_res) {
 		if (snd_mpu401_uart_new(chip->card, 0, MPU401_HW_VIA686A,
-					mpu_port, 1,
+					mpu_port, MPU401_INFO_INTEGRATED,
 					chip->irq, 0, &chip->rmidi) < 0) {
 			printk(KERN_WARNING "unable to initialize MPU-401"
 			       " at 0x%lx, skipping\n", mpu_port);
pci/ymfpci/ymfpci.c +2 -1
diff -r f0a0b4edd60b pci/ymfpci/ymfpci.c
@@ -308,7 +308,8 @@ static int __devinit snd_card_ymfpci_pro
 	}
 	if (chip->mpu_res) {
 		if ((err = snd_mpu401_uart_new(card, 0, MPU401_HW_YMFPCI,
-					       mpu_port[dev], 1,
+					       mpu_port[dev],
+					       MPU401_INFO_INTEGRATED,
 					       pci->irq, 0, &chip->rawmidi)) < 0) {
 			printk(KERN_WARNING "ymfpci: cannot initialize MPU401 at 0x%lx, skipping...\n", mpu_port[dev]);
 			legacy_ctrl &= ~YMFPCI_LEGACY_MIEN; /* disable MPU401 irq */

-------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642

#2 lore raw
Quoted 9 lines · you

At Fri, 19 May 2006 11:51:24 +0100,

Quoted 6 lines · Alan Horstmann

When a mpu401 midi device is created, it seems to appear as available for both input and output.

However, several ice1712 cards use the 2nd mpu401 port for midi out only and do not make any connection available for input.

Quoted 8 lines
Quoted 2 lines

How can the 2nd device be created for output only so the device does not appear as available for input?

I have the following pending patch on my local tree.
It changes the 5th parameter in snd_mpu401_uart_new() to bit flags, and allows you to choose duplex, separate tx, and mmio mode.

If it looks OK to you, I'll commit it.

Wow! It is not very often something has been tackled before you mention the need! I hope to try this out quickley over the next few days and report back.

Alan

-------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642

#3 lore raw

At Fri, 19 May 2006 17:10:01 +0100,

Quoted 18 lines · Alan Horstmann
Quoted 16 lines · you

At Fri, 19 May 2006 11:51:24 +0100,

Quoted 8 lines · Alan Horstmann

When a mpu401 midi device is created, it seems to appear as available for both input and output.

However, several ice1712 cards use the 2nd mpu401 port for midi out only and do not make any connection available for input.

How can the 2nd device be created for output only so the device does not appear as available for input?

I have the following pending patch on my local tree.
It changes the 5th parameter in snd_mpu401_uart_new() to bit flags, and allows you to choose duplex, separate tx, and mmio mode.

Quoted 5 lines
Quoted 1 line

If it looks OK to you, I'll commit it.

Wow! It is not very often something has been tackled before you mention the need! I hope to try this out quickley over the next few days and report back.

Argh, I found a silly typo in my previous patch.
The fixed one is below.

Takashi

Documentation/DocBook/writing-an-alsa-driver.tmpl +25 -4
diff -r f0a0b4edd60b Documentation/DocBook/writing-an-alsa-driver.tmpl
@@ -4215,7 +4215,7 @@ struct _snd_pcm_runtime {
           <programlisting>
 <![CDATA[
   struct snd_rawmidi *rmidi;
-  snd_mpu401_uart_new(card, 0, MPU401_HW_MPU401, port, integrated,
+  snd_mpu401_uart_new(card, 0, MPU401_HW_MPU401, port, info_flags,
                       irq, irq_flags, &rmidi);
 ]]>
           </programlisting>
@@ -4242,14 +4242,35 @@ struct _snd_pcm_runtime {
       </para>
 
       <para>
+	The 5th argument is bitflags for additional information.
         When the i/o port address above is a part of the PCI i/o
       region, the MPU401 i/o port might have been already allocated
-      (reserved) by the driver itself. In such a case, pass non-zero
-      to the 5th argument
-      (<parameter>integrated</parameter>). Otherwise, pass 0 to it,
+      (reserved) by the driver itself. In such a case, pass a bit flag
+      <constant>MPU401_INFO_INTEGRATED</constant>,
       and 
       the mpu401-uart layer will allocate the i/o ports by itself. 
       </para>
+
+	<para>
+	When the controller supports only the input or output MIDI stream,
+	pass <constant>MPU401_INFO_INPUT</constant> or
+	<constant>MPU401_INFO_OUTPUT</constant> bitflag, respectively.
+	Then the rawmidi instance is created as a single stream.
+	</para>
+
+	<para>
+	<constant>MPU401_INFO_MMIO</constant> bitflag is used to change
+	the access method to MMIO (via readb and writeb) instead of
+	iob and outb.  In this case, you have to pass the iomapped address
+	to <function>snd_mpu401_uart_new()</function>.
+	</para>
+
+	<para>
+	When <constant>MPU401_INFO_TX_IRQ</constant> is set, the output
+	stream isn't checked in the default interrupt handler.  The driver
+	needs to call <function>snd_mpu401_uart_interrupt_tx()</function>
+	by itself to start processing the output stream in irq handler.
+	</para>
 
       <para>
         Usually, the port address corresponds to the command port and
drivers/mpu401/mpu401_uart.c +69 -29

177 lines not on this page · raw message

include/mpu401.h +12 -2
diff -r f0a0b4edd60b include/mpu401.h
@@ -45,6 +45,12 @@
 #define MPU401_HW_PC98II		18	/* Roland PC98II */
 #define MPU401_HW_AUREAL		19	/* Aureal Vortex */
 
+#define MPU401_INFO_INPUT	(1 << 0)	/* input stream */
+#define MPU401_INFO_OUTPUT	(1 << 1)	/* output stream */
+#define MPU401_INFO_INTEGRATED	(1 << 2)	/* integrated h/w port */
+#define MPU401_INFO_MMIO	(1 << 3)	/* MMIO access */
+#define MPU401_INFO_TX_IRQ	(1 << 4)	/* independent TX irq */
+
 #define MPU401_MODE_BIT_INPUT		0
 #define MPU401_MODE_BIT_OUTPUT		1
 #define MPU401_MODE_BIT_INPUT_TRIGGER	2
@@ -62,6 +68,7 @@ struct snd_mpu401 {
 	struct snd_rawmidi *rmidi;
 
 	unsigned short hardware;	/* MPU401_HW_XXXX */
+	unsigned int info_flags;	/* MPU401_INFO_XXX */
 	unsigned long port;		/* base port of MPU-401 chip */
 	unsigned long cport;		/* port + 1 (usually) */
 	struct resource *res;		/* port resource */
@@ -99,13 +106,16 @@ struct snd_mpu401 {
 
  */
 
-irqreturn_t snd_mpu401_uart_interrupt(int irq, void *dev_id, struct pt_regs *regs);
+irqreturn_t snd_mpu401_uart_interrupt(int irq, void *dev_id,
+				      struct pt_regs *regs);
+irqreturn_t snd_mpu401_uart_interrupt_tx(int irq, void *dev_id,
+					 struct pt_regs *regs);
 
 int snd_mpu401_uart_new(struct snd_card *card,
 			int device,
 			unsigned short hardware,
 			unsigned long port,
-			int integrated,
+			unsigned int info_flags,
 			int irq,
 			int irq_flags,
 			struct snd_rawmidi ** rrawmidi);
isa/sscape.c +1 -2
diff -r f0a0b4edd60b isa/sscape.c
@@ -897,10 +897,9 @@ static int __devinit create_mpu401(struc
 	struct snd_rawmidi *rawmidi;
 	int err;
 
-#define MPU401_SHARE_HARDWARE  1
 	if ((err = snd_mpu401_uart_new(card, devnum,
 	                               MPU401_HW_MPU401,
-	                               port, MPU401_SHARE_HARDWARE,
+	                               port, MPU401_INFO_INTEGRATED,
 	                               irq, SA_INTERRUPT,
 	                               &rawmidi)) == 0) {
 		struct snd_mpu401 *mpu = (struct snd_mpu401 *) rawmidi->private_data;
pci/als4000.c +2 -2
diff -r f0a0b4edd60b pci/als4000.c
@@ -746,8 +746,8 @@ static int __devinit snd_card_als4000_pr
 		card->shortname, chip->alt_port, chip->irq);
 
 	if ((err = snd_mpu401_uart_new( card, 0, MPU401_HW_ALS4000,
-				        gcr+0x30, 1, pci->irq, 0,
-				        &chip->rmidi)) < 0) {
+				        gcr+0x30, MPU401_INFO_INTEGRATED,
+					pci->irq, 0, &chip->rmidi)) < 0) {
 		printk(KERN_ERR "als4000: no MPU-401 device at 0x%lx?\n", gcr+0x30);
 		goto out_err;
 	}
pci/au88x0/au88x0_mpu401.c +2 -1
diff -r f0a0b4edd60b pci/au88x0/au88x0_mpu401.c
@@ -95,7 +95,8 @@ static int __devinit snd_vortex_midi(vor
 	port = (unsigned long)(vortex->mmio + VORTEX_MIDI_DATA);
 	if ((temp =
 	     snd_mpu401_uart_new(vortex->card, 0, MPU401_HW_AUREAL, port,
-				 1, 0, 0, &rmidi)) != 0) {
+				 MPU401_INFO_INTEGRATED | MPU401_INFO_MMIO,
+				 0, 0, &rmidi)) != 0) {
 		hwwrite(vortex->mmio, VORTEX_CTRL,
 			(hwread(vortex->mmio, VORTEX_CTRL) &
 			 ~CTRL_MIDI_PORT) & ~CTRL_MIDI_EN);
pci/azt3328.c +2 -2
diff -r f0a0b4edd60b pci/azt3328.c
@@ -1806,8 +1806,8 @@ snd_azf3328_probe(struct pci_dev *pci, c
 	card->private_data = chip;
 
 	if ((err = snd_mpu401_uart_new( card, 0, MPU401_HW_MPU401,
-				        chip->mpu_port, 1, pci->irq, 0,
-				        &chip->rmidi)) < 0) {
+				        chip->mpu_port, MPU401_INFO_INTEGRATED,
+					pci->irq, 0, &chip->rmidi)) < 0) {
 		snd_printk(KERN_ERR "azf3328: no MPU-401 device at 0x%lx?\n", chip->mpu_port);
 		goto out_err;
 	}
pci/cmipci.c +3 -1
diff -r f0a0b4edd60b pci/cmipci.c
@@ -2981,7 +2981,9 @@ static int __devinit snd_cmipci_create(s
 
 	if (iomidi > 0) {
 		if ((err = snd_mpu401_uart_new(card, 0, MPU401_HW_CMIPCI,
-					       iomidi, integrated_midi,
+					       iomidi,
+					       (integrated_midi ?
+						MPU401_INFO_INTEGRATED : 0),
 					       cm->irq, 0, &cm->rmidi)) < 0) {
 			printk(KERN_ERR "cmipci: no UART401 device at 0x%lx\n", iomidi);
 		}
pci/cs5535audio/cs5535audio.c +14 -11
diff -r f0a0b4edd60b pci/cs5535audio/cs5535audio.c
@@ -56,17 +56,16 @@ static struct ac97_quirk ac97_quirks[] _
 	{}
 };
 
-static int index = SNDRV_DEFAULT_IDX1;
-static char *id = SNDRV_DEFAULT_STR1;
-/* for backward compatibility */
-static int enable; 
-
-module_param(index, int, 0444);
+static int index[SNDRV_CARDS] = SNDRV_DEFAULT_IDX;
+static char *id[SNDRV_CARDS] = SNDRV_DEFAULT_STR;
+static int enable[SNDRV_CARDS] = SNDRV_DEFAULT_ENABLE_PNP;
+
+module_param_array(index, int, NULL, 0444);
 MODULE_PARM_DESC(index, "Index value for " DRIVER_NAME);
-module_param(id, charp, 0444);
+module_param_array(id, charp, NULL, 0444);
 MODULE_PARM_DESC(id, "ID string for " DRIVER_NAME);
-module_param(enable, bool, 0444);
-MODULE_PARM_DESC(enable, "Enable for " DRIVER_NAME);
+module_param_array(enable, bool, NULL, 0444);
+MODULE_PARM_DESC(enable, "Enable " DRIVER_NAME);
 
 static struct pci_device_id snd_cs5535audio_ids[] __devinitdata = {
 	{ PCI_DEVICE(PCI_VENDOR_ID_NS, PCI_DEVICE_ID_NS_CS5535_AUDIO) },
@@ -358,8 +357,12 @@ static int __devinit snd_cs5535audio_pro
 
 	if (dev >= SNDRV_CARDS)
 		return -ENODEV;
-
-	card = snd_card_new(index, id, THIS_MODULE, 0);
+	if (!enable[dev]) {
+		dev++;
+		return -ENOENT;
+	}
+
+	card = snd_card_new(index[dev], id[dev], THIS_MODULE, 0);
 	if (card == NULL)
 		return -ENOMEM;
 
pci/es1938.c +2 -1
diff -r f0a0b4edd60b pci/es1938.c
@@ -1756,7 +1756,8 @@ static int __devinit snd_es1938_probe(st
 		}
 	}
 	if (snd_mpu401_uart_new(card, 0, MPU401_HW_MPU401,
-				chip->mpu_port, 1, chip->irq, 0, &chip->rmidi) < 0) {
+				chip->mpu_port, MPU401_INFO_INTEGRATED,
+				chip->irq, 0, &chip->rmidi) < 0) {
 		printk(KERN_ERR "es1938: unable to initialize MPU-401\n");
 	} else {
 		// this line is vital for MIDI interrupt handling on ess-solo1
pci/es1968.c +2 -1
diff -r f0a0b4edd60b pci/es1968.c
@@ -2727,7 +2727,8 @@ static int __devinit snd_es1968_probe(st
 	}
 	if (enable_mpu[dev]) {
 		if ((err = snd_mpu401_uart_new(card, 0, MPU401_HW_MPU401,
-					       chip->io_port + ESM_MPU401_PORT, 1,
+					       chip->io_port + ESM_MPU401_PORT,
+					       MPU401_INFO_INTEGRATED,
 					       chip->irq, 0, &chip->rmidi)) < 0) {
 			printk(KERN_WARNING "es1968: skipping MPU-401 MIDI support..\n");
 		}
pci/fm801.c +2 -1
diff -r f0a0b4edd60b pci/fm801.c
@@ -1448,7 +1448,8 @@ static int __devinit snd_card_fm801_prob
 		return err;
 	}
 	if ((err = snd_mpu401_uart_new(card, 0, MPU401_HW_FM801,
-				       FM801_REG(chip, MPU401_DATA), 1,
+				       FM801_REG(chip, MPU401_DATA),
+				       MPU401_INFO_INTEGRATED,
 				       chip->irq, 0, &chip->rmidi)) < 0) {
 		snd_card_free(card);
 		return err;
pci/ice1712/ice1712.c +4 -2
diff -r f0a0b4edd60b pci/ice1712/ice1712.c
@@ -2737,7 +2737,8 @@ static int __devinit snd_ice1712_probe(s
 
 	if (! c->no_mpu401) {
 		if ((err = snd_mpu401_uart_new(card, 0, MPU401_HW_ICE1712,
-					       ICEREG(ice, MPU1_CTRL), 1,
+					       ICEREG(ice, MPU1_CTRL),
+					       MPU401_INFO_INTEGRATED,
 					       ice->irq, 0,
 					       &ice->rmidi[0])) < 0) {
 			snd_card_free(card);
@@ -2752,7 +2753,8 @@ static int __devinit snd_ice1712_probe(s
 		if (ice->eeprom.data[ICE_EEP1_CODEC] & ICE1712_CFG_2xMPU401) {
 			/*  2nd port used  */
 			if ((err = snd_mpu401_uart_new(card, 1, MPU401_HW_ICE1712,
-						       ICEREG(ice, MPU2_CTRL), 1,
+						       ICEREG(ice, MPU2_CTRL),
+						       MPU401_INFO_INTEGRATED,
 						       ice->irq, 0,
 						       &ice->rmidi[1])) < 0) {
 				snd_card_free(card);
pci/ice1712/ice1724.c +2 -1
diff -r f0a0b4edd60b pci/ice1712/ice1724.c
@@ -2388,7 +2388,8 @@ static int __devinit snd_vt1724_probe(st
 	if (! c->no_mpu401) {
 		if (ice->eeprom.data[ICE_EEP2_SYSCONF] & VT1724_CFG_MPU401) {
 			if ((err = snd_mpu401_uart_new(card, 0, MPU401_HW_ICE1712,
-						       ICEREG1724(ice, MPU_CTRL), 1,
+						       ICEREG1724(ice, MPU_CTRL),
+						       MPU401_INFO_INTEGRATED,
 						       ice->irq, 0,
 						       &ice->rmidi[0])) < 0) {
 				snd_card_free(card);
pci/maestro3.c +2 -1
diff -r f0a0b4edd60b pci/maestro3.c
@@ -2861,7 +2861,8 @@ snd_m3_probe(struct pci_dev *pci, const 
 #if 0 /* TODO: not supported yet */
 	/* TODO enable MIDI IRQ and I/O */
 	err = snd_mpu401_uart_new(chip->card, 0, MPU401_HW_MPU401,
-				  chip->iobase + MPU401_DATA_PORT, 1,
+				  chip->iobase + MPU401_DATA_PORT,
+				  MPU401_INFO_INTEGRATED,
 				  chip->irq, 0, &chip->rmidi);
 	if (err < 0)
 		printk(KERN_WARNING "maestro3: no MIDI support.\n");
pci/sonicvibes.c +1 -1
diff -r f0a0b4edd60b pci/sonicvibes.c
@@ -1456,7 +1456,7 @@ static int __devinit snd_sonic_probe(str
 		return err;
 	}
 	if ((err = snd_mpu401_uart_new(card, 0, MPU401_HW_SONICVIBES,
-				       sonic->midi_port, 1,
+				       sonic->midi_port, MPU401_INFO_INTEGRATED,
 				       sonic->irq, 0,
 				       &midi_uart)) < 0) {
 		snd_card_free(card);
pci/trident/trident.c +2 -1
diff -r f0a0b4edd60b pci/trident/trident.c
@@ -148,7 +148,8 @@ static int __devinit snd_trident_probe(s
 	}
 	if (trident->device != TRIDENT_DEVICE_ID_SI7018 &&
 	    (err = snd_mpu401_uart_new(card, 0, MPU401_HW_TRID4DWAVE,
-				       trident->midi_port, 1,
+				       trident->midi_port,
+				       MPU401_INFO_INTEGRATED,
 				       trident->irq, 0, &trident->rmidi)) < 0) {
 		snd_card_free(card);
 		return err;
pci/via82xx.c +1 -1
diff -r f0a0b4edd60b pci/via82xx.c
@@ -1973,7 +1973,7 @@ static int __devinit snd_via686_init_mis
 	pci_write_config_byte(chip->pci, VIA_PNP_CONTROL, legacy_cfg);
 	if (chip->mpu_res) {
 		if (snd_mpu401_uart_new(chip->card, 0, MPU401_HW_VIA686A,
-					mpu_port, 1,
+					mpu_port, MPU401_INFO_INTEGRATED,
 					chip->irq, 0, &chip->rmidi) < 0) {
 			printk(KERN_WARNING "unable to initialize MPU-401"
 			       " at 0x%lx, skipping\n", mpu_port);
pci/ymfpci/ymfpci.c +2 -1
diff -r f0a0b4edd60b pci/ymfpci/ymfpci.c
@@ -308,7 +308,8 @@ static int __devinit snd_card_ymfpci_pro
 	}
 	if (chip->mpu_res) {
 		if ((err = snd_mpu401_uart_new(card, 0, MPU401_HW_YMFPCI,
-					       mpu_port[dev], 1,
+					       mpu_port[dev],
+					       MPU401_INFO_INTEGRATED,
 					       pci->irq, 0, &chip->rawmidi)) < 0) {
 			printk(KERN_WARNING "ymfpci: cannot initialize MPU401 at 0x%lx, skipping...\n", mpu_port[dev]);
 			legacy_ctrl &= ~YMFPCI_LEGACY_MIEN; /* disable MPU401 irq */

-------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642

#4 lore raw
Quoted 20 lines · you

At Fri, 19 May 2006 17:10:01 +0100,

Quoted 17 lines · Alan Horstmann
Quoted 16 lines · you

At Fri, 19 May 2006 11:51:24 +0100,

Quoted 8 lines · Alan Horstmann

When a mpu401 midi device is created, it seems to appear as available for both input and output.

However, several ice1712 cards use the 2nd mpu401 port for midi out only and do not make any connection available for input.

How can the 2nd device be created for output only so the device does not appear as available for input?

I have the following pending patch on my local tree.
It changes the 5th parameter in snd_mpu401_uart_new() to bit flags, and allows you to choose duplex, separate tx, and mmio mode.

Quoted 8 lines
Quoted 5 lines
Quoted 1 line

If it looks OK to you, I'll commit it.

Wow! It is not very often something has been tackled before you mention the need! I hope to try this out quickley over the next few days and report back.

Argh, I found a silly typo in my previous patch.
The fixed one is below.

Took a bit of effort to get patch to apply to 1.0.11 here, but eventually suceeded to get it to compile and run, with MPU401_INFO_INTEGRATED in all occurances.
Then changed ice1712.c 2nd port to MPU401_INFO_OUTPUT. Loading the driver failled:

linux kernel: ALSA ../../alsa-kernel/drivers/mpu401/mpu401_uart.c:548:
mpu401_uart: unable to grab port 0xc81c size 2

Perhaps if ! ( _INTEGRATED) at this section should include _OUTPUT and _INPUT flags?

Anyway I //out these 8 lines and the driver would load. However,

Quoted 1 line

cat /proc/asound/seq/clients

Client info
cur clients : 3
peak clients : 4
max clients : 192

Client   0 : "System" [Kernel]
  Port   0 : "Timer" (Rwe-)
  Port   1 : "Announce" (R-e-)

Client 16 : "TerraTec DMX6Fire" [Kernel]
Port 0 : "MIDI-Front DMX6fire 0" (RWeX)
Port 32 : "Wavetable DMX6fire 0" (--e-)
Client 20 : "Aureal Vortex au8820" [Kernel]
Port 0 : "au8820 MIDI 1" (RWeX)

shows(?) that the wavetable device is not writable. aplaymidi cannot open the port, and doesn't list it.

Suggestions as to what causes this? Have checked out_enable=1, input_enable=0 for the 2nd port.

Is this patch going to be appropriate where a duplex port (ie the envy24 chip) is used for output only?

Regards Alan

-------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642

#5 lore raw

At Mon, 22 May 2006 14:18:51 +0100,

Quoted 37 lines · Alan Horstmann
Quoted 20 lines · you

At Fri, 19 May 2006 17:10:01 +0100,

Quoted 17 lines · Alan Horstmann
Quoted 16 lines · you

At Fri, 19 May 2006 11:51:24 +0100,

Quoted 8 lines · Alan Horstmann

When a mpu401 midi device is created, it seems to appear as available for both input and output.

However, several ice1712 cards use the 2nd mpu401 port for midi out only and do not make any connection available for input.

How can the 2nd device be created for output only so the device does not appear as available for input?

I have the following pending patch on my local tree.
It changes the 5th parameter in snd_mpu401_uart_new() to bit flags, and allows you to choose duplex, separate tx, and mmio mode.

Quoted 8 lines
Quoted 5 lines
Quoted 1 line

If it looks OK to you, I'll commit it.

Wow! It is not very often something has been tackled before you mention the need! I hope to try this out quickley over the next few days and report back.

Argh, I found a silly typo in my previous patch.
The fixed one is below.

Took a bit of effort to get patch to apply to 1.0.11 here, but eventually suceeded to get it to compile and run, with MPU401_INFO_INTEGRATED in all occurances.
Then changed ice1712.c 2nd port to MPU401_INFO_OUTPUT. Loading the driver failled:

Quoted 5 lines
   linux kernel: ALSA ../../alsa-kernel/drivers/mpu401/mpu401_uart.c:548:  

mpu401_uart: unable to grab port 0xc81c size 2

Perhaps if ! ( _INTEGRATED) at this section should include _OUTPUT and _INPUT flags?

snd_mpu401_uart_new() assumes the full-duplex if neither OUTPUT nor INPUT flag is set. It's just for convenience.

The port allocation should have nothing to do with full or half duplex. If the port is given and no INTEGRATED flag is set, the function tries to allocate the port. The error message above means that the port is already allocated.

You should set it "MPU401_INFO_OUTPUT | MPU401_INFO_INTEGRATED".

Quoted 17 lines

Anyway I //out these 8 lines and the driver would load. However,

Quoted 1 line

cat /proc/asound/seq/clients

Client info
cur clients : 3
peak clients : 4
max clients : 192

Client   0 : "System" [Kernel]
  Port   0 : "Timer" (Rwe-)
  Port   1 : "Announce" (R-e-)

Client 16 : "TerraTec DMX6Fire" [Kernel]
Port 0 : "MIDI-Front DMX6fire 0" (RWeX)
Port 32 : "Wavetable DMX6fire 0" (--e-)
Client 20 : "Aureal Vortex au8820" [Kernel]
Port 0 : "au8820 MIDI 1" (RWeX)

Quoted 8 lines

shows(?) that the wavetable device is not writable. aplaymidi cannot open the port, and doesn't list it.

Suggestions as to what causes this? Have checked out_enable=1, input_enable=0 for the 2nd port.

Is this patch going to be appropriate where a duplex port (ie the envy24 chip) is used for output only?

Yes. Basically I wrote the patch for a new driver for Envy24-II chip, but it's good for others, too.

Takashi

-------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642

#6 lore raw
Quoted 18 lines · you

At Mon, 22 May 2006 14:18:51 +0100,

Quoted 11 lines · Alan Horstmann

Took a bit of effort to get patch to apply to 1.0.11 here, but eventually suceeded to get it to compile and run, with MPU401_INFO_INTEGRATED in all occurances.
Then changed ice1712.c 2nd port to MPU401_INFO_OUTPUT. Loading the driver failled:

   linux kernel: ALSA ../../alsa-kernel/drivers/mpu401/mpu401_uart.c:548:

mpu401_uart: unable to grab port 0xc81c size 2

Perhaps if ! ( _INTEGRATED) at this section should include _OUTPUT and _INPUT flags?

snd_mpu401_uart_new() assumes the full-duplex if neither OUTPUT nor INPUT flag is set. It's just for convenience.

Quoted 6 lines

The port allocation should have nothing to do with full or half duplex. If the port is given and no INTEGRATED flag is set, the function tries to allocate the port. The error message above means that the port is already allocated.

You should set it "MPU401_INFO_OUTPUT | MPU401_INFO_INTEGRATED".

OK, I mis-understood how to use the flags. That sorts out the error

Quoted 16 lines
Quoted 16 lines

cat /proc/asound/seq/clients

Client info
cur clients : 3
peak clients : 4
max clients : 192

Client   0 : "System" [Kernel]
  Port   0 : "Timer" (Rwe-)
  Port   1 : "Announce" (R-e-)

Client 16 : "TerraTec DMX6Fire" [Kernel]
Port 0 : "MIDI-Front DMX6fire 0" (RWeX)
Port 32 : "Wavetable DMX6fire 0" (--e-)
Client 20 : "Aureal Vortex au8820" [Kernel]
Port 0 : "au8820 MIDI 1" (RWeX)

Quoted 5 lines
Quoted 5 lines

shows(?) that the wavetable device is not writable. aplaymidi cannot open the port, and doesn't list it.

Suggestions as to what causes this? Have checked out_enable=1, input_enable=0 for the 2nd port.

This is just the same; the port has become not-writable (--e-)? It was working duplex without _INFO_OUTPUT flag.

Thanks Alan

-------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642

#7 lore raw

At Tue, 23 May 2006 10:44:41 +0100,

Quoted 45 lines · Alan Horstmann
Quoted 18 lines · you

At Mon, 22 May 2006 14:18:51 +0100,

Quoted 11 lines · Alan Horstmann

Took a bit of effort to get patch to apply to 1.0.11 here, but eventually suceeded to get it to compile and run, with MPU401_INFO_INTEGRATED in all occurances.
Then changed ice1712.c 2nd port to MPU401_INFO_OUTPUT. Loading the driver failled:

   linux kernel: ALSA ../../alsa-kernel/drivers/mpu401/mpu401_uart.c:548:

mpu401_uart: unable to grab port 0xc81c size 2

Perhaps if ! ( _INTEGRATED) at this section should include _OUTPUT and _INPUT flags?

snd_mpu401_uart_new() assumes the full-duplex if neither OUTPUT nor INPUT flag is set. It's just for convenience.

Quoted 6 lines

The port allocation should have nothing to do with full or half duplex. If the port is given and no INTEGRATED flag is set, the function tries to allocate the port. The error message above means that the port is already allocated.

You should set it "MPU401_INFO_OUTPUT | MPU401_INFO_INTEGRATED".

OK, I mis-understood how to use the flags. That sorts out the error

Quoted 16 lines
Quoted 16 lines

cat /proc/asound/seq/clients

Client info
cur clients : 3
peak clients : 4
max clients : 192

Client   0 : "System" [Kernel]
  Port   0 : "Timer" (Rwe-)
  Port   1 : "Announce" (R-e-)

Client 16 : "TerraTec DMX6Fire" [Kernel]
Port 0 : "MIDI-Front DMX6fire 0" (RWeX)
Port 32 : "Wavetable DMX6fire 0" (--e-)
Client 20 : "Aureal Vortex au8820" [Kernel]
Port 0 : "au8820 MIDI 1" (RWeX)

Quoted 8 lines
Quoted 5 lines
Quoted 5 lines

shows(?) that the wavetable device is not writable. aplaymidi cannot open the port, and doesn't list it.

Suggestions as to what causes this? Have checked out_enable=1, input_enable=0 for the 2nd port.

This is just the same; the port has become not-writable (--e-)? It was working duplex without _INFO_OUTPUT flag.

My bad. The input and output are swapped at calling snd_rawmidi_new().

I committed the fixed change to HG repo now. Please use HG repo instead.

Takashi

-------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642

#8 lore raw
Quoted 5 lines · you

My bad. The input and output are swapped at calling snd_rawmidi_new().

I committed the fixed change to HG repo now. Please use HG repo instead.

That was it! Great. Swapped input and output arguments, and code functions with MPU401_INFO_OUTPUT as expected.

Patch for ice1712 next, as separate thread.

Alan

-------------------------------------------------------
All the advantages of Linux Managed Hosting--Without the Cost and Risk! Fully trained technicians. The highest number of Red Hat certifications in the hosting industry. Fanatical Support. Click to learn more
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=107521&bid=248729&dat=121642