You are not logged in.

#1 2009-04-21 23:15:19

Bionic Apple
Member
Registered: 2008-08-05
Posts: 59

The Elusive Perfect ALSA Configuration

The Goal: Be able to insert USB headphones into my computer, which in turn will cause ALSA to switch sound cards from the speakers to the headphones.  As much applications must support this switch as possible without additional configuration.  Also, establish a common "PCM" channel in the sound cards.  Extra brownie points for automatic multi-headphone output, as well.

The Status: By reading wiki's, guides, and being assisted by a person or two, I have a decently working configuration.  I have my headphones set as the default sound card in ~.asoundrc.  This does make sound (for most applications) shift from speakers to headphones when the headphones are plugged in automatically.  However, after trying to install a few new applications, I realized how narrow minded this solution is.  Alsamixer complains of a missing card when heaphones are unplugged, mpd fails to switch with the default, Volwheel (taskbar volume changer) can only change the volume of a predetermined sound card, and many apps complain of a missing "PCM" channel.

Now, the info that I have been given by several people and wiki's has been helpful, but it usually only makes me more confused.  After reading one strategy  (let's say, Udev scripts), a second one (built-in Alsa config), another (changing drivers), and a few more, I have no clue what to do.  So, that is why I am posting this.  I need a definitive solution that is not hackish, such as the asound-gtk application.

The Specs:
- Generic Logitech USB Headphones
- Creative Audigy sound card (ALSA calls it CA0106)
- Desktop
- 32-bit
- No PulseAudio (I tried that, and well, it was just too laggy)


All help is appreciated!  If there is enough good information, I might make a "USB Headphones" article in the Arch Wiki with this information!

Offline

#2 2009-04-22 10:24:39

deej
Member
Registered: 2008-02-08
Posts: 395

Re: The Elusive Perfect ALSA Configuration

This may help:

http://alsa.opensrc.org/index.php/Hotpl … es_(Howto)

...it's from the

unofficial wiki about ALSA

, to be found here:

http://alsa.opensrc.org/index.php/Hotpl … es_(Howto)

Deej

Offline

#3 2009-04-22 22:55:02

ngoonee
Forum Fellow
From: Between Thailand and Singapore
Registered: 2009-03-17
Posts: 7,354

Re: The Elusive Perfect ALSA Configuration

A bit out of what the OP requested, but Pulse was made for situations like this. Perhaps solving the lagginess (what does that actually mean, skipping or slow response to your commands?) would be more beneficial overall.

Being more audio-work inclined myself, I'd suggest JACK with scripting, but that's most certainly overkill for audio-listening.


Allan-Volunteer on the (topic being discussed) mailn lists. You never get the people who matters attention on the forums.
jasonwryan-Installing Arch is a measure of your literacy. Maintaining Arch is a measure of your diligence. Contributing to Arch is a measure of your competence.
Griemak-Bleeding edge, not bleeding flat. Edge denotes falls will occur from time to time. Bring your own parachute.

Offline

#4 2009-04-22 23:28:01

Bionic Apple
Member
Registered: 2008-08-05
Posts: 59

Re: The Elusive Perfect ALSA Configuration

I used "laggy" to prevent having to make a seperate paragraph to detail a problem I don't have anymore.  However, it probably requires some clarification now, so here you go:

When I used PulseAudio, all applications gave corrupted sound.  In addition, certain applications, like Flashplayer, would start to play with no sound, then stop, then the audio would play "catch up" with the paused video, then they would continue in sync.  Other times, voices and video were just plainly out of sync, with the sound a second or two behind.

Oh, and deej, thanks for the link, but it still doesn't really change my setup that much.  Applications still see my speakers as hw:0,0, no matter what.  Plus, I still do not have a PCM channel.  It does prevent Alsamixer from popping up an error of undetected sound card, however.

Offline

#5 2009-04-23 00:47:23

ngoonee
Forum Fellow
From: Between Thailand and Singapore
Registered: 2009-03-17
Posts: 7,354

Re: The Elusive Perfect ALSA Configuration

Okay, thanks for the clarification. I'm not very able to assist on that, since Pulse has never given me problems in my usage of it, with the exception of when I manage to soft-lock my computer, all the sounds that are emitted by, say, Pidgin in that time are stored up and played back at one go. I believe adding yourself to pulse-rt or pulse-access would solve that.

If you ever choose to go back the Pulse route, I'd be able to help I believe. There are many reasons I use it, but the main one has to be the sheer amount of effort needed to configure ALSA through .asoundrc for varying conditions.


Allan-Volunteer on the (topic being discussed) mailn lists. You never get the people who matters attention on the forums.
jasonwryan-Installing Arch is a measure of your literacy. Maintaining Arch is a measure of your diligence. Contributing to Arch is a measure of your competence.
Griemak-Bleeding edge, not bleeding flat. Edge denotes falls will occur from time to time. Bring your own parachute.

Offline

#6 2009-05-22 01:55:21

Bionic Apple
Member
Registered: 2008-08-05
Posts: 59

Re: The Elusive Perfect ALSA Configuration

Okay, I am now trying to get Pulse to work again, but there is one major problem.  It seems that all sound coming from a media source is muted for the first few seconds.  Or perhaps Pulse is slow in catching up with it.

Any solutions?

Offline

Board footer

Powered by FluxBB