Skip to contentSkip to conversation

ICE 1724 MIDI support still broken?

DISCUSSION Daniel James 2 participants 4 messages Apr 19, 2007 – Apr 24, 2007

lore
Share & tools
lore
#0 lore raw

Hello ALSA team,

We have a user with an ESI Juli@ whose Linux box hangs when any MIDI application starts up. I read that MIDI support is broken generally on ICE 1724 cards; is this still the case in recent driver releases?

If so, is there any interest in fixing this long-standing issue? The user has indicated that his box would be available by ssh for any tests required.

Cheers!

Daniel

#1 lore raw

At Thu, 19 Apr 2007 16:15:26 +0100,

Quoted 10 lines · Daniel James

Hello ALSA team,

We have a user with an ESI Juli@ whose Linux box hangs when any MIDI application starts up. I read that MIDI support is broken generally on ICE 1724 cards; is this still the case in recent driver releases?

If so, is there any interest in fixing this long-standing issue? The user has indicated that his box would be available by ssh for any tests required.

Well, Juli is hard to fix right now from my side because of lack of hardware information. Maybe Jaroslav can do better because he apparently had contact with ESI.

Takashi

#2 lore raw

At Mon, 23 Apr 2007 12:16:11 +0200,

Quoted 10 lines · 私 wrote:

At Thu, 19 Apr 2007 16:15:26 +0100,

Quoted 7 lines · Daniel James

Hello ALSA team,

We have a user with an ESI Juli@ whose Linux box hangs when any MIDI application starts up. I read that MIDI support is broken generally on ICE 1724 cards; is this still the case in recent driver releases?

Quoted 7 lines
Quoted 3 lines

If so, is there any interest in fixing this long-standing issue? The user has indicated that his box would be available by ssh for any tests required.

Well, Juli is hard to fix right now from my side because of lack of hardware information. Maybe Jaroslav can do better because he apparently had contact with ESI.

I took a bit look at specs and tried to hack.
The below is a revised patch just for fixing possible problems blindly. It extends mpu401_uart API, too. Give it a spin if you'd like.

The irq handler has a check of possible endless loops, so it shouldn't hang up so immediately. Check the kernel log.

If you get a message like "cmd: 0x3f failed at ...", try to uncomment MPU401_INFO_NO_ACK in the argument of snd_mpu401_uart_new() in ice1724.c.

You can try also set watermarks by commenting out the block around line ice1724.c:2465 (/* for testing */) in the case of endless irq loops.

The patch is against HG version, and I won't debug any older version.

Takashi

drivers/mpu401/mpu401_uart.c +5 -7
diff -r f73f5a4fa439 drivers/mpu401/mpu401_uart.c
@@ -50,12 +50,10 @@ static void snd_mpu401_uart_output_write
 
  */
 
-#define snd_mpu401_input_avail(mpu)	(!(mpu->read(mpu, MPU401C(mpu)) & 0x80))
-#define snd_mpu401_output_ready(mpu)	(!(mpu->read(mpu, MPU401C(mpu)) & 0x40))
-
-#define MPU401_RESET		0xff
-#define MPU401_ENTER_UART	0x3f
-#define MPU401_ACK		0xfe
+#define snd_mpu401_input_avail(mpu) \
+	(!(mpu->read(mpu, MPU401C(mpu)) & MPU401_RX_EMPTY))
+#define snd_mpu401_output_ready(mpu) \
+	(!(mpu->read(mpu, MPU401C(mpu)) & MPU401_TX_FULL))
 
 /* Build in lowlevel io */
 static void mpu401_write_port(struct snd_mpu401 *mpu, unsigned char data,
@@ -242,7 +240,7 @@ static int snd_mpu401_uart_cmd(struct sn
 #endif
 	}
 	mpu->write(mpu, cmd, MPU401C(mpu));
-	if (ack) {
+	if (ack && !(mpu->info_flags & MPU401_INFO_NO_ACK)) {
 		ok = 0;
 		timeout = 10000;
 		while (!ok && timeout-- > 0) {
include/mpu401.h +16 -0
diff -r f73f5a4fa439 include/mpu401.h
@@ -51,6 +51,7 @@
 #define MPU401_INFO_MMIO	(1 << 3)	/* MMIO access */
 #define MPU401_INFO_TX_IRQ	(1 << 4)	/* independent TX irq */
 #define MPU401_INFO_UART_ONLY	(1 << 5)	/* No ENTER_UART cmd needed */
+#define MPU401_INFO_NO_ACK	(1 << 6)	/* No ACK cmd needed */
 
 #define MPU401_MODE_BIT_INPUT		0
 #define MPU401_MODE_BIT_OUTPUT		1
@@ -104,6 +105,21 @@ struct snd_mpu401 {
 #define MPU401D(mpu) (mpu)->port
 
 /*
+ * control register bits
+ */
+/* read MPU401C() */
+#define MPU401_RX_EMPTY		0x80
+#define MPU401_TX_FULL		0x40
+
+/* write MPU401C() */
+#define MPU401_RESET		0xff
+#define MPU401_ENTER_UART	0x3f
+
+/* read MPU401D() */
+#define MPU401_ACK		0xfe
+
+
+/*
 
  */
 
pci/ice1712/ice1724.c +74 -14

126 lines not on this page · raw message

#3 lore raw

Hi Takashi,

Quoted 4 lines

I took a bit look at specs and tried to hack.
The below is a revised patch just for fixing possible problems blindly. It extends mpu401_uart API, too. Give it a spin if you'd like.

Thanks, we'll give it a try.

Cheers!

Daniel