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

 
Reply to topic    Gentoo Forums Forum Index Duplicate Threads
View previous topic :: View next topic  
Author Message
donjames
Apprentice
Apprentice


Joined: 19 Dec 2004
Posts: 181
Location: Henderson, Texas USA

PostPosted: Tue Jan 26, 2010 5:36 am    Post subject: ALSA is difficult Reply with quote

Hi,

For what it's worth.

I have been working on my laptop trying to get the sound working for the past 4 days.

My problem is trying to get all of the sound to go to the USB headset. I have been unable to accomplish this.

I am totally and thoroughly disgusted with ALSA, the support and the pseudo-documentation.

People are still making the mistake of trying to write generalized documentation for all distributions of Linux. Well, in my opinion it is worthless.

What we need is examples that are specific to Gentoo. If I knew enough about ALSA as implemented on Gentoo, then I would be glad to write specific documentation.

ALSA sucks.


Last edited by donjames on Tue Jan 26, 2010 5:33 pm; edited 1 time in total
Back to top
View user's profile Send private message
gentoo_ram
Guru
Guru


Joined: 25 Oct 2007
Posts: 398
Location: San Diego, California USA

PostPosted: Tue Jan 26, 2010 7:59 am    Post subject: Reply with quote

From what I can tell, there is no such thing as "send all sound to the USB headset". You have to tell each program which sound device to use. That seems to be the design of ALSA. I guess it's good in that it lets you point one program at one device and another program at a different device. The bad news is that each program seems to implement this design somewhat differently.

You have to look at /proc/asound/cards. Is your headset listed there? If it's index zero, then that's good because it'll probably be the default. But if it's index 1, then you'll have to tell each program to send sound to that device.

For example, 'mpg321 -o alsa -a 1:0 foo.mp3'.

In amarok, I had to tell it to play to 'hw:1,0'.

Once you do that, you'll need to use a mixer program to set the sound output levels. The default is EVERYTHING MUTED. So if you do nothing, you get no sound. Be sure to check that, too.
Back to top
View user's profile Send private message
sera
Developer
Developer


Joined: 29 Feb 2008
Posts: 1016
Location: CET

PostPosted: Tue Jan 26, 2010 8:34 am    Post subject: Reply with quote

Code:
pcm.!default {
         type asym
         playback.pcm {
                 type plug
                 slave.pcm "hw:x,y"
         }
 }

Substitute x,y with your device and add to it to /etc/asound.conf. Alternatively you can use etc/modprobe.d/alsa.conf to only enable the card you want to use. Either should work.
Back to top
View user's profile Send private message
donjames
Apprentice
Apprentice


Joined: 19 Dec 2004
Posts: 181
Location: Henderson, Texas USA

PostPosted: Tue Jan 26, 2010 5:37 pm    Post subject: ALSA is difficult Reply with quote

Hi sera,

I have two questions:

1) Where is /etc/asound.conf? I can't find it in my system. Do I just create it?

2) How exactly do you only enable the sound device you wish to use in /etc/modprobe.d/alsa.conf?

Thanks,

Don James
Back to top
View user's profile Send private message
donjames
Apprentice
Apprentice


Joined: 19 Dec 2004
Posts: 181
Location: Henderson, Texas USA

PostPosted: Tue Jan 26, 2010 5:52 pm    Post subject: ALSA is difficult Reply with quote

Hello gentoo_ram,

You seem to be right -- each application implements the sound interface in a different way. XLite will only talk to the oss sound, not to alsa. KsCD running under KDE seems to, as its default, talk only to the built-in speakers.

There is no menu on the KsCD GUI that allows selection of the sound output device. It may have to be launched on the command line. I can't seem to find a configuration file for KsCD. Oh, well.

I'm still trying to figure out exactly how to edit /etc/modprobe.d/alsa.conf to set the default sound device.

Also trying to figure out /root/.asoundrc.

I did get all of the sound to go to the usb headset.
First I took all of the alsa sound out of the kernel except for the usb sound.
Recompiled the kernel.
Shut down the machine.
Unplugged the usb headset.
Booted the machine.
Plugged in the usb headset.
Now, all of the sound goes to the usb headset. Even the sound from KsCD.
But, XLite has no sound at all.


Thanks for your input.

Don James
Back to top
View user's profile Send private message
timeBandit
Bodhisattva
Bodhisattva


Joined: 31 Dec 2004
Posts: 2672
Location: here, there or in transit

PostPosted: Tue Jan 26, 2010 7:06 pm    Post subject: Reply with quote

Moved from Other Things Gentoo to Duplicate Threads.
See .asoundrc help.
_________________
Plants are pithy, brooks tend to babble--I'm content to lie between them.
Super-short f.g.o checklist: Search first, strip comments, mark solved, help others.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Duplicate Threads 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