VectorLinux

Please login or register.

Login with username, password and session length
Advanced search  

News:

Visit our home page for VL info. For support and documentation, visit the Vector Linux Knowledge Center or search the Knowledge Center and this Forum using the search box above.

Author Topic: HOWTO make one soundcard default  (Read 20330 times)

The Headacher

  • Louder than you
  • Global Moderator
  • Vectorian
  • *****
  • Posts: 1553
  • I like the bass to go BOOM!
    • Multimedia on VL (work in progress)
HOWTO make one soundcard default
« on: December 07, 2007, 08:16:02 am »

If you have multiple soundcards (like an onboard and an external one), you might have had the problem that the wrong one is the default soundcard. This is because the kernel module for the "wrong" card is loaded first, and if no option is passed when loading the module it gets the first available card number (0).

If they both use a different kernel module you can easily make sure the right one is the default card.

Find out what module is being used for your soundcards:
Code: [Select]
cat /proc/asound/modules
On my computer this could give
Code: [Select]
0 snd_usb_audio
1 snd_es1968
This means that the card that's currently the default soundcard (card 0) uses the snd_usb_audio module.

This is my EMI M4U, a device that's just capable of sending and receiving midi signals, not audio. So when I try to play sound I get an error. So I want the other one to be default.

You can't "reserve" card 0 for a particular module, because the options for a module are only passed when the module is loaded, and the whole problem was that the wrong module is loaded first. So, to make sure the right soundcard is default, we have to make sure the other one becomes card 1 when the module for it is loaded. This can be done by adding 1 simple line to /etc/modprobe.d/sound:
Code: [Select]
options name_of_offending_module index=1
So, in my case this would be
Code: [Select]
options snd_usb_audio index=1
Reboot and try!
« Last Edit: December 07, 2007, 08:21:50 am by The Headacher »
Logged
Most music on my soundcloud page was arranged in programs running on VL.

Gans

  • Member
  • *
  • Posts: 9
Re: HOWTO make one soundcard default
« Reply #1 on: August 01, 2012, 09:48:00 am »

In VLocity (VectorLinux 7.0 x86-64) I have same problem, but today the above-stated decision doesn't approach.
cat /proc/asound/modules give 0
snd_usb_audio
1 snd_hda_intel
2 snd_hda_intel
The sound play good in usb-headphones, but my built-in sound card is silent (In Alsa mixer it is possible to choose both that, and another, but on change of level of a sound reacts only headphones).
Can I force to work both headphones and sound card?
Logged

Gans

  • Member
  • *
  • Posts: 9
Re: HOWTO make one soundcard default
« Reply #2 on: August 01, 2012, 11:26:24 am »

In deadbeef I can choose built-in card too, and everything ok. But how to do this in another programs?
Logged

Gans

  • Member
  • *
  • Posts: 9
Re: HOWTO make one soundcard default
« Reply #3 on: August 12, 2012, 01:57:17 am »

In alsamixer I mute headphones and disable auto-mute for built-in sound card. Now all audio play in built-in sound card that was required to me  :)
Logged