Hey guys, I ve been using elementary (luna) os distribution of linux and I am really satisfied with it .. the only problem that i am facing is when switching between application sounds .. I ll give you an example:
Using my headphones to speak on teamspeak and listen to music. Suddenly I decide that I want my music to be played through my loudspeakers(for example) and when I select that sound will be played through loudspeakers, teamspeaks's sound gets "forced" played through there as well until I go to teamspeak and set the settings again(where it still shows that my headseats are communication device). Any suggestions on this 1?

Dani AI

Generated

Short answer: this is PulseAudio doing per-application routing — an app usually opens its stream on one sink and keeps using it until you move it or restart the app. and were right to look at PulseAudio; by default changing the system "default" output does not automatically reassign every already-open stream. (freedesktop.org)

Quick fix you can do right now: install PulseAudio Volume Control and move the Teamspeak stream to the correct sink, or use the pactl command-line to move it. Example commands (Debian/Ubuntu-based systems):

sudo apt-get update
sudo apt-get install pavucontrol
pavucontrol &

Open the Playback tab in pavucontrol and pick Teamspeak’s stream and set its output to Speakers or Headphones. To do it on the command line:

pactl list short sinks
pactl list short sink-inputs
pactl move-sink-input <INPUT_ID> <SINK_ID>

See the pactl documentation for details. (wiki.ubuntu.com)

If you want switching to behave differently (so apps follow the new default), change PulseAudio behavior: either stop the aggressive auto-switching module or tell stream-restore not to lock streams to previously used devices. Edit your PulseAudio startup (usually /etc/pulse/default.pa or ~/.config/pulse/default.pa) and try one of these safe edits:

# disable aggressive auto-switch
# (comment out) load-module module-switch-on-connect

# or make streams follow default device
load-module module-stream-restore restore_device=false

Then restart PulseAudio (pulseaudio -k && pulseaudio --start or systemctl --user restart pulseaudio.service). The module docs explain the tradeoffs. (freedesktop.org)

Extra notes: check Teamspeak’s own audio backend setting (use PulseAudio or “Default” so pavucontrol/pactl can see its stream). If headphones and speakers are different “ports” on the same card, pavucontrol’s Output Devices -> Port can be the simplest place to switch. If problems persist, saving and then removing PulseAudio’s stream-restore DB (or toggling restore_device) can clear stale mappings.

Recommended Answers

All 2 Replies

Unfortunatly I'm not familiar with the innards of Luna. Furthermore, I beleive this has to do with your hardware setup as well (specifically, how your DAC(s) are set up). Maybe you can try to install gnome-alsamixer (I'm not sure if that's lunas default or not), or see whats in the software center for PulseAudio.

If you don't get a reasonable answer here, check out the ElementaryOs's answers section.

Member Avatar for Member #46692

I'm using elementary, but I agree sounds like a pulseaudio issue. I had a similar problem and pulseaudio fixed it.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.