LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices

Reply
 
Search this Thread
Old 03-18-2013, 02:05 PM   #1
papazulu
LQ Newbie
 
Registered: Mar 2013
Posts: 3

Rep: Reputation: Disabled
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.
 
Old 03-18-2013, 02:14 PM   #2
ponce
Senior Member
 
Registered: Aug 2004
Location: Pisa, Italy
Distribution: Slackware
Posts: 2,434

Rep: Reputation: 867Reputation: 867Reputation: 867Reputation: 867Reputation: 867Reputation: 867Reputation: 867
have you tried
Code:
alsamixer
 
Old 03-18-2013, 02:17 PM   #3
markush
Senior Member
 
Registered: Apr 2007
Location: Germany
Distribution: Slackware
Posts: 3,970

Rep: Reputation: 848Reputation: 848Reputation: 848Reputation: 848Reputation: 848Reputation: 848Reputation: 848
Hi,

alsamixer, the <F6> key.

Markus
 
Old 03-18-2013, 02:51 PM   #4
papazulu
LQ Newbie
 
Registered: Mar 2013
Posts: 3

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by markush View Post
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.
 
Old 03-18-2013, 03:07 PM   #5
markush
Senior Member
 
Registered: Apr 2007
Location: Germany
Distribution: Slackware
Posts: 3,970

Rep: Reputation: 848Reputation: 848Reputation: 848Reputation: 848Reputation: 848Reputation: 848Reputation: 848
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
 
Old 03-19-2013, 03:33 PM   #6
yenn
Member
 
Registered: Jan 2011
Location: Czech Republic
Distribution: Slackware, Gentoo
Posts: 153

Rep: Reputation: 21
Quote:
Originally Posted by markush View Post
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.

Last edited by yenn; 03-19-2013 at 03:35 PM.
 
Old 03-19-2013, 03:41 PM   #7
stormtracknole
Member
 
Registered: Aug 2005
Location: The Big Easy
Distribution: Slackware, RHEL
Posts: 817

Rep: Reputation: 104Reputation: 104
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.
 
Old 03-19-2013, 04:07 PM   #8
yenn
Member
 
Registered: Jan 2011
Location: Czech Republic
Distribution: Slackware, Gentoo
Posts: 153

Rep: Reputation: 21
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).

Last edited by yenn; 03-19-2013 at 04:13 PM.
 
Old 03-19-2013, 10:41 PM   #9
Beelzebud
Member
 
Registered: Oct 2010
Distribution: Arch & Slackware
Posts: 95

Rep: Reputation: 22
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.
 
Old 03-19-2013, 11:35 PM   #10
narz
Member
 
Registered: May 2007
Location: US
Distribution: slackware
Posts: 184

Rep: Reputation: 35
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'"
 
Old 03-20-2013, 12:09 AM   #11
Richard Cranium
Senior Member
 
Registered: Apr 2009
Location: Carrollton, Texas
Distribution: Slackware64 14.1
Posts: 1,482

Rep: Reputation: 421Reputation: 421Reputation: 421Reputation: 421Reputation: 421
Quote:
Originally Posted by papazulu View Post
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.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Ordered sound devices funkynesh Slackware 7 02-04-2009 03:55 PM
sound devices wilmajeffries LinuxQuestions.org Member Intro 1 05-05-2008 08:57 PM
2 sound devices vmelkon Ubuntu 1 07-03-2007 07:05 PM
No sound devices found shame Slackware 7 04-30-2006 10:55 AM
udev and 51 sound devices! tamills Linux - Hardware 0 05-15-2004 05:43 PM


All times are GMT -5. The time now is 11:57 PM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration