Thread: [Alsa-user] How to load a sound bank automatically ?
Brought to you by:
perex
From: Bernez K <ber...@fr...> - 2002-06-27 16:11:38
|
Hi, Currently before running a MIDI file I need to load manually the sound bank into my sound card with sfxload. Because sfxload requests /dev/sequencer, I load manually snd-seq-oss in order to create it. And then I can run: $ sfxload /usr/share/sounds/sf2/8mbgmsfx.sf2 I just want to load automatically the sound bank into my sound card. I will try to explain hereafter what my configuration is but I apologise for my bad understanding of what my machine is doing. I put a link in /etc/rc5.d to load /etc/init.d/alsasound when starting. In /etc/modules.conf I have: # ALSA specific settings alias char-major-116 snd alias snd-card-0 snd-emu10k1 # OSS compatibility alias char-major-14 soundcore 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 # Options options snd-emu10k1 snd_index=0 snd_id="SBLIVE" snd_enable=1 options snd snd_cards_limit=1 snd_device_mode=0666 snd_device_gid=17 snd_device_uid=0 # Misc pre-remove snd /usr/sbin/alsactl store post-install snd /usr/sbin/alsactl restore post-install snd-seq /usr/bin/sfxload /usr/share/sounds/sf2/8mbgmsfx.sf2 /var/log/messages gives me an error each time like "/usr/bin/sfxload failed". In /etc/devfsd.conf I have: # Enable full compatibility mode for old device names REGISTER .* MKOLDCOMPAT UNREGISTER .* RMOLDCOMPAT # Gives r/w permissions on sound devices REGISTER ^sound/.* PERMISSIONS root.audio 660 REGISTER ^snd/.* PERMISSIONS root.audio 660 Before doing anything lsmod gives: Module Size Used by Tainted: P snd-seq-midi 3424 0 (unused) snd-seq-midi-event 3160 0 [snd-seq-midi] snd-seq 37228 0 [snd-seq-midi snd-seq-midi-event] snd-emu10k1 58720 0 (autoclean) snd-hwdep 3616 0 (autoclean) [snd-emu10k1] snd-rawmidi 12256 0 (autoclean) [snd-seq-midi snd-emu10k1] snd-seq-device 4128 0 (autoclean) [snd-seq-midi snd-seq snd-emu10k1 snd-rawmidi] snd-ac97-codec 22976 0 (autoclean) [snd-emu10k1] snd-pcm 49600 0 (autoclean) [snd-emu10k1] snd-timer 9728 0 (autoclean) [snd-seq snd-pcm] snd-util-mem 1424 0 (autoclean) [snd-emu10k1] snd 27048 0 [snd-seq-midi snd-seq-midi-event snd-seq snd-emu10k1 snd-hwdep snd-rawmidi snd-seq-device snd-ac97-codec snd-pcm snd-timer snd-util-mem] soundcore 4068 2 [snd] What is missing in my configuration ? Why is it needed to load an OSS compatible module to load sound bank even when I want to use ALSA driver and not OSS ? Can I have some help please ? Bernez ------------------------------------------------------------------------ Mandrale-Linux-8.2 (Kernel-2.4.18-6mdk) with DEVFS support CreativeLabs SoundBlaster Live! - alsa-0.9.0beta12 |
From: Bernez K <ber...@fr...> - 2002-07-06 07:05:18
|
Hi, I am still trying to load a sound font automatically. I am using devfs In /etc/devfsd.conf I have: # Enable full compatibility mode for old device names REGISTER .* MKOLDCOMPAT UNREGISTER .* RMOLDCOMPAT # Gives r/w permissions on sound devices LOOKUP snd MODLOAD ACTION snd REGISTER ^sound/.* PERMISSIONS root.audio 660 REGISTER ^snd/.* PERMISSIONS root.audio 660 In /etc/modules I have the line: snd-seq-oss My /etc/modules.conf: # ALSA specific settings alias char-major-116 snd alias snd-card-0 snd-emu10k1 # OSS compatibility alias char-major-14 soundcore 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 # Options options snd-emu10k1 snd_index=0 snd_id="SBLIVE" snd_enable=1 # "snd_cards_limit=1": if not the system is looking for a second sound card options snd snd_cards_limit=1 snd_device_mode=0666 snd_device_gid=17 snd_device_uid=0 pre-remove snd /usr/sbin/alsactl store post-install snd /usr/sbin/alsactl restore # Load sound font #post-install snd-seq /usr/local/bin/sfxload /usr/share/sounds/sf2/8mbgmsfx.sf2 post-install snd-emu10k1-synth /usr/local/bin/sfxload /usr/share/sounds/sf2/8mbgmsfx.sf2 When I put in /etc/modules.conf: "post-install snd-seq /usr/local/bin/sfxload /usr/share/sounds/sf2/8mbgmsfx.sf2" snd-seq-oss is not loaded, /dev/sequencer is not created, /var/log/messages says nothing $ /sbin/lsmod snd-seq 37228 0 (unused) snd-emu10k1 58720 0 (autoclean) snd-hwdep 3616 0 (autoclean) [snd-emu10k1] snd-rawmidi 12256 0 (autoclean) [snd-emu10k1] snd-seq-device 4128 0 (autoclean) [snd-seq snd-emu10k1 snd-rawmidi] snd-ac97-codec 22976 0 (autoclean) [snd-emu10k1] snd-pcm 49600 0 (autoclean) [snd-emu10k1] snd-timer 9728 0 (autoclean) [snd-seq snd-pcm] snd-util-mem 1424 0 (autoclean) [snd-emu10k1] snd 27048 0 [snd-seq snd-emu10k1 snd-hwdep snd-rawmidi snd-seq-device snd-ac97-codec snd-pcm snd-timer snd-util-mem] soundcore 4068 2 [snd] When I put in /etc/modules.conf: "post-install snd-emu10k1-synth /usr/local/bin/sfxload /usr/share/sounds/sf2/8mbgmsfx.sf2" snd-seq-oss is loaded, /dev/sequencer is created $ /sbin/lsmod snd-seq-midi 3424 0 (autoclean) (unused) snd-emu10k1-synth 4384 0 (autoclean) (unused) snd-emux-synth 26368 0 (autoclean) [snd-emu10k1-synth] snd-seq-midi-emul 4912 0 (autoclean) [snd-emux-synth] snd-seq-virmidi 2872 0 (autoclean) [snd-emux-synth] snd-seq-oss 25984 0 snd-seq-midi-event 3160 0 [snd-seq-midi snd-seq-virmidi snd-seq-oss] snd-seq 37228 2 [snd-seq-midi snd-emux-synth snd-seq-midi-emul snd-seq-virmidi snd-seq-oss snd-seq-midi-event] snd-emu10k1 58720 0 (autoclean) [snd-emu10k1-synth] snd-hwdep 3616 0 (autoclean) [snd-emu10k1] snd-rawmidi 12256 0 (autoclean) [snd-seq-midi snd-seq-virmidi snd-emu10k1] snd-seq-device 4128 0 (autoclean) [snd-seq-midi snd-emu10k1-synth snd-emux-synth snd-seq-oss snd-seq snd-emu10k1 snd-rawmidi] snd-ac97-codec 22976 0 (autoclean) [snd-emu10k1] snd-pcm 49600 0 (autoclean) [snd-emu10k1] snd-timer 9728 0 (autoclean) [snd-seq snd-pcm] snd-util-mem 1424 0 (autoclean) [snd-emux-synth snd-emu10k1] snd 27048 0 [snd-seq-midi snd-emux-synth snd-seq-virmidi snd-seq-oss snd-seq-midi-event snd-seq snd-emu10k1 snd-hwdep snd-rawmidi snd-seq-device snd-ac97-codec snd-pcm snd-timer snd-util-mem] soundcore 4068 6 [snd] In /var/log/messages: jui 6 08:43:06 localhost : Loading module: snd-seq-oss Jul 6 08:43:08 localhost modprobe: modprobe: post-install snd-emu10k1-synth failed <27>Jul 6 08:43:08 modprobe: modprobe: insmod snd-emu10k1-synth failed and the sound bank is not loaded. I can only load the sound bank manually by typing: $ sfxload /usr/... Any idea ? Bernez ------------------------------------------------------------------------ Mandrale-Linux-8.2 (Kernel-2.4.18-6mdk) with DEVFS support CreativeLabs SoundBlaster Live! - alsa-0.9.0beta12 |
From: Frank B. <bar...@ph...> - 2002-06-29 06:47:30
|
Bernez K hat gesagt: // Bernez K wrote: > Hi, > > Currently before running a MIDI file I need to load manually the sound bank > into my sound card with sfxload. > Because sfxload requests /dev/sequencer, I load manually snd-seq-oss in order > to create it. > And then I can run: > $ sfxload /usr/share/sounds/sf2/8mbgmsfx.sf2 > > > I just want to load automatically the sound bank into my sound card. This should work: 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 alias snd-card-0 snd-emu10k1 post-install snd-synth-emu10k1 /usr/bin/sfxload /usr/share/sounds/sf2/8mbgmsfx.sf2 Ciao, -- Frank Barknecht _ ______footils.org__ |
From: Bernez K <ber...@fr...> - 2002-06-30 19:50:42
|
Thank you Frank, but it doesn't work ... > > I just want to load automatically the sound bank into my sound card. > > This should work: > > 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 > alias snd-card-0 snd-emu10k1 > > post-install snd-synth-emu10k1 /usr/bin/sfxload > /usr/share/sounds/sf2/8mbgmsfx.sf2 In my /etc/modules.conf I have exactly the same lines for "alias". I replaced: "post-install snd-seq /usr/local/bin/sfxload /usr/share/sounds/sf2/8mbgmsfx.sf2" by: "post-install snd-synth-emu10k1 /usr/local/bin/sfxload /usr/share/sounds/sf2/8mbgmsfx.sf2" and now I can see more modules loaded at starting but no snd-seq-oss and sfxload is still requesting /dev/sequencer :-) NB: are you sure of snd-synth-emu10k1 ? (snd-emu10k1-synth ?) lsmod: sr_mod 15160 0 (autoclean) (unused) snd-emu10k1-synth 4384 0 (unused) snd-emux-synth 26368 0 [snd-emu10k1-synth] snd-seq-midi-emul 4912 0 [snd-emux-synth] snd-seq-virmidi 2872 0 [snd-emux-synth] snd-seq-midi-event 3160 0 [snd-seq-virmidi] snd-seq 37228 0 [snd-emux-synth snd-seq-midi-emul snd-seq-virmidi snd-seq-midi-event] snd-emu10k1 58720 0 (autoclean) [snd-emu10k1-synth] snd-hwdep 3616 0 (autoclean) [snd-emu10k1] snd-rawmidi 12256 0 (autoclean) [snd-seq-virmidi snd-emu10k1] snd-seq-device 4128 0 (autoclean) [snd-emu10k1-synth snd-emux-synth snd-seq snd-emu10k1 snd-rawmidi] snd-ac97-codec 22976 0 (autoclean) [snd-emu10k1] snd-pcm 49600 0 (autoclean) [snd-emu10k1] snd-timer 9728 0 (autoclean) [snd-seq snd-pcm] snd-util-mem 1424 0 (autoclean) [snd-emux-synth snd-emu10k1] snd 27048 0 [snd-emux-synth snd-seq-virmidi snd-seq-midi-event snd-seq snd-emu10k1 snd-hwdep snd-rawmidi snd-seq-device snd-ac97-codec snd-pcm snd-timer snd-util-mem] soundcore 4068 4 [snd] Strange also, /var/log/messages seems better: I had: jun 29 21:35:19 localhost alsasound: Starting sound driver: snd-emu10k1 Jun 29 21:35:20 localhost kernel: lp0: compatibility mode jun 29 21:35:22 localhost alsasound: done jun 29 21:35:22 localhost alsasound: /dev/sequencer: No such file or directory jun 29 21:35:22 localhost alsasound: modprobe: post-install snd-seq failed jun 29 21:35:24 localhost rc: Lancement de alsasound : succeeded I have now: jun 29 22:53:16 localhost alsasound: Starting sound driver: snd-emu10k1 Jun 29 22:53:16 localhost kernel: lp0: compatibility mode jun 29 22:53:19 localhost alsasound: done jun 29 22:53:20 localhost rc: Lancement de alsasound : succeeded But, I still need to find a trick to load snd-seq-oss automatically. ?? Bernez ------------------------------------------------------------------------ Mandrale-Linux-8.2 (Kernel-2.4.18-6mdk) with DEVFS support CreativeLabs SoundBlaster Live! - alsa-0.9.0beta12 |
From: Frank B. <bar...@ph...> - 2002-06-30 20:50:45
|
Hi, Bernez K hat gesagt: // Bernez K wrote: > I replaced: > "post-install snd-seq /usr/local/bin/sfxload /usr/share/sounds/sf2/8mbgmsfx.sf2" > by: > "post-install snd-synth-emu10k1 /usr/local/bin/sfxload /usr/share/sounds/sf2/8mbgmsfx.sf2" > and now I can see more modules loaded at starting but no snd-seq-oss > and sfxload is still requesting /dev/sequencer :-) Do you have a /dev/sequencer file? Or are you using devfs? If the latter is the case, I cannot help much, because I never used devfs :( > NB: are you sure of snd-synth-emu10k1 ? (snd-emu10k1-synth ?) Well, it's in my modules config this way for ages, but you're right: looking at the actual module names, it seems wrong. I don't know what's correct, but in my machine the seemingly incorrect version worked fine. I'll try the other way as well, when I get a new cable for my SBLive. It's only my second card and not always connected. > Strange also, /var/log/messages seems better: > jun 29 21:35:22 localhost alsasound: /dev/sequencer: No such file or directory What does $ cat /proc/asound/seq/oss say? It should report something like "OSS sequencer emulation version 0.1.8" at the start In "/proc/asound/card?/wavetableD?" you can see, if the soundfont did load correctly: $ sfxload bank.sf2 $ cat /proc/asound/card1/wavetableD1 Device: Emu10k1 [...] SoundFonts: 1 Instruments: 1849 Samples: 526 Locked Instruments: 1849 Locked Samples: 526 ciao, -- Frank Barknecht _ ______footils.org__ |