Audio configurator missing ?
August 11, 2009 01:49AM
Hi,

First, I wanna say I'm really impressed by Elive. I'm testing the development version since yesterday and its... beautiful, easy-to-use, complete... If I don't find a really annoying bug, it's gonna become my favorite distribution for my laptop. However, I think there's at least one point which may be enhanced : the audio configurator.

The internal audio card of my laptop isn't fully supported by linux. That's why I bought about 10 months ago an external audio card : Terratec Aureon 5.1 USB. It works perfectly on Debian.

After I had instaled Elive, I wanted to set this card as my default audio device. But when I tried to use the Audio Configurator of Elpanel, an information message appeared that read "no longer used".
Since I don't know how to configure this with a shell, the only solution I've found was to download gnome-core to access this menu (System => Preferences => Sound)

Did I miss something in the configuration menu of Elive ? If yes, please tell me. Otherwise, I think It could be a good idea to create such an audio menu.


NB : Please forgive me if there are errors in my message : English isn't my native language
Re: Audio configurator missing ?
August 11, 2009 06:25AM
Forget the configuration, you don't need any one (well, there's no configurators on reality), the only thing that you may need is to set the volumes correctly, or to select the audio card to use, for that use the simple audio mixer

If your audio card is not recognized by Elive, maybe you need a newer kernel, you can found a 2.6.30 on the elive repositories, which kernel do you use in debian ?

Maybe your problem is that the other card is recognized too and so it is used as default when you want to use the other one ?
Re: Audio configurator missing ?
August 11, 2009 06:54AM
The problem was that the internal card was detected and used as default.

The external card Terratec is fully supported by Linux for while now, there's no need to update the kernel. Moreover, it's also supported by elive, since it works perfectly with my ugly tip wink.

There's no need to install packages, it's just a simple setting to change. The problem is : I dont know how to do it with the mixer.

I've just looked my mixer, and the external card has indeed jumped to the top position in the list of audio devices after my tummy. But I still don't understand how to change its position with the mixer ...

Am I a bit silly weird ?

Semprobe
Telecom student at INSA Lyon (France)
Elive-compiz newcomer
Linux-user #495388



Edited 1 time(s). Last edit at 08/11/2009 06:55AM by Semprobe.
Re: Audio configurator missing ?
August 11, 2009 07:55AM
I see

Well, there's two solutions that you can do:

* You can configure alsa in order to say that the first card that you want to use is the other one (for that, you need to search in google or ask in linux channels (try #alsa channel) about how to do that). If you found a good way tell me so that maybe I can implement something useful as tool for that
* The other solution is to blacklist the other card, by not loading the modules of this card, but the idea of to do this correctly is the first one you don't think ? for that could be needed to write a small tool too
Re: Audio configurator missing ?
August 12, 2009 02:12AM
Run "alsaconf" in terminal then choose properly the sound card in use.It always works for me in this way.

Procesor Intel Ci3-2100 3.10Ghz,64bit,3MB BOX,
4GB RAM DDR3 1333mhz,
NVIDIA GeForce 210,1GB DDR3,PCI-E,
Linux user:#492560,E17-Ecomorph user.
"This is Linux land!In silent nights you can hear Windows machines rebooting!..."
[www.youtube.com] [stanca-ultimateeditionromania.blogspot.com]#
Re: Audio configurator missing ?
August 12, 2009 08:05AM
Hi,

It seems that alsaconf doesn't list the usb cards. I personally couldn't fix my problem with alsaconf. Besides, alsaconf asks many questions which are useless for this simple setting.

------

I believe I've found an easier solution to change the default audio device.

1. You have to know the references of the cards.
# cat /proc/asound/cards
It gives you something like this :
 0 [SB             ]: HDA-Intel - HDA ATI SB
                      HDA ATI SB at 0xfd5f4000 irq 16
 1 [HDMI           ]: HDA-Intel - HDA ATI HDMI
                      HDA ATI HDMI at 0xfd6ec000 irq 19
 2 [Audio          ]: USB-Audio - USB Audio
                      USB Audio at usb-0000:00:13.1-2, full speed

2.Then you edit an alsa configuration file
# scite /usr/share/alsa/alsa.conf
You have to look for those lines :

defaults.ctl.card 0
defaults.pcm.card 0

You change the 0 by the number OR the name of the card you wanna set as default audio device.
It seems it's better to use the names : numbers may change after a reboot.

3.Finally, you restart alsa.
# /etc/init.d/alsa-utils restart

------

I've also found how to blacklist an audio card.

1. You find which module you have to blacklist
# lsmod
The modules beginning with "snd_" and not used by any other modules are those which stand for the audio devices.
You shouldn't have difficulties in understanding the corespondance between modules and cards. If there's any problem, take a look at /proc/asound/cards.

2. You edit a configuration file
# scite /etc/modprobe.d/blacklist
You add this line :
blacklist [the audio module]

3. You reboot the computer.

Attention : If you manually remove the only audio device and if there was a mixer on your desktop, an Enlightment segmentation fault occures.

Semprobe
Telecom student at INSA Lyon (France)
Elive-compiz newcomer
Linux-user #495388



Edited 1 time(s). Last edit at 08/12/2009 08:07AM by Semprobe.
Re: Audio configurator missing ?
August 13, 2009 12:18AM
About the segfault, may you can report it to the developer of this e17 module, ask on the #e channel (IRC) for that

Can you describe better the 2º point of the first method ?

It is strange that alsa doesn't store these configuration files under /etc in debian, hum...
Re: Audio configurator missing ?
August 13, 2009 04:01AM
Maybe, it's better to edit the /etc/modprobe.d/alsa-base file, and add something like
options snd-usb-audio index=0
(where snd-usb-audio is the alsa module of your soundcard).
With this, alsa uses usb as first soundcard.



Edited 1 time(s). Last edit at 08/13/2009 04:02AM by phoenix.
Re: Audio configurator missing ?
August 13, 2009 05:21AM
Phoenix, I tried your solution but I failed to get it working. Can you give more details please ?

------

Thanatermesis, about the first method, I'm gonna try to explain better.

In the file /usr/share/alsa/alsa.conf, there are those two lines

defaults.ctl.card 0
defaults.pcm.card 0

It means that the audio card "0" is used as default audio device.
To know which card is this "card 0", you can use :
# cat /proc/asound/cards
You receive those informations :
0 [SB             ]: HDA-Intel - HDA ATI SB
                      HDA ATI SB at 0xfd5f4000 irq 16
 1 [HDMI           ]: HDA-Intel - HDA ATI HDMI
                      HDA ATI HDMI at 0xfd6ec000 irq 19
 2 [Audio          ]: USB-Audio - USB Audio
                      USB Audio at usb-0000:00:13.1-2, full speed

You can see that the card "0" is an intel audio card
About the usb card, you can see the the number is "2" and the name is "Audio"

So, if you wanna set the usb card as default device, you have to edit /usr/share/alsa/alsa.conf. You may write :

defaults.ctl.card 2
defaults.pcm.card 2

But the number of a card may change after a reboot. The name never changes, so it's better to write :

defaults.ctl.card Audio
defaults.pcm.card Audio


You can read this page to have more informations.

Semprobe
Telecom student at INSA Lyon (France)
Elive-compiz newcomer
Linux-user #495388



Edited 1 time(s). Last edit at 08/13/2009 05:23AM by Semprobe.
Re: Audio configurator missing ?
August 13, 2009 06:41AM
Hum... I think that unfortunately this is not that easy... because if im not wrong, udev will load the modules in a random time, so, that means, that your card 0 of /proc/asound/cards can be 0 now, and maybe in your next reboot will be 1, or 2... it will change the order

So I think that the best solution is to do what phoenix say, instead of snd-usb-audio try the modulename of the card that you want to use (lsmod)
Re: Audio configurator missing ?
August 13, 2009 06:46AM
I promise you "this is that easy" if you use the name instead of the number. It works perfectly on my computer.

Semprobe
Telecom student at INSA Lyon (France)
Elive-compiz newcomer
Linux-user #495388



Edited 1 time(s). Last edit at 08/13/2009 06:46AM by Semprobe.
Re: Audio configurator missing ?
August 13, 2009 07:48AM
Ah, sorry for read it fastly, ok, perfectly detailed when im reading it better emosmile

I think that could be easy to made a tool for that, so what you think ? A tool that can allow you to set the default audio card, mmh, is there any other thing that could be nice to add for this tool too ?
Re: Audio configurator missing ?
August 13, 2009 04:44PM
Quote
Semprobe
Phoenix, I tried your solution but I failed to get it working. Can you give more details please ?

En fait, ton problème vient du fait qu'alsa n'utilise pas la carte son que tu veux par défaut.

En éditant le fichier /etc/modprobe.d/alsa-base, tu peux indiquer à alsa quelle carte son utiliser en priorité.

Exemple : j'ai une webcam usb, quand elle est branché au démarrage de mon ordinateur, alsa la détecte comme une carte son et la met en carte son par défaut (je ne sais pas pourquoi par contre), et du coup, je n'ai pas de son (vu que la webcam n'a pas de sortie son ^^).

J'ai donc rajouté ceci à la fin de mon /etc/modprobe.d/alsa-base :
options snd-hda-intel index=0
options snd-usb-audio index=1

(snd-hda-intel est le module de la carte son de mon ordi, snd-usb-audio celui qui gère le son pour ma webcam.)

En faisant ça, j'indique à alsa d'utiliser en carte par défaut ma carte son Intel ("index=0").

Si tu veux, l'option index détermine l'ordre d'utilisation de tes périphériques audio.

Ok ?
Re: Audio configurator missing ?
August 13, 2009 06:47PM
For the tool, I think that the solution of Semprobe is better (just because is more easy to create the tool, and more userfriendly for the end-user)

phoenix can you check if his solution works for you too ? (9º comment)
Re: Audio configurator missing ?
August 13, 2009 06:56PM
Je viens de comprendre pourquoi ca marchait pas chez moi en fait... J'ai ete assez doué pour ecrire snd-usb-audio a la place de snd_usb_audio ^^ On dira rien.

Merci pour les détails. Du coup ca fait deux méthodes qui marchent. Mais si j'ai bien compris avec la tienne on peut règler la priorité des cartes les unes par rapport aux autres ? Bon pour quelqu'un qui a 2 cartes c'est pas super utie, mais pour quelqu'un qui en aurait plus, quelqu'un qui ferait de la MAO par exemple, ca peut prendre tout son sens et ça fait de ta méthode incontestablement la meilleure.

Bon j'y vais, si je reste encore une minute de plus devant mon pc alors que je suis cense partir en vacances dans 30minutes, ma copine va me crucifier. Bonne chance a celui qui codera l'outil pour gerer ca.

Semprobe
Telecom student at INSA Lyon (France)
Elive-compiz newcomer
Linux-user #495388
Re: Audio configurator missing ?
August 13, 2009 08:39PM
Ok Thanatermesis, I will test in a few days, this weekend I'm with friends.

Semprobe : parfait si ça marche emosmile
Re: Audio configurator missing ?
August 14, 2009 08:53AM
Ok, the new tool is created and elpanel is also ready to use it emosmile, you can have both things by just upgrading your system, but basically, just do: apt-get update && apt-get install elpanel elive-scripts

So please try it from elpanel, the tool is a bash script in /usr/sbin/audio-configurator if you want to edit it... Please tell me if works correctly emosmile

Btw, just out of curiosity, i see that there's also a line that says defaults.pcm.device, do you know anything for this one ?

Try it you too, phoenix emosmile

Any other suggestion for this tool is welcome
Re: Audio configurator missing ?
August 21, 2009 08:27PM
Hi,

I've just returned from holiday, I couldn't test your tool before today.

Well, it works wink Thank you !

And you don't even need to reboot your computer, it's enough to restart your audio-using applications.

Semprobe
Telecom student at INSA Lyon (France)
Elive-compiz newcomer
Linux-user #495388
Re: Audio configurator missing ?
August 21, 2009 09:03PM
Thanks to you for the report, suggestion, and tests of the tool emosmile

It is needed just to restart the audio application ? not any alsa daemon ? Ok, let me change the end-message of the tool... emosmile
Re: Audio configurator missing ?
August 21, 2009 09:54PM
Well, I had tested the tool but I hadn't read the script, since I'm no bash programmer, so I thought you restarted alsa at the end of the script. But I've just looked at it, and there's no "alsa-restart" command, so I'm astonished that it works without a reboot...

But, it obviously does work. I hope other users will help you understanding this ^^

Semprobe
Telecom student at INSA Lyon (France)
Elive-compiz newcomer
Linux-user #495388
Re: Audio configurator missing ?
August 22, 2009 02:13AM
Hum, unfortunately I have not 2 audio cards in order to test it, I have now updated the message to something like "you need to restart your audio applications" instead of the reboot needed, and yes, there's no restart of alsa, so I assume that a restart of alsa is not needed ?
Re: Audio configurator missing ?
August 22, 2009 04:56PM
Thanatermesis, your audio-configurator seems to work for me. Great.

Quote
Thanatermesis
Btw, just out of curiosity, i see that there's also a line that says defaults.pcm.device, do you know anything for this one ?

In what file ?
Re: Audio configurator missing ?
August 22, 2009 07:07PM
/usr/share/alsa/alsa.conf
Re: Audio configurator missing ?
August 23, 2009 04:09AM
No, i don't know anything about this file.