[SOLVED] Select default soundcard

[SOLVED] Select default soundcard

Postby truls » Feb 14th, '12, 20:49

I have 2 soundcards, 1 internal and 1 external.
After boot, I run alsamixer to select soundcard, it works great as long I don't reboot.

I cannot find where to edit configuration about soundcard, so, I created a file in /etc/modprobe.d, called sound.conf. It has no effect, I still have to use alsamixer.

Code: Select all
cat /proc/asound/modules

0 snd_hda_intel
1 snd_usb_audio
Code: Select all
cat /etc/modprobe.d/sound.conf

options snd_usb_audio index=1
options snd_hda_intel index=0

What do I edit, and where, to permanently use the external soundcard?
truls
 
Posts: 52
Joined: Aug 12th, '11, 08:43

Re: Select default soundcard

Postby winstonteacox » Feb 14th, '12, 21:07

Hi!

Select your soundcard with alsamixer.

Then do as root:

Code: Select all
alsactl store


With an editor open /etc/rc.d/rc.local
and place the following line at the end:

Code: Select all
alsactl restore


Save and reboot. Now it should work.

I did the same in former times with a Maya 44 usb, when Pulseaudio was not able to recognize it.

Hope I could help,

cheers,
Bernd
Now after my words of profound wisdom, I'm going back to procrastinating.
User avatar
winstonteacox
 
Posts: 139
Joined: Mar 30th, '11, 16:05
Location: Straubing Germany

Re: Select default soundcard

Postby truls » Feb 14th, '12, 22:25

Thanks, it almost worked. If I run alsactl restore manually, it works. It seems rc.local do not execute the alsactl restore command, or can it be Gnome changing settings after rc.local runs?
truls
 
Posts: 52
Joined: Aug 12th, '11, 08:43

Re: Select default soundcard

Postby winstonteacox » Feb 14th, '12, 23:00

I can't tell why it doesn't work anymore ...
Maybe systemd ... someone with better knowledge may answer this ...
I don't think, that Gnome is changing the settings ...

A possible solution:
Write a shell script like

Code: Select all
#!/bin/sh
 alsactl restore


make it executable and put it in the autostart folder of your DE.

I never tried it this way, but maybe it works ...

cheers,
Bernd
Now after my words of profound wisdom, I'm going back to procrastinating.
User avatar
winstonteacox
 
Posts: 139
Joined: Mar 30th, '11, 16:05
Location: Straubing Germany

Re: Select default soundcard

Postby doktor5000 » Feb 15th, '12, 00:17

Use pavucontrol or the means of your desktop environment to select the default soundcard, doing it via alsa tools is deprecated and prone to breakage.
Cauldron is not for the faint of heart!
Caution: Hot, bubbling magic inside. May explode or cook your kittens!
----
Disclaimer: Beware of allergic reactions in answer to unconstructive complaint-type posts
User avatar
doktor5000
 
Posts: 18049
Joined: Jun 4th, '11, 10:10
Location: Leipzig, Germany

Re: Select default soundcard

Postby truls » Feb 15th, '12, 11:57

Problem solved, I have disabled PulseAudio in the Mageia Control Center, leaving everything untouched, and I have selected the correct sound device in Gnome soundcontrol settings.

I am not sure if this is the right solution, thanks for pointing me in the right direction!
truls
 
Posts: 52
Joined: Aug 12th, '11, 08:43

Re: Select default soundcard

Postby doktor5000 » Feb 15th, '12, 12:14

Actually it's the wrong way, but as long as it works, why not?
Cauldron is not for the faint of heart!
Caution: Hot, bubbling magic inside. May explode or cook your kittens!
----
Disclaimer: Beware of allergic reactions in answer to unconstructive complaint-type posts
User avatar
doktor5000
 
Posts: 18049
Joined: Jun 4th, '11, 10:10
Location: Leipzig, Germany


Return to Sound

Who is online

Users browsing this forum: No registered users and 1 guest

cron