Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Misbehaving ALSA
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Multimedia
View previous topic :: View next topic  
Author Message
Kate Monster
Apprentice
Apprentice


Joined: 13 Jun 2006
Posts: 221
Location: Clarkston, Michigan

PostPosted: Tue Feb 21, 2012 8:51 pm    Post subject: Misbehaving ALSA Reply with quote

I don't know if ALSA just sucks, or if it's just me. It seems whenever it finds a new device, it switches to it and uses it as the default device for everything. Perfect example, I plugged in a webcam, which has no sound output channels at all, and it immediately switched to it as the default device. I already changed stuff in my .asoundrc to make the default card 1(my Intel card), but that worked until I plugged this webcam in. Basically what I'm asking is, how can I keep ALSA from switching the default device every time I plug an audio device in?
Back to top
View user's profile Send private message
Gusar
Advocate
Advocate


Joined: 09 Apr 2005
Posts: 2557
Location: Slovenia

PostPosted: Tue Feb 21, 2012 9:09 pm    Post subject: Reply with quote

The default card is 0.

This should be solved by a simple /etc/modprobe.d/alsa.conf
Code:
options snd_hda_intel index=0
options snd_usb_audio index=1

Keyword "should". But something in this direction is the solution. Unless you also have some other stuff meddling with things, like Pulseaudio.
Back to top
View user's profile Send private message
Kate Monster
Apprentice
Apprentice


Joined: 13 Jun 2006
Posts: 221
Location: Clarkston, Michigan

PostPosted: Wed Feb 22, 2012 5:27 am    Post subject: Reply with quote

I do use KDE and its sound system, that's it though. I tried setting a new default card in my .asoundrc, but firefox/chrome ignored it. Mind you, sound worked fine in every other program except those two. They seem to go in order and pick the first card it sees, if available.
Back to top
View user's profile Send private message
hedmo
l33t
l33t


Joined: 29 Aug 2009
Posts: 829
Location: halmstad

PostPosted: Wed Feb 22, 2012 6:06 am    Post subject: Reply with quote

Kate Monster

i have quite the same.alsa dont like my r600 audio card.i set :

cat /etc/asound.conf
pcm.!default {
type hw
card 1
device 3
}


aplay -l
card 1: Generic [HD-Audio Generic], device 3: HDMI 0 [HDMI 0]
Subdevices: 1/1
Subdevice #0: subdevice #0
Back to top
View user's profile Send private message
Gusar
Advocate
Advocate


Joined: 09 Apr 2005
Posts: 2557
Location: Slovenia

PostPosted: Wed Feb 22, 2012 9:33 am    Post subject: Reply with quote

Kate Monster wrote:
They seem to go in order and pick the first card it sees, if available.

They use the alsa "default" device. The one at index 0. Though maybe the KDE sound system messed with that. But as I don't use it, I have no idea what KDE could be doing.
Back to top
View user's profile Send private message
aCOSwt
Advocate
Advocate


Joined: 19 Oct 2007
Posts: 2041
Location: Between the keyboard and the chair

PostPosted: Wed Feb 22, 2012 11:11 am    Post subject: Reply with quote

Kate Monster wrote:
I do use KDE and its sound system

Alsa is not in cause here.
In addition to this, you should not be obliged to fix the indexes as Gusar suggests.
If you are using phonon vlc backend, then it appears more and more broken on systems with multiple audio devices.
https://bugs.gentoo.org/show_bug.cgi?id=402151
I am personally still using the no-longer-supported-but-perfectly-working xine backend because of this.
_________________
In theory there are no differences between theory and practice. In practice, there are.
Don't try to understand my posts. Immanuel Kant never did, he thinks that only music and laughter do not have to mean anything.
Back to top
View user's profile Send private message
Kate Monster
Apprentice
Apprentice


Joined: 13 Jun 2006
Posts: 221
Location: Clarkston, Michigan

PostPosted: Thu Apr 05, 2012 4:02 am    Post subject: Reply with quote

Hiya.

I don't believe KDE has anything to do with this. Firefox and Chrome exhibit the same behavior in Fluxbox. They attempt to use device 0 no matter what. I think the true issue at heart is, why is ALSA allowing a device with no sound output channels to be device 0? Surely this deserves a bug report, but perhaps I am misunderstanding something.

Also, I must not have seen Gusar's advice in the beginning of the thread with the "option" lines. I added those. TIA.
Back to top
View user's profile Send private message
PaulBredbury
Watchman
Watchman


Joined: 14 Jul 2005
Posts: 7022

PostPosted: Thu Apr 05, 2012 4:40 am    Post subject: Reply with quote

Kate Monster wrote:
Firefox and Chrome exhibit the same behavior

Outputting what? Don't you mean Adobe Flash? That outputs to ALSA's "default" PCM (that's its actual name), which is pretty reasonable.
_________________
Improve your font rendering and ALSA sound
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Multimedia All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum