# lost in alsa

## dasalvagg

i've followed the desktop guide to try setting up alsa..heres where i am, hopefully someone can help.

running amixer gives me 

 *Quote:*   

> amixer: Mixer attach default error: No such file or directory

 

running /etc/init.d/alsasound restart gives me

 *Quote:*   

> ALSA driver is not loaded
> 
> Initialiazing ALSA... [ok]
> 
> 

 

i emerged alsa-driver and alsa-utils as the guide says to.  i didn't know what sound card  i had so i tried a few and found that ac97_codec loaded with no errors, although the kernel decided it wanted to compile in Creative Ensoniq AudioPCI 97 (ES1371)  this i changed to a module.  when i modprobe es1371 i get errors, oddly enough.  i dont know what exactly is giving me ac97_codec nothing else is being compiled by the kernel except oss support.  

/dev/dsp is made, but of course has the wrong permissions for some reason.

when i include snd-pcm-oss in my modules.autoload then try /etc/init.d/alsasound restart  i get

 *Quote:*   

> 
> 
> shutting down ALSA modules...
> 
> /usr/sbin/alsactl: save_state:1045: No soundcards found...   [ok]
> ...

 

to sum it up, i have sound, but in programs like xmms the sound control doesnt work, so i can't change the volume.   so..i dont know where to go now can anybody help me with this?

----------

## delta407

What does lsmod say?

----------

## mksoft

To check the sound card (if it is pci) try:

```
cat /proc/pci  | grep audio
```

Check the output. You'd probably see ac97 from the mb. If you have another pci sound card it should be listed there. Here's the output from my machine:

```
# cat /proc/pci  | grep audio

    Multimedia audio controller: VIA Technologies, Inc. VT82C686 AC97 Audio Controller (rev 32).

    Multimedia audio controller: Ensoniq 5880 AudioPCI (rev 2).
```

I use the sound card it self (the module is snd-ens1371) and don't bother with ac97.

----------

## Mr. Pointy

I am not an expert, and with alsa probably a poor novice.  Nevertheless, what I think I know for sure:

1.  All you need in the kernel configuration is sound support. No specific card modules, no oss modules.  These come from alsa.  You can make kernel modules for your sound card in the kernel config but they are not used and can't be loaded when using alsa.

2. The kernel configuration doesn't do autodetection.  So, your card probably isn't the module selected. You dont't want modules from the kernel anyway.

3.  Try: cat /proc/pci.  See what it says about your sound card.  A tip,  once you figure out which card you have you can emerge alsa thusly: ALSA_CARDS=<your card> emerge alsa.  This builds alsa modules for your card instead of alsa modules for everycard ever made.

4.  After that you need to edit /etc/modules.d/alsa for your card.

5. then: rc-update add alsasound boot

----------

## dasalvagg

i disabled the sound modules in the kernel to make sure i wasn't loading them instead of the alsa modules and rebuilt that.  also recompiled alsa-driver and alsa-utils.  

cat /prco/pci | grep audio gives me

 *Quote:*   

>  Multimedia audio controller: Ensoniq ES1371 [AudioPCI-97] (rev 9).

 

i'm using the snd-ac97-codec, which modprobes without an error.  

when i run /etc/init.d/alsasound restart  i get

 *Quote:*   

> 
> 
> Shutting down ALSA modules...
> 
> /usr/sbin/alsactl: save_state:1045: No soundcards found...    [ok]
> ...

 

running amixer give me an error 

 *Quote:*   

> 
> 
> amixer: Mixer attack default error: No such device
> 
> 

 

and i get the same error if i try to unmute my card

im not sure what i'm supposed to do from here

----------

## mksoft

Try modprobing snd-ens1371 instead of snd-ac97-codec.

----------

## dasalvagg

This is after modprobe snd-ens1371

 *Quote:*   

> /lib/modules/2.4.19-gentoo-r7/kernel/sound/pci/snd-ens1371.o: init_module: No such device
> 
> Hint: insmod errors can be caused by incorrect module parameters, including invalid IO or IRQ parameters.
> 
>       You may find more information in syslog or the output from dmesg
> ...

 

i tried this one before, but have never gotten this to load.  modprobe snd-ens1370 gives the same result

----------

## mksoft

Strange, do you have an onboard sound and pci sound card  :Question: 

If so, try to disable onboard sound (via bios setup), and try to load the modules (make sure that ac97 module isn't loaded).

----------

## dasalvagg

strange thing is that i have sound via /dev/dsp  from inside kde 3.01  but i cant change the volume, except from on my speakers, which doesn't get loud...enough  :Smile:   i have no idea what is giving me sound or how to control it.

----------

## mksoft

 *dasalvagg wrote:*   

> strange thing is that i have sound via /dev/dsp  from inside kde 3.01  but i cant change the volume, except from on my speakers, which doesn't get loud...enough   i have no idea what is giving me sound or how to control it.

 

Do you have OSS sound card drivers compiled in the kernel  :Question: 

----------

## dasalvagg

yep...i forgot all about that.  is there a way to change the volume of just the oss sound?  programs like xmms have no control of sound...its very annoying

----------

## mksoft

Usually you can't use both OSS and ALSA, it'll lead to problems. Try to tell xmms to use OSS as output driver instead of alsa (can't remeber how, I don't have xmms emerged).

It'd will be the best if you decide which one you want to go with (I recommend ALSA) and follow it through.

----------

## dasalvagg

xmms was already set to use oss, and there is no option to change it to alsa.  i'd love to get just one of them to work correctly.  i'll take out the oss module from my modules.autoload and try some of the stuff again.

----------

## mksoft

The best would be if you'll remove oss drivers from the kernel, just leave sound support selected, build and install the kernel.

After boot, re-emerge alsa-driver and install following the instructions in the Dsektop configuration guide doc.

Try this as last resort. First try to remove autoloaded oss drivers, and configure alsa.

----------

## dasalvagg

alsa hates me...

i've rebuilt the kernel without any oss support changed the modules.autoload file and rebooted, then i rebuilt the alsa driver.  heres what i'm getting now...

 *Quote:*   

> 
> 
> # /etc/init.d/alsasound restart 
> 
> * Shutting down ALSA modules....
> ...

 

 *Quote:*   

> 
> 
> # amixer 
> 
> amixer: Mixer attach default error: No such device
> ...

 

something weird is going on tho....i still have sound in xmms through the oss driver option.  if i do lsmod it only lists nvidia, snd-ac97-codec, and my nic card.  where is the sound comming from?

----------

## Pigeon

the drivers for the ac97 are the exact same drivers for the Ensoniq 1371 and the Ensoniq 5880- also known as the SoundBlaser AudioPCI.  I have a Soundblaster AudioPCI with "100% Sound Blaster Compatable" in bright shiny letters plastered all over it, wondering why in the hell the "Sound Blaster or 100% Compatable" driver didn't work.

To make a long story short, the ac97 driver was one of the last ones I tried, and suprise suprise it worked.

Oh- and it doesn't work with alsa. (not even the snd-ens1371 (this is different from the ac97's es1371 driver))  You may or may not be in the same boat.  I just use kernel audio, and use alsa's snd-pcm-oss drivers. (Yes, this is freakish as hell- take two unrelated and completely broken drivers for a soundcard you don't even have, combine 'em together and get a working one.  I only said it works for me, never said it'll work for you.)

----------

## dasalvagg

freakish yes...but you have working sound.  i've got a question for you, you say you use the kernel audio...does that mean compile in (or module) support for anything besides the sound support option?  another thing do you have volume control?   if you've read my other posts here, then you know i dont.  I'd be willing to have a freakish audio setup if it meant i could actually turn up my volume enough to enjoy music.

----------

## BonezTheGoon

So, being another poor bastage that can't get ALSA working with roughly the same errors and symptoms I have many questions and very different experiences.  You can see some of my adventures in other threads (which I will track down and link in a second post shortly.)  I would REALLY appreciate some definitive clarification from "someone-in-the-know" about OSS vs. ALSA vs. ESD vs. (Any other beasts I know nothing about that may still be alive, well, and up to no good on my Gentoo box). Let me try to explain.  I wanted ALSA, I worked on getting ALSA going--I never have been able to (I don't think, given amixer has never once run successfully and given I have never unmuted anything with any mixer, and supposedly ALSA mutes everything) but I found that with much tinkering and toying I had SOME sound.  Which I assumed was OSS (and I still think that the majority of it was OSS.)  So things like XMMS would play audio wonderfully -- Volume was OK and was altered externally on the speakers only (no mixer would run, no volume controls were available.)  But then I got greedy and wanted things like movies to have sound (silly me) and so I started toying with xine, finally I found that if I ran xine with the argument to use esd (which was a far stretch of a guess given I had not emerged it and had specifically not put it in my "USE" variables) and magically I heard sounds from within xine.  Still I have no mixers of any kind.  Still I pine to have ALSA, mostly because I want to best it!  I want to be able to control my Gentoo Linux (I mean isn't that the idea behind linux?   :Confused:  )  So some of my other posts in other related threads might give some insight into where I am having trouble, and also might help others get some functionality of sound out of their system.  

But my BURNING question remains:

Whats the deal with OSS vs. ALSA vs. ESD?  Can they co-habitate and play nice with each other?  Should they do that?  Whats the deal with loading the module snd-pcm-oss as outlined in the "Gentoo Linux Desktop Configuration Guide"?  Is this snd-pcm-oss module actually OSS, or is it an emulation of-sorts that ALSA is driving?  Was I actually using OSS or was I using an OSS dummy being controlled by ALSA?  In short, whats up with sound in Linux?  Another big one, what sound modules do I load?  Within the kernel there is a module for i810 sound but in ALSA there is another module for i810 sound?  At any rate all this, I fear, has become too vague without more specifics of my situation.  So in a moment I will post the links to the other threads with outline my scenario in detail (I think.)

Thanks for any help in advance!!!

Regards,

BonezTheGoon

----------

## BonezTheGoon

 *BonezTheGoon wrote:*   

> So in a moment I will post the links to the other threads with outline my scenario in detail (I think.)

 

Here is one about a PCI card I WAS using and have since pulled given there seems to be limited support.

https://forums.gentoo.org/viewtopic.php?t=4641&highlight=

Here is another thread that is talking about the audio I am attempting to use now, my on-board sound.  I have the ECS K7S5A (SiS735 chipset) which according to the ALSA webpage says I should use the i8x0 driver.

https://forums.gentoo.org/viewtopic.php?t=5575&highlight=

This thread is where I explained most thouroughly how I finally got SOME sounds out of my system:

https://forums.gentoo.org/viewtopic.php?t=5453&highlight=

So once again, any help and or suggestions are HUGELY welcomed.  Also if I have been far too vague please let me know what I am not explaining and I will attempt to properly elaborate!

Thanks in advance!!!!

Regards,

BonezTheGoon

----------

## Pigeon

 *dasalvagg wrote:*   

> freakish yes...but you have working sound.  i've got a question for you, you say you use the kernel audio...does that mean compile in (or module) support for anything besides the sound support option?  another thing do you have volume control?   if you've read my other posts here, then you know i dont.  I'd be willing to have a freakish audio setup if it meant i could actually turn up my volume enough to enjoy music.

 

Both the OSS/Free module and the es1371 modules are loaded (not compiled in- modprobed)... and yes, the volume controls work.

----------

## BonezTheGoon

dasalvagg did you ever get ALSA working?  Did you go with OSS instead?  Do you have sound working yet?  Whats the deal, how'd you get to where you did?  Let us know how you are doing!

Thanks in advanced!

Regards,

BonezTheGoon

----------

## james

In case it helps.

I followed VIA's installation instructions off the website.

45 minutes later, sound, wonderful sound.

HTH.

----------

## dasalvagg

i only with i could share all the crap i've done.  i have another post that no ones seems to be able to answer explaining where i am at with alsa https://forums.gentoo.org/viewtopic.php?t=7387

my current setup right now...i rebuilt my kernel with es1371 support (as a module) and unmerged alsa.  so...to put it bluntly i gave up on alsa unless someone can tell me why it randomly crashes, because i dont have a clue.  

i'm actually quite happy with that sound that i have now tho.  /dev/dsp still always has the wrong permissions, and i found out why i can't control sound from xmms.  /dev/mixer has the wrong permissions, i changed that and it works fine now. where are you now bonez?

----------

## BonezTheGoon

Very strange ALSA bug you seem to have located for the via boards, sorry to hear that you did all the work and discovery and didn't get a good "pay-off" at the end.  Rest assured that you gained much knowledge and probably helped hundreds of people (past present and future) just by documenting what you have done.  I have, unfortunately, been too busy with life to touch my computer   :Sad:  .  So I have no results currently, I actually was working with Gentoo on three computers all at the same time (so I have many many forum posts for different hardware configurations)

Thanks for giving us the update though!!!  Hopefully a few ALSA versions from now you can try it again and see how it does for your hardware then!!

Regards,

BonezTheGoon

----------

