KDE – Easily Switch Between Audio Outputs in KDE 5

alsakdekubuntupulseaudiosound

I currently have KDE 5 Plasma installed which I like a lot.

However, it is not possible to easily switch between Audio outputs from One Soundcard (SPDIF and analog) like it was possible in Unity.

Is there a way to accomplish this without going to this menu here:

enter image description here

I need like one setting for each

  1. Digital Stereo + Analog Stereo Input
  2. Analog Audio Stero + Analog Stereo Input

I want to change them here:

enter image description here

Is it possible?

Best Answer

Thanks to this answer I finally found a solution, see the below instruction

Show always HDMI output in the mixed We will create a new profile that link both profiles "Analog audio" and "HDMI audio".

From my understanding this file /usr/share/pulseaudio/alsa-mixer/profile-sets/default.conf list all mapping profiles between Alsa and Pulseaudio.

1.
Find the mapping that are related to your Analog profile and HDMI profile definition. (description: should match the Device Profiles shown in Audio Volume Kde setting module )

For me are the following:

[Mapping analog-stereo]
device-strings = front:%f
channel-map = left,right
paths-output = analog-output analog-output-lineout analog-output-speaker analog-output-headphones analog-output-headphones-2
paths-input = analog-input-front-mic analog-input-rear-mic analog-input-internal-mic analog-input-dock-mic analog-input analog-input-mic analog-input-linein analog-input-aux analog-input-video analog-input-tvtuner analog-input-fm analog-input-mic-line analog-input-headphone-mic analog-input-headset-mic
priority = 10

[Mapping hdmi-stereo-extra1]
description = Digital Stereo (HDMI 2)
device-strings = hdmi:%f,1
paths-output = hdmi-output-1
channel-map = left,right
priority = 2
direction = output

2.
On the base of the above Mapping definition I have created the following new profile that group both the above ones:

[Profile output:analog-stereo+output:hdmi-stereo-extra1]
description = All
output-mappings = analog-stereo hdmi-stereo-extra1
input-mappings = analog-stereo

3.
Restart pulse audio with this command:

pulseaudio --kill; sleep 1; pulseaudio --start

4.
Go to KDE phonon settings > Audio Hardware setup and select the new profile. 2 profiles in the mixer

Now you should see both profile in the mixed and so you'll be able to switch easy:

HDMI is always shown in the mixer now
I would suggest to use this plasmoid mixer: https://store.kde.org/p/1100894/

(extra step) Force both output enabled

If you don't mind having both computer speaker and TV output audio in the same time ( so basically you don't have to switch the audio output ever ).

You can select the below setting and then you'll have a new entry in the mixer

enter image description here

Related Question