Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Audio Output Toggling - How to toggle default output device?
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
Spidey
Apprentice
Apprentice


Joined: 07 Sep 2006
Posts: 269

PostPosted: Mon May 30, 2011 2:39 am    Post subject: Audio Output Toggling - How to toggle default output device? Reply with quote

I'll commit a major sin right now: compare windows to linux.
Under windows 7, I can right click on the volume widget, click in Playback devices and then just select one from the list and mark it as default. Right away, all sounds would route to that device, even sounds already playing: mp3 playing in the background, any video playing on mpc-hc or even youtube videos. I could change right away from my television (hdmi output) to my headphone. No hassle. I'd do it many times, I prefer listening to music, chatting and playing with headphones on (with mic clipped on the cable), but I prefer surfing the web and watching videos with the sound output set to my tv set.

How to do this with KDE 4? I'm having trouble configuring my sound setup, just to realize alsa is configured properly, I can select the sound device correctly under VLC, but KDE doesn't let me handle the default output device, at least not that I've learnt so far. Do I need any other software to help me in this task? Maybe another layer above alsa? What about phonon?

Ah, I have defaults set on /etc/asound.conf, and that's exactly what KDE uses as default.
Back to top
View user's profile Send private message
sirlark
Guru
Guru


Joined: 25 Oct 2004
Posts: 306
Location: Limerick, Ireland

PostPosted: Wed Jun 15, 2011 7:18 pm    Post subject: Reply with quote

To switch audio playback devices mid-playback you need pulse audio AFAIK. The default pulse audio mixer app has a simple dropdown to select vailable playback devices. If you really want to use pure ALSA, you wil have to modify the default device in ~/.asoundrc and restart the alsa service, and it won't work for applications already running.
_________________
Adopt an unanswered post today
Back to top
View user's profile Send private message
PaulBredbury
Watchman
Watchman


Joined: 14 Jul 2005
Posts: 7310

PostPosted: Thu Jun 16, 2011 6:48 am    Post subject: Reply with quote

sirlark wrote:
restart the alsa service

There is no need to do that.

What's supposed to happen is that the apps themselves allow the user to change the audio device. If they don't, then edit ~/.asoundrc (I use scripts) and restart the app.
Back to top
View user's profile Send private message
Spidey
Apprentice
Apprentice


Joined: 07 Sep 2006
Posts: 269

PostPosted: Thu Jun 16, 2011 1:39 pm    Post subject: Reply with quote

PulseAudio is the way to go for me. It worked great. Great app, it just solved for me the limitations of ALSA, in the view of the desktop end user.
I'm having some trouble now, with a bizarre configuration. First time I used PulseAudio, it detected my HDMI ATI sound device and my internal (onboard) hda_intel sound card, and it showed me various profiles for the internal soundcard (2.0, 2.1, 4.0, 5.1, digital only, analog input and output, analog/digital, etc), but now I can't use my mic, because the only selectable profile is "Digital Stereo Duplex (IEC958)". Of course it doesn't work, my only digital output or input is my hdmi tv hooked to my ATI card, my headphone is hooked up to my onboard card, but of course it's analog.

Strangely, PulseAudio detects, even in this digital mode, an analog output device for the onboard soundcard: Internal Audio. And, of course, Internal Audio Digital bla bla bla. But I can't set the correct profile to get the correct jack configuration to give me analog sound input again. That totally sucks. The worst thing is that it worked like a charm just after installing Pulse, without even rebooting or anything, and then... BAMM. No more mic...
Back to top
View user's profile Send private message
Spidey
Apprentice
Apprentice


Joined: 07 Sep 2006
Posts: 269

PostPosted: Thu Aug 04, 2011 3:06 pm    Post subject: Reply with quote

Ok, I've installed PulseAudio, really cool solution to the audio stack in linux, but I'm missing the online toggling functionality that I've got used to have in windows.
PulseAudio provide per source of audio output switching: you can route your media player to sink X, flash player to sink Y. Is there a widget for kde to easy this switching? Opening kmix and right clicking is tedious...
Back to top
View user's profile Send private message
Mgiese
Veteran
Veteran


Joined: 23 Mar 2005
Posts: 1607
Location: indiana

PostPosted: Fri Aug 12, 2011 1:41 pm    Post subject: Reply with quote

sirlark wrote:
To switch audio playback devices mid-playback you need pulse audio AFAIK. The default pulse audio mixer app has a simple dropdown to select vailable playback devices. If you really want to use pure ALSA, you wil have to modify the default device in ~/.asoundrc and restart the alsa service, and it won't work for applications already running.


can you tell me the command for that app ? thanks a lot

edit : found them myself "emerge -av pavucontrol paprefs", nice page btw http://en.gentoo-wiki.com/wiki/PulseAudio#USE_Flags
_________________
I do not have a Superman complex, for I am God not Superman :D

Ryzen9 7950x ; Geforce1650 ; kernel 6.5 ; XFCE
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