I've been attempting to configure ALSA to use a ymf744 sound card Almost all is working expect some sort of midi sound. It appears that the XG synth is probably not supported. However, it appears that the driver does have opl3 capabilities(at least the driver registers an opl3 device). This is what I have been trying to get to work as a midi synth. My basic testing method has been pmidi -p 65:0 W2Humans.mid and playmidi [-r] W2Humans.mid Both is which seems to hang for 3 minutes(the length of the clip) and playmidi -r seems to indicate that indeed the play thinks the midi file is playing. I have also been using sbiload to load std.o3 and drum.o3 as opl3 patches. --------------------------------------------------------------------- Test update --------------------------------------------------------------------- I've include the source for a simple hello world program to use /dev/dmfm directly. #include #include #include #include #include #include #include const char soundfile[] = "/dev/dmfm"; int main() { int fmdev; fmdev = (soundfile, O_WRONLY); if (fmdev < 0) { perror("Opening Device"); exit(1); } if (ioctl(fmdev, 0x20) == -1) { perror("Resetting Device"); } if (ioctl(fmdev, 0x25, 0x01) == -1) { perror("To OPL3 mode Device"); close(fmdev); exit(1); } close(fmdev); perror("Done"); } This produces the output: Resetting Device: Invalid argument To OPL3 mode Device: Invalid argument --------------------------------------------------------------------- Loaded Modules --------------------------------------------------------------------- This is a list of modules which are loaded by the alsasound file, this is the stock file with the aid /etc/alsa.d/ymfpci snd-seq-midi snd-seq-oss snd-seq-midi-event snd-pcm-oss snd-mixer-oss snd-opl3-synth snd-seq-instr snd-seq-midi-emul snd-seq snd-ainstr-fm snd-ymfpci snd-pcm snd-mpu401-uart snd-rawmidi snd-opl3-lib snd-hwdep snd-seq-device snd-timer snd-ac97-codec snd soundcore --------------------------------------------------------------------- /etc/alsa.d/ymfpci --------------------------------------------------------------------- #!/bin/sh # #insert oss modules # echo -n " Loading OSS Compatibility Modules: " /sbin/modprobe snd-pcm-oss /sbin/modprobe snd-seq-oss echo "Done." # # load opl3 patches # echo -n " Loading OPL3 Patches: " /sbin/opl3-patches 0 echo "Done." --------------------------------------------------------------------- /sbin/opl3-patches --------------------------------------------------------------------- #!/bin/sh /usr/bin/sbiload -p65:0 -v $1 --opl3 /usr/share/alsa/banks/opl3/std.o3 \ /usr/share/alsa/banks/opl3/drums.o3 --------------------------------------------------------------------- /etc/modules.conf(relavent) --------------------------------------------------------------------- ####################################### #ALSA Core ####################################### # ALSA portion alias char-major-116 snd options snd snd_cards_limit=1 snd_device_mode=660 snd_device_gid=29 # OSS/Free portion alias char-major-14 soundcore ####################################### #ALSA Drivers ####################################### # ALSA portion alias snd-card-0 snd-ymfpci options snd-ymfpci snd_mpu_port=0x330 snd_fm_port=0x388 # OSS/Free portion alias sound-slot-0 snd-card-0 alias sound-service-0-0 snd-mixer-oss alias sound-service-0-1 snd-seq-oss alias sound-service-0-3 snd-pcm-oss alias sound-service-0-8 snd-seq-oss alias sound-service-0-12 snd-pcm-oss --------------------------------------------------------------------- pmidi -l gives --------------------------------------------------------------------- Port Client name Port name 64:0 External MIDI 0 MIDI 0-0 65:0 OPL3 FM synth OPL3 Port --------------------------------------------------------------------- /proc/pci and /proc/ioports output --------------------------------------------------------------------- Bus 0, device 9, function 0: Multimedia audio controller: Yamaha Corporation YMF-744B [DS-1S Audio Controller] (rev 2). IRQ 5. Master Capable. Latency=32. Min Gnt=5.Max Lat=25. Non-prefetchable 32 bit memory at 0xdb000000 [0xdb007fff]. I/O at 0xdc00 [0xdc3f]. I/O at 0xe000 [0xe003]. 0330-0331 : MPU401 UART 0388-0389 : OPL2/3 (left) 038a-038b : OPL2/3 (right) dc00-dc3f : Yamaha Corporation YMF-744B [DS-1S Audio Controller] e000-e003 : Yamaha Corporation YMF-744B [DS-1S Audio Controller] --------------------------------------------------------------------- /proc/asound/version --------------------------------------------------------------------- Advanced Linux Sound Architecture Driver Version 0.9.0rc3. Compiled on Oct 7 2002 for kernel 2.4.19-xfs with versioned symbols. --------------------------------------------------------------------- /prov/asound/seq/clients --------------------------------------------------------------------- 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 Client 64 : "External MIDI 0" [Kernel] Port 0 : "MIDI 0-0" (RWeX) Client 65 : "OPL3 FM synth" [Kernel] Port 0 : "OPL3 Port" (-We-) Port 1 : "OPL3 OSS Port" (-we-) --------------------------------------------------------------------- /proc/asound/oss/sndstat --------------------------------------------------------------------- Sound Driver:3.8.1a-980706 (ALSA v0.9.0rc3 emulation code) Kernel: Linux werg 2.4.19-xfs #10 Wed Sep 4 16:03:58 CDT 2002 i686 Config options: 0 Installed drivers: Type 10: ALSA emulation Card config: Yamaha DS-XG PCI (YMF744) at 0xd8911000, irq 5 Audio devices: 0: YMFPCI (DUPLEX) Synth devices: 0: OPL3 FM synth Midi devices: 0: MPU-401 (UART) Timers: 7: system timer Mixers: 0: SigmaTel STAC9708/11 --------------------------------------------------------------------- /proc/asound/card0/oss_mixer --------------------------------------------------------------------- VOLUME "Master" 0 BASS "" 0 TREBLE "" 0 SYNTH "" 0 PCM "PCM" 0 SPEAKER "PC Speaker" 0 LINE "Line" 0 MIC "Mic" 0 CD "CD" 0 IMIX "" 0 ALTPCM "" 0 RECLEV "" 0 IGAIN "Capture" 0 OGAIN "" 0 LINE1 "Aux" 0 LINE2 "" 0 LINE3 "" 0 DIGITAL1 "Digital" 0 DIGITAL2 "Digital" 1 DIGITAL3 "" 0 PHONEIN "Phone" 0 PHONEOUT "" 0 VIDEO "Video" 0 RADIO "" 0 MONITOR "" 0 --------------------------------------------------------------------- My asound.state(long) which I am using is at --------------------------------------------------------------------- state.card0 { control.1 { comment.access 'read write' comment.type BOOLEAN iface MIXER name 'Master Playback Switch' value true } control.2 { comment.access 'read write' comment.type INTEGER comment.range '0 - 31' iface MIXER name 'Master Playback Volume' value.0 31 value.1 31 } control.3 { comment.access 'read write' comment.type BOOLEAN iface MIXER name 'Surround Playback Switch' value.0 true value.1 true } control.4 { comment.access 'read write' comment.type INTEGER comment.range '0 - 31' iface MIXER name 'Surround Playback Volume' value.0 31 value.1 31 } control.5 { comment.access 'read write' comment.type BOOLEAN iface MIXER name 'Master Mono Playback Switch' value true } control.6 { comment.access 'read write' comment.type INTEGER comment.range '0 - 31' iface MIXER name 'Master Mono Playback Volume' value 31 } control.7 { comment.access 'read write' comment.type BOOLEAN iface MIXER name 'PC Speaker Playback Switch' value true } control.8 { comment.access 'read write' comment.type INTEGER comment.range '0 - 15' iface MIXER name 'PC Speaker Playback Volume' value 15 } control.9 { comment.access 'read write' comment.type BOOLEAN iface MIXER name 'Phone Playback Switch' value true } control.10 { comment.access 'read write' comment.type INTEGER comment.range '0 - 31' iface MIXER name 'Phone Playback Volume' value 31 } control.11 { comment.access 'read write' comment.type BOOLEAN iface MIXER name 'Mic Playback Switch' value false } control.12 { comment.access 'read write' comment.type INTEGER comment.range '0 - 31' iface MIXER name 'Mic Playback Volume' value 0 } control.13 { comment.access 'read write' comment.type BOOLEAN iface MIXER name 'Mic Boost (+20dB)' value false } control.14 { comment.access 'read write' comment.type BOOLEAN iface MIXER name 'Line Playback Switch' value true } control.15 { comment.access 'read write' comment.type INTEGER comment.range '0 - 31' iface MIXER name 'Line Playback Volume' value.0 31 value.1 31 } control.16 { comment.access 'read write' comment.type BOOLEAN iface MIXER name 'CD Playback Switch' value true } control.17 { comment.access 'read write' comment.type INTEGER comment.range '0 - 31' iface MIXER name 'CD Playback Volume' value.0 31 value.1 31 } control.18 { comment.access 'read write' comment.type BOOLEAN iface MIXER name 'Video Playback Switch' value true } control.19 { comment.access 'read write' comment.type INTEGER comment.range '0 - 31' iface MIXER name 'Video Playback Volume' value.0 31 value.1 31 } control.20 { comment.access 'read write' comment.type BOOLEAN iface MIXER name 'Aux Playback Switch' value true } control.21 { comment.access 'read write' comment.type INTEGER comment.range '0 - 31' iface MIXER name 'Aux Playback Volume' value.0 31 value.1 31 } control.22 { comment.access 'read write' comment.type BOOLEAN iface MIXER name 'PCM Playback Switch' value true } control.23 { comment.access 'read write' comment.type INTEGER comment.range '0 - 31' iface MIXER name 'PCM Playback Volume' value.0 31 value.1 31 } control.24 { comment.access 'read write' comment.type ENUMERATED comment.item.0 Mic comment.item.1 CD comment.item.2 Video comment.item.3 Aux comment.item.4 Line comment.item.5 Mix comment.item.6 'Mix Mono' comment.item.7 Phone iface MIXER name 'Capture Source' value.0 Mic value.1 Mic } control.25 { comment.access 'read write' comment.type BOOLEAN iface MIXER name 'Capture Switch' value true } control.26 { comment.access 'read write' comment.type INTEGER comment.range '0 - 15' iface MIXER name 'Capture Volume' value.0 15 value.1 15 } control.27 { comment.access 'read write' comment.type ENUMERATED comment.item.0 'pre 3D' comment.item.1 'post 3D' iface MIXER name 'PCM Out Path & Mute' value 'pre 3D' } control.28 { comment.access 'read write' comment.type BOOLEAN iface MIXER name '3D Control - Switch' value false } control.29 { comment.access 'read write' comment.type ENUMERATED comment.item.0 Mix comment.item.1 Mic iface MIXER name 'Mono Output Select' value Mix } control.30 { comment.access 'read write' comment.type ENUMERATED comment.item.0 Mic1 comment.item.1 Mic2 iface MIXER name 'Mic Select' value Mic1 } control.31 { comment.access 'read write' comment.type INTEGER comment.range '0 - 3' iface MIXER name '3D Control Sigmatel - Depth' value 0 } l.32 { comment.access 'read write' comment.type INTEGER comment.range '0 - 3' iface MIXER name '3D Control Sigmatel - Rear Depth' value 0 } control.33 { comment.access 'read write' comment.type BOOLEAN iface MIXER name 'External Amplifier Power Down' value true } control.34 { comment.access 'read write' comment.type INTEGER comment.range '0 - 16383' iface MIXER name 'Wave Playback Volume' value.0 16383 value.1 16383 } control.35 { comment.access 'read write' comment.type INTEGER comment.range '0 - 16383' iface MIXER name 'Wave Capture Volume' value.0 0 value.1 0 } control.36 { comment.access 'read write' comment.type INTEGER comment.range '0 - 16383' iface MIXER name 'Digital Capture Volume' value.0 16383 value.1 16383 } control.37 { comment.access 'read write' comment.type INTEGER comment.range '0 - 16383' iface MIXER name 'Digital Capture Volume' index 1 value.0 16383 value.1 16383 } control.38 { comment.access 'read write' comment.type INTEGER comment.range '0 - 16383' iface MIXER name 'ADC Playback Volume' value.0 16383 value.1 16383 } control.39 { comment.access 'read write' comment.type INTEGER comment.range '0 - 16383' iface MIXER name 'ADC Capture Volume' value.0 16383 value.1 16383 } control.40 { comment.access 'read write' comment.type INTEGER comment.range '0 - 16383' iface MIXER name 'ADC Playback Volume' index 1 value.0 16383 value.1 16383 } control.41 { comment.access 'read write' comment.type INTEGER comment.range '0 - 16383' iface MIXER name 'ADC Capture Volume' index 1 value.0 16383 value.1 16383 } control.42 { comment.access 'read write' comment.type INTEGER comment.range '0 - 16383' iface MIXER name 'IEC958 AC97 Playback Volume' value.0 16383 value.1 16383 } control.43 { comment.access 'read write' comment.type INTEGER comment.range '0 - 16383' iface MIXER name 'IEC958 Capture Volume' value.0 16383 value.1 16383 } control.44 { comment.access 'read write' comment.type INTEGER comment.range '0 - 16383' iface MIXER name 'IEC958 AC97 Playback Volume' index 1 value.0 0 value.1 0 } control.45 { comment.access 'read write' comment.type INTEGER comment.range '0 - 16383' iface MIXER name 'IEC958 Capture Volume' index 1 value.0 0 value.1 0 } control.46 { comment.access 'read write' comment.type BOOLEAN control.50 { comment.access read comment.type IEC958 iface PCM device 1 name 'IEC958 Playback Con Mask' value '3eff000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000' } control.51 { comment.access 'read write inactive' comment.type IEC958 iface PCM device 1 name 'IEC958 Playback PCM Stream' value '0082000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000' } control.52 { comment.access 'read write' comment.type BOOLEAN iface CARD name Joystick value false } control.53 { comment.access 'read write' comment.type ENUMERATED comment.item.0 'port 0x201' comment.item.1 'port 0x202' comment.item.2 'port 0x204' comment.item.3 'port 0x205' iface CARD name 'Joystick Address' value 'port 0x201' } } iface MIXER name 'IEC958 Playback Switch' value true } control.47 { comment.access 'read write' comment.type BOOLEAN iface MIXER name 'IEC958 Capture Switch' value false } control.48 { comment.access 'read write' comment.type BOOLEAN iface MIXER name '4ch Duplication' value false } control.49 { comment.access 'read write' comment.type IEC958 iface PCM device 1 name 'IEC958 Playback Default' value '0082000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000' } As an outsider looking in, it seems like the midi channel is muted, however, there doesn't appear to be a midi, fm/synth, or sythn control in alsamixer. There is a wave. pcm, external midi(amongst others). So even if this was true, I wouldn't be able to to fix it. So finally my question is. Does opl3 midi synth work with ymfpci? If so, what am I doing incorrect? Thankx Philip Thiem GPG Pub Key Archived at wwwkeys.us.pgp.net Isn't it obvious lumberjacks love traffic lights?