[SOLVED] Selecting Default sound card in Alsa

Questions about codecs, DVD playback, web plugins...
Forum rules
Before you post please read this

[SOLVED] Selecting Default sound card in Alsa

Postby Niks on Tue Feb 28, 2012 9:53 am

I have multiple sound cards in my LMDE64 system and all work fine. [SOLVED] :mrgreen:

After removing all other "options" commands, this is what I added to the end of
Code: Select all
gedit /etc/modprobe.d/alsa-base.conf
to get the card 0 as default

Code: Select all
#added by me to select default card
options snd_ca0106 index=0
options snd_hda_intel index=1
options saa7134_alsa index=2
options snd_hda_intel index=3
options snd-usb-audio index=4


-------------------------------------------------------------------------------------------------------------------------------

After removing Pulse ( as per instructions in http://forums.linuxmint.com/viewtopic.php?f=197&t=60485&p=547731#p547731)
But
I am having problems setting the default card.

I found http://www.alsa-project.org/main/index.php/Asoundrc but it's a lot of fiddling around which ( some peolpe are going to hate me for this :twisted: ) in pulse was very simple and easy!

The reason I removed pulse was to get to get pass through from VLC to my one of my digital outputs which works like a charm now :)

Any one know of a better/simpler/quicker way to do this :?:


UPDATE
Two days after posting this I got feed up not having and sound ( on my local speakers ) so I reinstalled pulse which works fine. I have also checked my 5.1 digital output using ALSA out from VLC and I have what I need for now ......

How ever I still would like to have my local speakers as Default and not the TV card :cry: the way it should be ! ie. the volume keys on the keyboard work again :D
So I am not going to post Solved as it's not and I'm sure I'm not he only one that has this problem after removing pulse.
With out going into the in's and out's of Pulse etc. I always found it the easiest way to route things and never let me down in that sense. I use Jack on other PC's but being a sound guy / musician I'm not intimated by "spaghetti" but this facility is missing in a nice simple GUI form in ALSA WHY :?:

UPDATE 2

Now I understand .....NOT ................no flash being streamed to Pulse and no systems sounds :x

So I really need to have my ALSA problem solved Pulse or no Pulse !
Last edited by Niks on Wed Jun 20, 2012 8:46 am, edited 6 times in total.
User avatar
Niks
Level 3
Level 3
 
Posts: 164
Joined: Thu Feb 11, 2010 6:59 am
Location: Netherlands

Linux Mint is funded by ads and donations.
 

Re: Selecting Default sound card in Alsa after Pulse removal

Postby mads on Tue Feb 28, 2012 11:26 am

User avatar
mads
Level 6
Level 6
 
Posts: 1302
Joined: Wed Nov 03, 2010 3:44 pm

Wrong sound device selected at start up.[Solved]

Postby Niks on Thu Mar 01, 2012 7:59 am

Nope that's not it at has just switched to an other card :roll:

# Prevent abnormal drivers from grabbing index 0
options bt87x index=-2
options cx88_alsa index=-2
options snd-atiixp-modem index=-2
options snd-intel8x0m index=-2
options snd-via82xx-modem index=-2
# Keep snd-pcsp from beeing loaded as first soundcard
options snd-pcsp index=-2
# Keep snd-usb-audio from beeing loaded as first soundcard
options snd-usb-audio index=-2
#added by me to select default card
options cx88_alsa index=0


Now I think that the cx88 is part of my TV card but it does not get selected as default so the point is the code is not right.
The actual card I want as default is CA0106 which is a Sound blaster Audigy :?

I have re removed pulse again as I want to be sure that I'm only playing with ALSA
User avatar
Niks
Level 3
Level 3
 
Posts: 164
Joined: Thu Feb 11, 2010 6:59 am
Location: Netherlands

Re: Selecting Default sound card in Alsa after Pulse removal

Postby mads on Thu Mar 01, 2012 9:22 am

Dear Niks, two questions:
1- I have read your opening post several times, but still don't quite understand what you are trying to achieve.
Could you please write in simple words, for stupid people like me, what is the problem?
2- What is the output of 'cat /proc/asound/modules'?
User avatar
mads
Level 6
Level 6
 
Posts: 1302
Joined: Wed Nov 03, 2010 3:44 pm

Re: Selecting Default sound card in Alsa after Pulse removal

Postby Niks on Thu Mar 01, 2012 3:35 pm

Thanks mads I will try to make it clear in one go !

cat /proc/asound/modules
0 saa7134_alsa
1 snd_ca0106
2 snd_hda_intel
3 snd_hda_intel
4 snd_usb_audio


I want - 1 snd_ca0106 as default card
So far everything I have tried has not worked. :cry:

Everything = your advise and all I could find so far online ! :roll:

I also made the point that "Pulse" has the facility to route signals very easily ( even though many people hate it ) ALSA has not got simple GUI system to do this :!:

Hope this got it :D
User avatar
Niks
Level 3
Level 3
 
Posts: 164
Joined: Thu Feb 11, 2010 6:59 am
Location: Netherlands

Re: Selecting Default sound card in Alsa after Pulse removal

Postby mads on Thu Mar 01, 2012 6:17 pm

Thanks. :)

Your second post shows that you have added these lines to /etc/modprobe.d/alsa-base.conf:
Code: Select all
#added by me to select default card
options cx88_alsa index=0


My suggestion is to replace the above lines with the following lines, save the file and reboot.
Code: Select all
#added by me to select default card
options snd_ca0106 index=0
options saa7134_alsa index=1
User avatar
mads
Level 6
Level 6
 
Posts: 1302
Joined: Wed Nov 03, 2010 3:44 pm

Re: Selecting Default sound card in Alsa [SOLVED]

Postby Niks on Thu Mar 01, 2012 11:00 pm

:D THANKS MADS thats it .....

I don't understand why the card never came up by name in the file but ok I have learnt a little more again! :mrgreen:
User avatar
Niks
Level 3
Level 3
 
Posts: 164
Joined: Thu Feb 11, 2010 6:59 am
Location: Netherlands

Re: Selecting Default sound card in ALSA

Postby Niks on Fri Mar 02, 2012 7:24 am

HOLD IT HIT THE BREAKS !! :oops: NOT SOLVED AHHHHHHHHHHHHHHHHHHH :roll:

After restarting it all work perfectly and I was a happy Chappy so I went to bed with a great big :mrgreen:
Next morning and now my USB has become default :?: :?: :?: :?: :?: :?: :?: :?: :?: :?: :?: :?: :?:
OK I thought lets reinstall all ALSA programs to make sure everything was ok and make sure
Code: Select all
gedit /etc/modprobe.d/alsa-base.conf
had all the correct stuff which it did, but no change after reboot!
Having read some of this http://www.volkerschatz.com/noise/alsa.html I ask why do they not mention alsa-base.conf and why do I not have a asoundrc.conf as
If you have read other documents about the asoundrc, you may have learnt that you can redefine ALSA's default device with a line like the following:
pcm.!default { type hw card 0 }

Then I ask if it's that easy then why didn't one of the clever people write a tiny tiny app to show / select / write the default card to that file ???
So what do I do now mads :?:
User avatar
Niks
Level 3
Level 3
 
Posts: 164
Joined: Thu Feb 11, 2010 6:59 am
Location: Netherlands

Re: Selecting Default sound card in Alsa [SOLVED]

Postby mads on Fri Mar 02, 2012 7:32 am

Add this to /etc/modprobe.d/alsa-base.conf:
# Keep snd-usb-audio from beeing loaded as first soundcard
options snd-usb-audio index=-2
User avatar
mads
Level 6
Level 6
 
Posts: 1302
Joined: Wed Nov 03, 2010 3:44 pm

Re: Selecting Default sound card in Alsa [SOLVED]

Postby Niks on Fri Mar 02, 2012 2:03 pm

That line was already in there Mads :cry:

I just rebooted again and got an other card again :( :cry:

here's the whole thing
# autoloader aliases
install sound-slot-0 /sbin/modprobe snd-card-0
install sound-slot-1 /sbin/modprobe snd-card-1
install sound-slot-2 /sbin/modprobe snd-card-2
install sound-slot-3 /sbin/modprobe snd-card-3
install sound-slot-4 /sbin/modprobe snd-card-4
install sound-slot-5 /sbin/modprobe snd-card-5
install sound-slot-6 /sbin/modprobe snd-card-6
install sound-slot-7 /sbin/modprobe snd-card-7
# Cause optional modules to be loaded above generic modules
install snd /sbin/modprobe --ignore-install snd && { /sbin/modprobe --quiet snd-ioctl32 ; /sbin/modprobe --quiet snd-seq ; }
install snd-rawmidi /sbin/modprobe --ignore-install snd-rawmidi && { /sbin/modprobe --quiet snd-seq-midi ; : ; }
install snd-emu10k1 /sbin/modprobe --ignore-install snd-emu10k1 && { /sbin/modprobe --quiet snd-emu10k1-synth ; : ; }

# Prevent abnormal drivers from grabbing index 0
options bt87x index=-2
options cx88_alsa index=-2
options snd-atiixp-modem index=-2
options snd-intel8x0m index=-2
options snd-via82xx-modem index=-2
# Keep snd-pcsp from beeing loaded as first soundcard
options snd-pcsp index=-2
# Keep snd-usb-audio from beeing loaded as first soundcard
options snd-usb-audio index=-2
#added by me to select default card
options snd_ca0106 index=0
options saa7134_alsa index=1


Sees to me that it's all a bit double with the -2 everywhere that's doesn't work :roll:

Oh well next thought please :D
User avatar
Niks
Level 3
Level 3
 
Posts: 164
Joined: Thu Feb 11, 2010 6:59 am
Location: Netherlands

Re: Selecting Default sound card in Alsa [SOLVED]

Postby EmonAzzameen on Sun Apr 15, 2012 10:14 am

Hi,

I have a similar problem with LMDE and ALSA. I replaced Pulse Audio with ALSA on my hp dm1 3101 Netbook.
Sound output is only possible within applications which allow to change the default sound device (e.g. VLC).

I read through the thread, but altering the default device in the conf file has no effect, even after rebooting.

Would be glad if someone could help me out.

Code: Select all
cat /proc/asound/cards

 0 [Generic        ]: HDA-Intel - HD-Audio Generic
                      HD-Audio Generic at 0xf0244000 irq 42
 1 [SB             ]: HDA-Intel - HDA ATI SB
                      HDA ATI SB at 0xf0240000 irq 16


Code: Select all
cat /proc/asound/modules

0 snd_hda_intel
1 snd_hda_intel


Code: Select all
/etc/modprobe.d/alsa-base.conf

# autoloader aliases
install sound-slot-0 /sbin/modprobe snd-card-0
install sound-slot-1 /sbin/modprobe snd-card-1
install sound-slot-2 /sbin/modprobe snd-card-2
install sound-slot-3 /sbin/modprobe snd-card-3
install sound-slot-4 /sbin/modprobe snd-card-4
install sound-slot-5 /sbin/modprobe snd-card-5
install sound-slot-6 /sbin/modprobe snd-card-6
install sound-slot-7 /sbin/modprobe snd-card-7
# Cause optional modules to be loaded above generic modules
install snd /sbin/modprobe --ignore-install snd && { /sbin/modprobe --quiet snd-ioctl32 ; /sbin/modprobe --quiet snd-seq ; }
install snd-rawmidi /sbin/modprobe --ignore-install snd-rawmidi && { /sbin/modprobe --quiet snd-seq-midi ; : ; }
install snd-emu10k1 /sbin/modprobe --ignore-install snd-emu10k1 && { /sbin/modprobe --quiet snd-emu10k1-synth ; : ; }

# Prevent abnormal drivers from grabbing index 0
options bt87x index=-2
options cx88_alsa index=-2
options snd-atiixp-modem index=-2
options snd-intel8x0m index=-2
options snd-via82xx-modem index=-2
# Keep snd-pcsp from beeing loaded as first soundcard
options snd-pcsp index=-2
# Keep snd-usb-audio from beeing loaded as first soundcard
options snd-usb-audio index=-2
options snd_hda_intel index=0


Code: Select all
lspci -v | less

00:01.1 Audio device: ATI Technologies Inc Wrestler HDMI Audio [Radeon HD 6250/6
310]
        Subsystem: Hewlett-Packard Company Device 1611
        Flags: bus master, fast devsel, latency 0, IRQ 42
        Memory at f0244000 (32-bit, non-prefetchable) [size=16K]
        Capabilities: <access denied>
        Kernel driver in use: snd_hda_intel


Code: Select all
uname -r

3.2.0-2-amd64
EmonAzzameen
Level 1
Level 1
 
Posts: 2
Joined: Sun Apr 15, 2012 9:43 am

Re: Selecting Default sound card in Alsa [SOLVED]

Postby mads on Sun Apr 15, 2012 11:09 am

EmonAzzameen wrote:
Code: Select all
cat /proc/asound/modules

0 snd_hda_intel
1 snd_hda_intel

Hi. Your sound devices are named the same, and forcing one into index 0 will not work.
I am not sure, you could try to add enable=1 (to enable) and enable=0 (to disable) options:

options snd-hda-intel enable=1 index=0
options snd-hda-intel enable=0 index=1

or

options snd-hda-intel enable=0 index=0
options snd-hda-intel enable=1 index=1

You need to reboot after editing alsa-base.conf.
User avatar
mads
Level 6
Level 6
 
Posts: 1302
Joined: Wed Nov 03, 2010 3:44 pm

Re: Selecting Default sound card in Alsa [SOLVED]

Postby EmonAzzameen on Sun Apr 15, 2012 11:33 am

Yes it worked.

Thanks
EmonAzzameen
Level 1
Level 1
 
Posts: 2
Joined: Sun Apr 15, 2012 9:43 am

Re: Selecting Default sound card in Alsa [SOLVED]

Postby mads on Sun Apr 15, 2012 11:40 am

EmonAzzameen wrote:Yes it worked.

Thanks

No problem, you're welcome.
Glad that it worked. I was not sure at all. :)
User avatar
mads
Level 6
Level 6
 
Posts: 1302
Joined: Wed Nov 03, 2010 3:44 pm

Re: [SOLVED] Selecting Default sound card in Alsa

Postby Dark Angel on Sun Jul 22, 2012 8:38 pm

I registered on the forum just to post my thanks to this thread.
Since installing Mint 13 XFCE I havehad nothing but trouble getting the volumeand mute hotkeys working on my Eeepc. I run Slackware 13.37 XFCE on my desktop and have had nowhere near as much trouble with it (Alsa) as with this (Pulse) so I've been trying to get rid of Pulse for days.but every time I tried I woud end up with no sound, Fixing the default audio device finally soled he issue and now everything works as it should.

THANKYOU! :D

Beer-buying may or may not be involved, but can't be ruled out.
Dark Angel
Level 1
Level 1
 
Posts: 1
Joined: Sun Jul 22, 2012 8:31 pm

Linux Mint is funded by ads and donations.
 

Return to Sound, Multimedia & Codecs

Who is online

Users browsing this forum: No registered users and 2 guests