View previous topic :: View next topic |
Author |
Message |
Helena Veteran
Joined: 02 Apr 2003 Posts: 1114 Location: Den Dolder, The Netherlands
|
Posted: Tue Oct 28, 2003 11:36 am Post subject: |
|
|
Thanks idoneus. I'm going to use that script.
I had to find out more information about adding scripts. I've written your code to a file called "alsascript" which I've stored in /etc/init.d and given execute permission withafter editing out some strange modifications, probably caused by not saving the file correctly?!
Finally, I added Code: | rc-update add alsascript default | (not "boot" as in the guide!) and that was it. |
|
Back to top |
|
|
idoneus Apprentice
Joined: 26 Mar 2003 Posts: 243 Location: Graz, Austria
|
Posted: Tue Oct 28, 2003 6:22 pm Post subject: |
|
|
sorry I should have mentioned those steps right away.
That's exactly what I did (except that I called the script simply alsa).
I agree with you that default is a good runlevel for it too. |
|
Back to top |
|
|
jsonne1 n00b
Joined: 26 Sep 2003 Posts: 3
|
Posted: Wed Oct 29, 2003 1:34 am Post subject: Whats good about ALSA |
|
|
is this advanced?? ALSA? as far as compiling all as MODS? you can't in case you didn't notice this. the 2 listed above and below won't let you mod if you have to alter the config from text thats not much help. I got everything done and everything except those 2 things that won't be mods moded. I have no /dev/dsp, but more importantly I love the way ALSA doesn't put /etc/modules.d/alsa, or /etc/init.d/alsasound files anywhere. I have them in my portage but not anywhere else. The support on the ALSA webpage get back to me with some answers and I will take an hour to write up something real. I am not a noob but cna't find the 2.6 instructions anywhere i tried the 2nd from the top and its totally worthless. No Music for me
Pissed Justin |
|
Back to top |
|
|
Murf n00b
Joined: 28 Oct 2003 Posts: 19
|
Posted: Wed Oct 29, 2003 4:52 am Post subject: Restore settings on reboot... |
|
|
Something that I ran into when upgrading to the 2.6 kernel...
I did compile my particular sound card alsa module into the kernel,
and it seemed to work flawlessly, except on reboot, the channels wouldn't
unmute and restore volume.
Here's what I did to fix, and yes it worked:
vi /etc/init.d/alsasound
Pounded out the following lines:
# Start driver if it isn't already up.
#if [ -d /proc/asound ]
#then
#eerror "ALSA driver is already running."
#return 1
#fi
#
And now all is well. Reboot and levels / mute status all restored after running
alsactl store
Basically because I compiled 2.6 alsa support into the kernel, the "driver" is loaded. The start script ran, but dropped prematurely becuase it saw my /dev/ devices already existed ( created on boot with the built in module ).
The portion of the script that restores you levels from /etc/asound.state
never had a chance to run...
I'm sure newer releases will fix this, but this works for now.
As a side note, 2.6 kernel seems to be doing great. Only had to recompile nvidia kernel drivers and everything is working well!
Murf |
|
Back to top |
|
|
Helena Veteran
Joined: 02 Apr 2003 Posts: 1114 Location: Den Dolder, The Netherlands
|
Posted: Wed Oct 29, 2003 10:21 am Post subject: Re: Restore settings on reboot... |
|
|
Murf wrote: | Something that I ran into when upgrading to the 2.6 kernel...
I did compile my particular sound card alsa module into the kernel,
and it seemed to work flawlessly, except on reboot, the channels wouldn't
unmute and restore volume.
Here's what I did to fix, and yes it worked:
vi /etc/init.d/alsasound
Pounded out the following lines:
# Start driver if it isn't already up.
#if [ -d /proc/asound ]
#then
#eerror "ALSA driver is already running."
#return 1
#fi
#
And now all is well. Reboot and levels / mute status all restored after running
alsactl store
Basically because I compiled 2.6 alsa support into the kernel, the "driver" is loaded. The start script ran, but dropped prematurely becuase it saw my /dev/ devices already existed ( created on boot with the built in module ).
The portion of the script that restores you levels from /etc/asound.state
never had a chance to run...
I'm sure newer releases will fix this, but this works for now.
As a side note, 2.6 kernel seems to be doing great. Only had to recompile nvidia kernel drivers and everything is working well!
Murf | Thanks for your contribution. Because I still have an annoying error message at shutdown, your solution may be better than mine. Just to be sure: you did not write a script yourself, just edit the standard alsasound script? I suppose you got that viaI have been experimenting too much to trace where this script came from.
Oh and I agree, the 2.6 kernel really is great! |
|
Back to top |
|
|
tam Guru
Joined: 04 Mar 2003 Posts: 569
|
Posted: Thu Oct 30, 2003 11:06 am Post subject: Re: ALSA & 2.6 kernel mini HOW-TO? |
|
|
Thanks for this MINI-HOWTO. Finally I managed to get sound on my T23 with kernel 2.6 and ALSA. |
|
Back to top |
|
|
sibbe n00b
Joined: 31 Jan 2003 Posts: 35 Location: Helsinki, Finland
|
Posted: Thu Oct 30, 2003 7:51 pm Post subject: slightly fixed /etc/init.d/alsasound script |
|
|
Okay, there seems to be a bunch of problems with alsasound init.d script and different kernel configurations. One can for example have the automatic kernel module loading on (IIRC it is by default) and so on. This seems to be the main reason for getting the "FATAL: Module snd already in kernel" messages. Actually I haven't tried this - just because it would require yet another recompile & boot.
Anyways, there is a solution. Let's use "modprobe -q" instead of just "modprobe". Here's a snippet from "man modprobe":
Code: |
-q --quiet
Normally modprobe will report an error if you try to remove a
module which doesn't isn't in the kernel, or insert a module
which is already in the kernel. With this flag, modprobe
considers such redundant commands to be fine.
|
This trivial change makes the output a bit prettier, but the script is still a mess... Anyways here's a diff to the /etc/init.d/alsasound script:
Code: |
--- alsasound.old 2003-10-30 21:35:56.274789280 +0200
+++ alsasound 2003-10-30 21:29:47.407865576 +0200
@@ -72 +72 @@
- /sbin/modprobe ${DRIVER}
+ /sbin/modprobe -q ${DRIVER}
@@ -83 +83 @@
- [ -n "${SEQUENCER}" ] && /sbin/modprobe ${SEQUENCER}
+ [ -n "${SEQUENCER}" ] && /sbin/modprobe -q ${SEQUENCER}
|
Some further fixing can be done, for example one could change the row 'SEQUENCERS="$(cut -d"," -f1 /proc/asound/seq/drivers)"' to 'SEQUENCERS="$(grep -v loaded /proc/asound/seq/drivers | cut -d"," -f1)"'
In my opinion, we really need a full rewrite of this initialization script - it just has way too much external greps, awks and such. Maybe separate scripts for 2.4 and 2.6 kernel series?
And oh, I will submit this minor fix to bugzilla as soon as I have time to type another ten rows-o-text. _________________ jyrki muukkonen |
|
Back to top |
|
|
xlyz Veteran
Joined: 27 Oct 2002 Posts: 1470 Location: Italy
|
Posted: Thu Oct 30, 2003 9:05 pm Post subject: Re: slightly fixed /etc/init.d/alsasound script |
|
|
sibbe wrote: | And oh, I will submit this minor fix to bugzilla as soon as I have time to type another ten rows-o-text. |
here where to go: https://bugs.gentoo.org/show_bug.cgi?id=32045
you can also find a quick fix for alsasound in 2.6.0 |
|
Back to top |
|
|
shira Tux's lil' helper
Joined: 27 Aug 2002 Posts: 122
|
Posted: Wed Nov 05, 2003 4:14 pm Post subject: |
|
|
is there a way to order the modules that the new script loads
for me at least it ignores /etc/modules.d/alsa and just "senses" what modules I have
it loads the modules for my secondary sound card first and therefore it gets set to the default
if there isn't a way to order the modules loading is there a way to let alsa know what card you want as default? |
|
Back to top |
|
|
tero1001 n00b
Joined: 17 Oct 2003 Posts: 5 Location: Finland
|
Posted: Wed Nov 05, 2003 7:16 pm Post subject: |
|
|
Hi!
I just wanted to add one thing about my experience with SB Live 5.1 card. I have 2.6 kernel and first I compiled sound into kernel. However I never got midi to work.
I went on alsa-user forum and got advice: Compile as modules and it will work. And that was the case, I have fully working midi now with sound as modules.
I emerged my alsa-stuff with USE="~x86" and got all needed files. However I had to edit modules.d/alsa but all info could be found on Gentoo alsa howto and alsa-project's emu10k1 driver page.
Maybe this help someone else to get midi work too??
Rgds,
Tero |
|
Back to top |
|
|
kiksen Guru
Joined: 24 Jun 2002 Posts: 401 Location: Denmark
|
Posted: Mon Nov 10, 2003 7:52 am Post subject: It works as modules |
|
|
Following agent_jdh's advice, it works perfectly with modules |
|
Back to top |
|
|
darksaidin Apprentice
Joined: 04 Oct 2003 Posts: 150
|
Posted: Tue Nov 11, 2003 1:08 pm Post subject: |
|
|
I tried both methods. Compiled into the kernel I got the OSS emulation to work, but I couldn't use ALSA itself.
Now I tried to compile it as modules. Even though I don't get any error messages in KDE or at boot (except for the module already loaded that has been mentioned here, too), I don't hear any sound at all.
I'm using the via8322 card. I've tried several mixersettings but it may well be that I somehow disabled the sound with another setting because I don't understand all that stuff about "surround down mix", LFE ...
Could anyone post a working via8322 mixer setting (/etc/asound.state I believe) for a 2 speaker system?
I don't really think it is a mixer problem but on the other side I don't know what else it could be since I don't receive any error messages. |
|
Back to top |
|
|
darksaidin Apprentice
Joined: 04 Oct 2003 Posts: 150
|
Posted: Tue Nov 11, 2003 2:48 pm Post subject: |
|
|
ok, seems I should forget the idea about linux and sound. now KDE's sound configuration app crashes on start and I don't know where to change KDE's sound settings without that tool. |
|
Back to top |
|
|
faz n00b
Joined: 02 Nov 2002 Posts: 73 Location: the Netherlands
|
Posted: Thu Nov 13, 2003 10:30 am Post subject: Is it possible to remove OSS completely |
|
|
Hi,
I'm over to 2.6 also and i've got ALSA and sound running. My question is if I could remove all OSS stuff completely and run on ALSA only. I work with KDE.
If I remove all OSS modules from the kernel config ARTS complains about /dev/dsp and I don't have a mixer device. I've read somewhere the place to be with ALSA is in /dev/snd. I do have all kind of stuff there, but I don't have a clu how to change al configs (modules.d/alsa, ARTS, etc) to go for these devices.
Thanx for any thoughts on this! |
|
Back to top |
|
|
Twink Apprentice
Joined: 06 Dec 2002 Posts: 178 Location: New Zealand
|
Posted: Sat Nov 15, 2003 7:52 am Post subject: |
|
|
worked great for me, only thing was that I emerged alsa-lib and alsa-utils 0.98 (had to put the exact path to the ebuiltds) I finally have sound on my box (not that I need it which is why I never bothered setting it up), only prob being when I do a emerge -u world it wants to put the old alsa-lib and alsa utils back on and remove the 0.98 versions. |
|
Back to top |
|
|
xlyz Veteran
Joined: 27 Oct 2002 Posts: 1470 Location: Italy
|
Posted: Sat Nov 15, 2003 12:40 pm Post subject: |
|
|
Twink wrote: | worked great for me, only thing was that I emerged alsa-lib and alsa-utils 0.98 (had to put the exact path to the ebuiltds) I finally have sound on my box (not that I need it which is why I never bothered setting it up), only prob being when I do a emerge -u world it wants to put the old alsa-lib and alsa utils back on and remove the 0.98 versions. |
to avoid downgrade |
|
Back to top |
|
|
StinkingMonkey Apprentice
Joined: 24 May 2003 Posts: 183 Location: UK
|
Posted: Sun Nov 16, 2003 6:26 pm Post subject: |
|
|
Sorry was wondering if anyone can help me with this,i get the following error when starting ALSA
FATAL can't load snd_seq_oss
i've been reading that all alsa should be built as modules, but im unable to do this as it wont allow me to set the snd_seq_oss as a module.
<M> Advanced Linux Sound Architecture
<M> Sequencer support
< > Sequencer dummy client
[*] OSS API emulation
<M> OSS Mixer API
<M> OSS PCM (digital audio) API
[*] OSS Sequencer API
[ ] Verbose printk
[ ] Debug
As you can see OSS API emulation and OSS sequencer API can't be set as modules, [ ] can only be built in. Am i missing something , as in does something else in the kernel have to be set as a module before it will allow me to select these 2 as modules. I have sound support also built as a module.
[SORTED] had to have my card built in, previously had it as a module |
|
Back to top |
|
|
whatalotta Tux's lil' helper
Joined: 23 Nov 2003 Posts: 114 Location: Union City, CA
|
Posted: Sun Nov 30, 2003 3:07 am Post subject: Another Satisfied Customer |
|
|
Helena-Thanks, I just compiled the test11 Kernel with the settings you suggested and followed the instructions on this thread. Everything works great. Thanks again! |
|
Back to top |
|
|
dopey Apprentice
Joined: 10 Feb 2003 Posts: 235
|
Posted: Sun Nov 30, 2003 5:28 pm Post subject: |
|
|
I tend to use a kernel config that builds nearly everything as a module. You never know what module I might need .
Anyways, I build nearly all the ALSA drivers as a module. With 2.6 kernel it looks like something changed with how modprobe -c works.
/etc/init.d/alsasound uses modprobe -c to search for the sound modules to work. modprobe -c pretty much returns nearly every single sound module that's available so alsasound tries to modprobe them all. I've modified the script to search through /etc/modules.conf instead of using modprobe -c.
Anyone else running into the same issue have a configurable option instead of modifying the script?
Thanks |
|
Back to top |
|
|
b0fh Guru
Joined: 16 Jun 2003 Posts: 426
|
Posted: Wed Dec 03, 2003 7:54 am Post subject: |
|
|
Do I really need alsa-lib package when running 2.6 kernel? |
|
Back to top |
|
|
jmoeller Tux's lil' helper
Joined: 07 Nov 2003 Posts: 114 Location: USA
|
Posted: Wed Dec 03, 2003 8:09 am Post subject: |
|
|
b0fh wrote: | Do I really need alsa-lib package when running 2.6 kernel? |
Yes. Just about anything that uses the "alsa" USE variable needs alsa-lib. Xine, mplayer, arts, esound, etc. all need alsa-lib. None of them really use the alsa kernel modules directly. They all use the devices through the library routines. _________________ Cogito sumere potum alterum. |
|
Back to top |
|
|
m@o Apprentice
Joined: 25 Nov 2003 Posts: 184 Location: /eu/at/grz
|
Posted: Thu Dec 04, 2003 8:01 pm Post subject: |
|
|
Hye!
I've the same problem: I did as you described it but when i want to execute alsamixer i got this:
Code: | alsamixer: function snd_ctl_open failed for default: No such device |
I'm using the 2.6.0 test9 kernel and did emerge -u world after the first time of alsamixer failed, but no success.
it's still the same error.
Does anybody know how to fix this problem?
thx m@o
Last edited by m@o on Fri Dec 05, 2003 10:05 am; edited 1 time in total |
|
Back to top |
|
|
echo6 Guru
Joined: 04 Jan 2003 Posts: 587
|
Posted: Thu Dec 04, 2003 8:51 pm Post subject: |
|
|
I can't recall if I ever read this, but I had ALSA working under 2.6.0-test9 until test11. IIRC I tried to include OSS to get Call of Duty game to work. Sound still works, but there is a horrendous corruption in playback, hmm it reflects what is going here atm. I've got a headache! not sure if that is due to trying to fix this prob, the wife and her nagging/hoovering or both!! Can someone please summarize? It might stop my head hurting.
tia. |
|
Back to top |
|
|
echo6 Guru
Joined: 04 Jan 2003 Posts: 587
|
Posted: Thu Dec 04, 2003 9:19 pm Post subject: |
|
|
Ah! HAH!! Muting or reducing "Line 1" level in KMix got rid of the problem. Now all I need is a solution for the noise level from the wife, any suggestions?? |
|
Back to top |
|
|
Chewi Developer
Joined: 01 Sep 2003 Posts: 886 Location: Edinburgh, Scotland
|
Posted: Mon Dec 08, 2003 12:28 am Post subject: |
|
|
m@o wrote: | Hye!
I've the same problem: I did as you described it but when i want to execute alsamixer i got this:
Code: | alsamixer: function snd_ctl_open failed for default: No such device |
I'm using the 2.6.0 test9 kernel and did emerge -u world after the first time of alsamixer failed, but no success.
it's still the same error.
Does anybody know how to fix this problem?
thx m@o |
I'm getting the same problem on 2.6.0 test11! I'm also using ALSA 1.0.0 rc1, which I suspect could be the problem since there has been little mention of it so far. I initially compiled everything into the kernel but that didn't work. I then compiled everything as modules but that hasn't worked either. I also get the "module already in kernel" bunch of errors too but I don't think those are important. The modules are all loaded, I see loads of them listed if I do lsmod but it just doesn't seem to find the card. /dev/dsp and /dev/mixer are present if that means anything. I didn't compile devfs support in and I unmerged devfsd. I don't think this is the cause since (after a few tweaks) nothing else seems to mind about this (I was quite surprised). Here's the full thing...
Code: | ALSA lib seq_hw.c:446:(snd_seq_hw_open) open /dev/snd/seq failed: No such file or directory
can't open sequencer
* Storing ALSA Mixer Levels
/usr/sbin/alsactl: save_state:1061: No soundcards found...
* Unloading modules [ ok ] * Loading ALSA drivers...
* Loading: snd-mixer-oss
* Loading: snd-pcm-oss
* Loading: snd-seq-oss
* Loading: snd_emu10k1
FATAL: Module snd_emu10k1 already in kernel.
* Loading: snd-emu10k1-synth
FATAL: Module snd_emu10k1_synth already in kernel.
* Loading: snd-seq-midi
FATAL: Module snd_seq_midi already in kernel.
* Loading: snd-seq-oss
FATAL: Module snd_seq_oss already in kernel.
* Running card-dependent scripts
* Restoring Mixer Levels
/usr/sbin/alsactl: set_controls:986: snd_ctl_open error: No such file or directory |
Hmmm just tried OSS through XMMS and that seems to work! I haven't enabled OSS though, this is through the compatibility thing. That's quite strange. And even more strange is it only seems to work through the headphones plugged into my Live Drive. Nothing out of the speakers at all! |
|
Back to top |
|
|
|