Skip to contentSkip to conversation

YMFPCI No midi record.

DISCUSSION Donald M Burns 2 participants 3 messages Mar 30, 2003 – Apr 1, 2003

lore
Share & tools
lore
#0 lore raw

Hi all,

I've just downloaded and installed ALSA 0.9.2 complete with OSS emulation. I'm using an Addonics Sound Vision SV550 which is based on the Yamaha YMF724F chip, and running Red Hat 7.3.

Whilest all is OK with the PCM and OPL3 bits the MIDI record function does not work. This is the contents of /proc/asound/card0/midi0 while playing the synth's keyboard:-
MPU-401 (UART) 0-0

Output 0

  Tx bytes     : 201410
  Mode         : native
  Buffer size  : 4096
  Avail        : 4096
Input 0
  Rx bytes     : 0
  Buffer size  : 4096
  Avail        : 0
  Overruns     : 0

I had a similar problem with old OSS driver (ymfpci.c) and tracked it down to the fact that only ISA interrupts for the midi were supported by the driver. This means that the driver is OK for midi on motherboard mounted chips but cannot work with PCI cards as there is no way to route an ISA interrupt across the PCI bus. I came up with a simple patch which fixed it in the end.

I was wondering if we had the same problem with ALSA driver.

Any comments would be much appreciated.

Best Regards,

Donald.

-------------------------------------------------------
This SF.net email is sponsored by:
The Definitive IT and Networking Event. Be There! NetWorld+Interop Las Vegas 2003 -- Register today!
http://ads.sourceforge.net/cgi-bin/redirect.pl?keyn0001en

#1 lore raw
Quoted 12 lines · Donald M Burns

I've just downloaded and installed ALSA 0.9.2 complete with OSS emulation. I'm using an Addonics Sound Vision SV550 which is based on the Yamaha YMF724F chip, and running Red Hat 7.3.

Whilest all is OK with the PCM and OPL3 bits the MIDI record function does not work. [...]
I had a similar problem with old OSS driver (ymfpci.c) and tracked it down to the fact that only ISA interrupts for the midi were supported by the driver. This means that the driver is OK for midi on motherboard mounted chips but cannot work with PCI cards as there is no way to route an ISA interrupt across the PCI bus. I came up with a simple patch which fixed it in the end.

Quoted 1 line

I was wondering if we had the same problem with ALSA driver.

snd_card_ymfpci_probe() contains the following code:

	...
	// this bit is for legacy mpu irqs
	// legacy_ctrl |= 0x10; /* MPU401 irq enable */
	legacy_ctrl2 |= 1 << 15; /* IMOD */
	...
	if ((err = snd_mpu401_uart_new(card, 0, MPU401_HW_YMFPCI,
				       mpu_port[dev], 0,
				       pci->irq, 0, &chip->rawmidi)) < 0) {
		printk(KERN_WARNING "ymfpci: cannot initialize MPU401 at 0x%lx, skipping...\n", mpu_port[dev]);
		mpu_port[dev] = 0;
		// only for legacy mpu irqs
		// legacy_ctrl &= ~0x10; /* disable MPU401 irq */
		// pci_write_config_word(pci, PCIR_DSXG_LEGACY, legacy_ctrl);
	}
	...

This code apparently assumes that the MIDI port uses the PCI interrupt line. I don't have a ymfpci card, so I don't know if this assumption is correct, or what the "IMOD" bit does.

HTH
Clemens

-------------------------------------------------------
This SF.net email is sponsored by: ValueWeb:
Dedicated Hosting for just $79/mo with 500 GB of bandwidth! No other company gives more support or power for your dedicated server
http://click.atdmt.com/AFF/go/sdnxxaff00300020aff/direct/01/

#2 lore raw
In reply to Donald M Burns

Hi all,

Although I got no response with my previous posting I am going to carry on until somebody sits up and listens (it would be rude not to!).

I have been through the ymfpci.c file and as I suspected the mpu401 interupt was NOT enable. The line in question is 166 viz:-

                //legacy_ctrl |= 0x10; /* MPU401 irq enable */

Note the comment // mark at the begining. Making the line active fixes the midi recieve function as cat /dev/midi produces a gentle stream of heartbeats from my Korg Keyboard. However, Jazz still won't record with ALSA-OSS drivers but pure OSS works just fine. I suspect it could be to do with connection between midi devices and would appreciate some expert help. Here is /proc/asound/seq/clients while jazz is running.
Client info
cur clients : 4
peak clients : 5
max clients : 192

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

Client 63 : "OSS sequencer" [Kernel]
Port 0 : "Receiver" (-we-)
Connected From: 0:1
Port 1 : "Sequencer-0" (rwe-)

    Connecting To: 64:0
    Connected From: 64:0[t:0]
  Output pool :
    Pool size          : 1024
    Cells in use       : 0
    Peak cells in use  : 138
    Alloc success      : 20361
    Alloc failures     : 0

Client 64 : "Rawmidi 0 - MPU-401 (UART) 0-0" [Kernel]
Port 0 : "MPU-401 (UART) 0-0" (RWeX)
Connecting To: 63:1[t:0]
Connected From: 63:1
Client 65 : "OPL3 FM synth" [Kernel]
Port 0 : "OPL3 Port" (-We-)
Port 1 : "OPL3 OSS Port" (-we-)

All help would be most kindly recieved.

Best Regards,

Donald.

-------------------------------------------------------
This SF.net email is sponsored by: ValueWeb:
Dedicated Hosting for just $79/mo with 500 GB of bandwidth! No other company gives more support or power for your dedicated server
http://click.atdmt.com/AFF/go/sdnxxaff00300020aff/direct/01/