LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Slackware (http://www.linuxquestions.org/questions/slackware-14/)
-   -   No way to toggle between sound devices in Slackware? Really? (http://www.linuxquestions.org/questions/slackware-14/no-way-to-toggle-between-sound-devices-in-slackware-really-4175454552/)

papazulu 03-18-2013 02:05 PM

No way to toggle between sound devices in Slackware? Really?
 
Is there a way to toggle between sound devices in Slackware? I mean I understand the "linux way" concept and all but really. I find it ironic that something as beefy and new wave as KDE can exist on a platform for which there is not a quicker, more elegant way to move between sound devices. I mean you can't say you are "keeping it old school" hacking config files like a boss with KDE as your hood ornament.

I admit I am new to slackware and it would be brassy to start kicking up dust right off the bat, but there really should be a better way to select between sound devices and I mean in the command line itself. Forget about the gui. I should be able to open bash, type a few commands and boom, my speakers are now my headphones.

Yes I have read all the tutorials and yes I will post again with detailed actions i took but right now i have to go and i wanted to get this posted before I leave.



anyway thank you all for any help you could provide.

ponce 03-18-2013 02:14 PM

have you tried
Code:

alsamixer

markush 03-18-2013 02:17 PM

Hi,

alsamixer, the <F6> key.

Markus

papazulu 03-18-2013 02:51 PM

Quote:

Originally Posted by markush (Post 4914014)
Hi,

alsamixer, the <F6> key.

Markus

Tried all that, doesn't work in the way it appears that it is supposed to. When I select a card and then close youtube/browser and open it again the sound is still coming from "default" device, which in this case is my speaker. Also why is linuxquestions.org the only website online that it takes me 13 seconds to load. Is there any way to speed this up. All other websites load quickly just this one doesn't.

markush 03-18-2013 03:07 PM

KDE comes with it's own tools, I'd recommend when you use KDE, manage your sound-devices with KDE. Which other sound-devices do you have? are they recognized by the system? please post the output of
Code:

lspci -k | grep -iA3 audio
As of the website: which DNS-server do you use?

Markus

yenn 03-19-2013 03:33 PM

Quote:

Originally Posted by markush (Post 4914014)
alsamixer, the <F6> key.

This doesn't work as expected. I run Fluxbox so can't use Desktop Environment centric GUI tools to change default soundcard, but I managed to do it via .asoundrc.

First, list available soundcards
Code:

# aplay -l
or
# cat /proc/asound/cards

then edit or create .asoundrc in your home directory
Code:

pcm.!default {
          type hw
          card X # replace X with number of your soundcard
}

restart application using ALSA and it should use new default soundcard.

It would be handy if anyone created simple GUI to change default soundcards on the fly.

stormtracknole 03-19-2013 03:41 PM

You may want to look at pulseaudio if you are interested in a gui. You get the overhead of pulseaudio, but it has gotten better recently. I use a script that I found here in LQ in order to change the $HOME/.asoundrc file on the fly. Let me if I can find the thread on how to set it up.

yenn 03-19-2013 04:07 PM

If it would be possible do it in CLI, I wouldn't really insist on GUI. I just don't know if it's possible to change it without touching .asoundrc manually, so I thought GUI is the only easy (and visually appealing, for those who cares about this) way. Thanks for suggestion anyway.

I'd be happy with syntax like this
Code:

$ alsactl set default hw:0
but so far only way is via alsamixer, which doesn't work (at least for me).

Beelzebud 03-19-2013 10:41 PM

I know it's been frowned upon, but the only way I've found to get reliable true 5.1 sound working, and the ability to switch to my USB headphones on the fly, is by using pulse audio. It's come a long way since the early days.

narz 03-19-2013 11:35 PM

I use a udev rule to use my USB headset when I plug it in, and then use my main soundcard when I unplug it. It works fine but you have to restart any application you want sound with at the time you plug/unplug your headset.
Code:

KERNEL=="pcmC[D0-9cp]*", ACTION=="add", PROGRAM="/bin/sh -c 'K=%k; K=$${K#pcmC}; K=$${K%%D*}; echo defaults.ctl.card $$K > /etc/asound.conf; echo defaults.pcm.card $$K >>/etc/asound.conf'"

KERNEL=="pcmC[D0-9cp]*", ACTION=="remove", PROGRAM="/bin/sh -c 'echo defaults.ctl.card 0 > /etc/asound.conf; echo defaults.pcm.card 0 >>/etc/asound.conf'"


Richard Cranium 03-20-2013 12:09 AM

Quote:

Originally Posted by papazulu (Post 4914038)
Tried all that, doesn't work in the way it appears that it is supposed to. When I select a card and then close youtube/browser and open it again the sound is still coming from "default" device, which in this case is my speaker. Also why is linuxquestions.org the only website online that it takes me 13 seconds to load. Is there any way to speed this up. All other websites load quickly just this one doesn't.

Maybe you should edit /etc/rc.d/rc.alsa to prevent the automatic loading of the OSS modules.


All times are GMT -5. The time now is 07:50 PM.