You are not logged in.

#1 2020-05-26 16:04:50

apoorv569
Member
Registered: 2020-05-26
Posts: 15

[SOLVED] How to change audio source in linux (KDE Plasma)?

how do i change the audio source from rear port to front audio in linux? and also how do i adjust the left and right balance for speakers?

im using Arch Linux with KDE Plasma

something like this would be useful - Audio Source

i have already posted this exact thread on

Level1Tech's Forum

Destination Linux Forum

PulseAudio Gitlab

r/KDE

no luck so far if any can help, please

i have also tried to separate the sinks according to the arch wiki

according to archwiki i ran "pacmd list-sinks" command and got this output there were 2 sinks 1 was the GPU HDMI output which is not useful here the other one is -->

name: <alsa_output.pci-0000_00_1f.3.analog-stereo>
        driver: <module-alsa-card.c>
        flags: HARDWARE HW_MUTE_CTRL HW_VOLUME_CTRL DECIBEL_VOLUME LATENCY DYNAMIC_LATENCY
        state: SUSPENDED
        suspend cause: IDLE
        priority: 9039
        volume: front-left: 15823 /  24% / -37.03 dB,   front-right: 15823 /  24% / -37.03 dB
                balance 0.00
        base volume: 65536 / 100% / 0.00 dB
        volume steps: 65537
        muted: no
        current latency: 0.00 ms
        max request: 0 KiB
        max rewind: 0 KiB
        monitor source: 1
        sample spec: s16le 2ch 44100Hz
        channel map: front-left,front-right
                     Stereo
        used by: 0
        linked by: 0
        configured latency: 0.00 ms; range is 0.50 .. 2000.00 ms
        card: 1 <alsa_card.pci-0000_00_1f.3>
        module: 7
        properties:
                alsa.resolution_bits = "16"
                device.api = "alsa"
                device.class = "sound"
                alsa.class = "generic"
                alsa.subclass = "generic-mix"
                alsa.name = "ALC892 Analog"
                alsa.id = "ALC892 Analog"
                alsa.subdevice = "0"
                alsa.subdevice_name = "subdevice #0"
                alsa.device = "0"
                alsa.card = "0"
                alsa.card_name = "HDA Intel PCH"
                alsa.long_card_name = "HDA Intel PCH at 0xdf220000 irq 127"
                alsa.driver_name = "snd_hda_intel"
                device.bus_path = "pci-0000:00:1f.3"
                sysfs.path = "/devices/pci0000:00/0000:00:1f.3/sound/card0"
                device.bus = "pci"
                device.vendor.id = "8086"
                device.vendor.name = "Intel Corporation"
                device.product.id = "a170"
                device.product.name = "100 Series/C230 Series Chipset Family HD Audio Controller"
                device.form_factor = "internal"
                device.string = "front:0"
                device.buffering.buffer_size = "352800"
                device.buffering.fragment_size = "176400"
                device.access_mode = "mmap+timer"
                device.profile.name = "analog-stereo"
                device.profile.description = "Analog Stereo"
                device.description = "Built-in Audio Analog Stereo"
                alsa.mixer_name = "Realtek ALC892"
                alsa.components = "HDA:10ec0892,1462f972,00100302"
                module-udev-detect.discovered = "1"
                device.icon_name = "audio-card-pci"
        ports:
                analog-output-lineout: Line Out (priority 9000, latency offset 0 usec, available: yes)
                        properties:

                analog-output-headphones: Headphones (priority 9900, latency offset 0 usec, available: no)
                        properties:
                                device.icon_name = "audio-headphones"
        active port: <analog-output-lineout>

then according to wiki i added these lines in "/etc/pulse/default.pa"

load-module module-remap-sink sink_name=speakers sink_properties="device.description='Speakers'" remix=no master=alsa_output.pci-0000_00_1f.3.analog-stereo channels=2 master_channel_map=front-left,front-right channel_map=front-left,front-right

load-module module-remap-sink sink_name=headphones sink_properties="device.description='Headphones'" remix=no master=alsa_output.pci-0000_00_1f.3.analog-stereo channels=2 master_channel_map=rear-left,rear-right channel_map=front-left,front-right

then i got 2 sinks in the system tray widget after logging out and logging back in but none of those 2 sinks give any output nor speakers neither headphones

KDE Audio Widget

Last edited by apoorv569 (2020-06-08 10:07:19)

Offline

#2 2020-05-26 16:32:20

V1del
Forum Moderator
Registered: 2012-10-16
Posts: 10,003

Re: [SOLVED] How to change audio source in linux (KDE Plasma)?

This might be a driver toggle, if at all, what's your output for

amixer -c0

One thing you can try on pulse's side though it doesn't look like the hardware properly declares this availability is forcing it to the detected headphone port:

pacmd set-sink-port alsa_output.pci-0000_00_1f.3.analog-stereo analog-output-headphones

but I don't think that will suffice if you actually need a driver/hardware toggle.

As for adjusting the speaker seperately, you can either do via proper pactl/pacmd invocations or in pavucontrol you can toggle the lock icon at the end of a given stream to adjust the channels individually (I have faint memory that plasma-pa used to be able to do this as well but that doesn't seem to be the case anymore... You might want to opt for kmix instead of plasma-pa (though I'm not 100% whether it could do that anymore either))

Last edited by V1del (2020-05-26 16:43:00)

Offline

#3 2020-05-26 18:13:56

apoorv569
Member
Registered: 2020-05-26
Posts: 15

Re: [SOLVED] How to change audio source in linux (KDE Plasma)?

V1del wrote:

This might be a driver toggle, if at all, what's your output for

amixer -c0

One thing you can try on pulse's side though it doesn't look like the hardware properly declares this availability is forcing it to the detected headphone port:

pacmd set-sink-port alsa_output.pci-0000_00_1f.3.analog-stereo analog-output-headphones

but I don't think that will suffice if you actually need a driver/hardware toggle.

As for adjusting the speaker seperately, you can either do via proper pactl/pacmd invocations or in pavucontrol you can toggle the lock icon at the end of a given stream to adjust the channels individually (I have faint memory that plasma-pa used to be able to do this as well but that doesn't seem to be the case anymore... You might want to opt for kmix instead of plasma-pa (though I'm not 100% whether it could do that anymore either))

i tried amixer -c0 and i got this output

❯ amixer -c0
Simple mixer control 'Master',0
  Capabilities: pvolume pvolume-joined pswitch pswitch-joined
  Playback channels: Mono
  Limits: Playback 0 - 64
  Mono: Playback 34 [53%] [-30.00dB] [on]
Simple mixer control 'Headphone',0
  Capabilities: pvolume pswitch
  Playback channels: Front Left - Front Right
  Limits: Playback 0 - 64
  Mono:
  Front Left: Playback 0 [0%] [-64.00dB] [off]
  Front Right: Playback 0 [0%] [-64.00dB] [off]
Simple mixer control 'PCM',0
  Capabilities: pvolume
  Playback channels: Front Left - Front Right
  Limits: Playback 0 - 255
  Mono:
  Front Left: Playback 255 [100%] [0.00dB]
  Front Right: Playback 255 [100%] [0.00dB]
Simple mixer control 'Front',0
  Capabilities: pvolume pswitch
  Playback channels: Front Left - Front Right
  Limits: Playback 0 - 64
  Mono:
  Front Left: Playback 64 [100%] [0.00dB] [on]
  Front Right: Playback 64 [100%] [0.00dB] [on]
Simple mixer control 'Front Mic',0
  Capabilities: pvolume pswitch
  Playback channels: Front Left - Front Right
  Limits: Playback 0 - 31
  Mono:
  Front Left: Playback 0 [0%] [-34.50dB] [off]
  Front Right: Playback 0 [0%] [-34.50dB] [off]
Simple mixer control 'Front Mic Boost',0
  Capabilities: volume
  Playback channels: Front Left - Front Right
  Capture channels: Front Left - Front Right
  Limits: 0 - 3
  Front Left: 0 [0%] [0.00dB]
  Front Right: 0 [0%] [0.00dB]
Simple mixer control 'Surround',0
  Capabilities: pvolume pswitch
  Playback channels: Front Left - Front Right
  Limits: Playback 0 - 64
  Mono:
  Front Left: Playback 64 [100%] [0.00dB] [on]
  Front Right: Playback 64 [100%] [0.00dB] [on]
Simple mixer control 'Center',0
  Capabilities: pvolume pvolume-joined pswitch pswitch-joined
  Playback channels: Mono
  Limits: Playback 0 - 64
  Mono: Playback 64 [100%] [0.00dB] [on]
Simple mixer control 'LFE',0
  Capabilities: pvolume pvolume-joined pswitch pswitch-joined
  Playback channels: Mono
  Limits: Playback 0 - 64
  Mono: Playback 64 [100%] [0.00dB] [on]
Simple mixer control 'Line',0
  Capabilities: pvolume pswitch
  Playback channels: Front Left - Front Right
  Limits: Playback 0 - 31
  Mono:
  Front Left: Playback 0 [0%] [-34.50dB] [off]
  Front Right: Playback 0 [0%] [-34.50dB] [off]
Simple mixer control 'Line Boost',0
  Capabilities: volume
  Playback channels: Front Left - Front Right
  Capture channels: Front Left - Front Right
  Limits: 0 - 3
  Front Left: 0 [0%] [0.00dB]
  Front Right: 0 [0%] [0.00dB]
Simple mixer control 'IEC958',0
  Capabilities: pswitch pswitch-joined
  Playback channels: Mono
  Mono: Playback [off]
Simple mixer control 'IEC958 Default PCM',0
  Capabilities: pswitch pswitch-joined
  Playback channels: Mono
  Mono: Playback [on]
Simple mixer control 'Capture',0
  Capabilities: cvolume cswitch
  Capture channels: Front Left - Front Right
  Limits: Capture 0 - 46
  Front Left: Capture 28 [61%] [12.00dB] [on]
  Front Right: Capture 28 [61%] [12.00dB] [on]
Simple mixer control 'Capture',1
  Capabilities: cvolume cswitch
  Capture channels: Front Left - Front Right
  Limits: Capture 0 - 46
  Front Left: Capture 0 [0%] [-16.00dB] [off]
  Front Right: Capture 0 [0%] [-16.00dB] [off]
Simple mixer control 'Auto-Mute Mode',0
  Capabilities: enum
  Items: 'Disabled' 'Enabled'
  Item0: 'Enabled'
Simple mixer control 'Input Source',0
  Capabilities: cenum
  Items: 'Front Mic' 'Rear Mic' 'Line'
  Item0: 'Front Mic'
Simple mixer control 'Input Source',1
  Capabilities: cenum
  Items: 'Front Mic' 'Rear Mic' 'Line'
  Item0: 'Front Mic'
Simple mixer control 'Loopback Mixing',0
  Capabilities: enum
  Items: 'Disabled' 'Enabled'
  Item0: 'Disabled'
Simple mixer control 'Rear Mic',0
  Capabilities: pvolume pswitch
  Playback channels: Front Left - Front Right
  Limits: Playback 0 - 31
  Mono:
  Front Left: Playback 0 [0%] [-34.50dB] [off]
  Front Right: Playback 0 [0%] [-34.50dB] [off]
Simple mixer control 'Rear Mic Boost',0
  Capabilities: volume
  Playback channels: Front Left - Front Right
  Capture channels: Front Left - Front Right
  Limits: 0 - 3
  Front Left: 0 [0%] [0.00dB]
  Front Right: 0 [0%] [0.00dB]

and pacmd set-sink-port gave me this

❯ pacmd set-sink-port alsa_ouput.pci-0000_00_1f.3.analog-stereo analog-output-headphones
No sink found by this name or index.

Offline

#4 2020-05-26 20:46:21

apoorv569
Member
Registered: 2020-05-26
Posts: 15

Re: [SOLVED] How to change audio source in linux (KDE Plasma)?

i did some research on internet and found these 2 threads

Unix Stackexchange

according to this i tried running the command

pacmd list | grep "active port"                                                                        
        active port: <hdmi-output-1>
        active port: <analog-output-lineout>

then i ran

pacmd set-sink-port 0 analog-output-headphones                                                                    
Failed to set sink port to 'analog-output-headphones'.

so i tried 1 instead of 0

pacmd set-sink-port 1 analog-output-headphones

and i ran successfully and i got audio in headphones however the speakers still has output but i noticed something that it switched to HDMI GP106 and the volume of speakers lowered a bit. KDE Audio Widget

and switching back to

pacmd set-sink-port 1 analog-output-lineout

switched to Built-in Audio Analog Stereo and the volume of speakers raised a bit.

The other thread i found is Arch Linux Forum

according to i found about a tool called hdajackretast, although im not sure how to use this if anyone can help with this tool or weather is this tool is what i should be using for my problem.

Last edited by apoorv569 (2020-05-27 08:18:33)

Offline

#5 2020-05-29 20:48:36

apoorv569
Member
Registered: 2020-05-26
Posts: 15

Re: [SOLVED] How to change audio source in linux (KDE Plasma)?

wow absolutely no help, i have this thread 5 different places everywhere people stopped responding after a while no one asks me for some info or terminal output that i show or try to fix this. hmm

Offline

#6 2020-05-29 23:31:33

zpg443
Member
Registered: 2016-12-03
Posts: 84

Re: [SOLVED] How to change audio source in linux (KDE Plasma)?

If you have KDE, install PulseAudio Manager, pulseaudio-ctl from AUR

Offline

#7 2020-05-30 00:37:34

apoorv569
Member
Registered: 2020-05-26
Posts: 15

Re: [SOLVED] How to change audio source in linux (KDE Plasma)?

zpg443 wrote:

If you have KDE, install PulseAudio Manager, pulseaudio-ctl from AUR

how is this going to fix my issue its just some bunch of scripts that i can map to keybidings to control volume or mute unmute mic.

Offline

#8 2020-06-04 08:56:50

V1del
Forum Moderator
Registered: 2012-10-16
Posts: 10,003

Re: [SOLVED] How to change audio source in linux (KDE Plasma)?

I'm not sure I parse that last real post. Does changing the ports work or not (safe for not muting the speakers explicitly)? The approach if it does will be different than if it doesn't. If it doesn't you will indeed want to use hdajackretask. But how and what you can do here is hardware specific, but the utility is fairly safe in/with it's defaults but you have to look at the options you have available and try them out. You'll need to stop pulseaudio in order to apply hda jack overrides use

systemctl --user mask pulseaudio.{socket,service} --now #unmask to reenable pulse

to stop pulse and then check in what ways you can manipulate the detection.

Offline

#9 2020-06-04 09:47:13

apoorv569
Member
Registered: 2020-05-26
Posts: 15

Re: [SOLVED] How to change audio source in linux (KDE Plasma)?

V1del wrote:

I'm not sure I parse that last real post. Does changing the ports work or not (safe for not muting the speakers explicitly)? The approach if it does will be different than if it doesn't. If it doesn't you will indeed want to use hdajackretask. But how and what you can do here is hardware specific, but the utility is fairly safe in/with it's defaults but you have to look at the options you have available and try them out. You'll need to stop pulseaudio in order to apply hda jack overrides use

systemctl --user mask pulseaudio.{socket,service} --now #unmask to reenable pulse

to stop pulse and then check in what ways you can manipulate the detection.

you told me to run this command

❯ pacmd set-sink-port alsa_ouput.pci-0000_00_1f.3.analog-stereo analog-output-headphones

which gave me this output

No sink found by this name or index.

then i searched the internet for something useful and i found a thread Unix Stackexchange, where they were saying to run this command

pacmd list | grep "active port"                                                                        
        active port: <hdmi-output-1>
        active port: <analog-output-lineout>

then i ran

pacmd set-sink-port 0 analog-output-headphones                                                                    
Failed to set sink port to 'analog-output-headphones'.

so i tried 1 instead of 0

pacmd set-sink-port 1 analog-output-headphones

and i ran successfully and i got audio in headphones however the speakers still has output but i noticed something that the volume of speakers lowered a bit. (like from vol 100 to 80)

and switching back to

pacmd set-sink-port 1 analog-output-lineout

switched to Built-in Audio Analog Stereo and the volume of speakers raised back. ( like 80 to 100)

hope this explains.

the thing is when i open up alsamixer, and raise the headphone volume output next to master, when showing all outputs, i do get output in headphones but also in the speakers at the same time i have to lower the speakers volume to just have audio in headphones. so it works, i just need a way to be able to switch between the 2 so that the other output gets muted and my volume +/- button on the keyboard control that current output. you can ask for anything i will provide screenshots or output in terminal if required

and about the arch wiki way i tried it splitting front and rear i ran

pacmd list-sinks

and this output there were 2 sinks showing 1st one was HDMI GPU audio which is not useful here the other one is

        name: <alsa_output.pci-0000_00_1f.3.analog-stereo>
        driver: <module-alsa-card.c>
        flags: HARDWARE HW_MUTE_CTRL HW_VOLUME_CTRL DECIBEL_VOLUME LATENCY DYNAMIC_LATENCY
        state: SUSPENDED
        suspend cause: IDLE
        priority: 9039
        volume: front-left: 15823 /  24% / -37.03 dB,   front-right: 15823 /  24% / -37.03 dB
                balance 0.00
        base volume: 65536 / 100% / 0.00 dB
        volume steps: 65537
        muted: no
        current latency: 0.00 ms
        max request: 0 KiB
        max rewind: 0 KiB
        monitor source: 1
        sample spec: s16le 2ch 44100Hz
        channel map: front-left,front-right
                     Stereo
        used by: 0
        linked by: 0
        configured latency: 0.00 ms; range is 0.50 .. 2000.00 ms
        card: 1 <alsa_card.pci-0000_00_1f.3>
        module: 7
        properties:
                alsa.resolution_bits = "16"
                device.api = "alsa"
                device.class = "sound"
                alsa.class = "generic"
                alsa.subclass = "generic-mix"
                alsa.name = "ALC892 Analog"
                alsa.id = "ALC892 Analog"
                alsa.subdevice = "0"
                alsa.subdevice_name = "subdevice #0"
                alsa.device = "0"
                alsa.card = "0"
                alsa.card_name = "HDA Intel PCH"
                alsa.long_card_name = "HDA Intel PCH at 0xdf220000 irq 127"
                alsa.driver_name = "snd_hda_intel"
                device.bus_path = "pci-0000:00:1f.3"
                sysfs.path = "/devices/pci0000:00/0000:00:1f.3/sound/card0"
                device.bus = "pci"
                device.vendor.id = "8086"
                device.vendor.name = "Intel Corporation"
                device.product.id = "a170"
                device.product.name = "100 Series/C230 Series Chipset Family HD Audio Controller"
                device.form_factor = "internal"
                device.string = "front:0"
                device.buffering.buffer_size = "352800"
                device.buffering.fragment_size = "176400"
                device.access_mode = "mmap+timer"
                device.profile.name = "analog-stereo"
                device.profile.description = "Analog Stereo"
                device.description = "Built-in Audio Analog Stereo"
                alsa.mixer_name = "Realtek ALC892"
                alsa.components = "HDA:10ec0892,1462f972,00100302"
                module-udev-detect.discovered = "1"
                device.icon_name = "audio-card-pci"
        ports:
                analog-output-lineout: Line Out (priority 9000, latency offset 0 usec, available: yes)
                        properties:

                analog-output-headphones: Headphones (priority 9900, latency offset 0 usec, available: no)
                        properties:
                                device.icon_name = "audio-headphones"
        active port: <analog-output-lineout>

then according to wiki i added these lines in

"/etc/pulse/default.pa"
load-module module-remap-sink sink_name=speakers sink_properties="device.description='Speakers'" remix=no master=alsa_output.pci-0000_00_1f.3.analog-stereo channels=2 master_channel_map=front-left,front-right channel_map=front-left,front-right

load-module module-remap-sink sink_name=headphones sink_properties="device.description='Headphones'" remix=no master=alsa_output.pci-0000_00_1f.3.analog-stereo channels=2 master_channel_map=rear-left,rear-right channel_map=front-left,front-right

then i got 2 sinks in the system tray widget after logging out and logging back in but none of those 2 sinks give any output nor speakers neither headphones

KDE Audio Widget

Last edited by apoorv569 (2020-06-04 10:00:28)

Offline

#10 2020-06-07 05:18:43

apoorv569
Member
Registered: 2020-05-26
Posts: 15

Re: [SOLVED] How to change audio source in linux (KDE Plasma)?

on Level1Techs Forum someone told me about this LinuxMint's Forum where he edited this file

/usr/share/pulseaudio/alsa-mixer/paths/analog-output-headphones.conf

and changed

[Element Front]
switch = mute
volume = zero

to

[Element Front]
switch = off
volume = zero

which solved half of my problem, which was whenever i switch to headphones using the pacmd set-sink command i used to get audio in both speakers and headphones at the same time. now by editing the "analog-output-headphones.conf" whenever i switch to headphones it mutes the other output (i.e Speakers) and vice versa. so 1 problem solved. as from the terminal i can switch between the 2 ports from terminal just fine by these commands

pacmd set-sink-port 1 analog-output-lineout

or this

pacmd set-sink-port 1 analog-output-headphones

and as i have also added these 2 lines in

"/etc/pulse/default.pa"
load-module module-remap-sink sink_name=speakers sink_properties="device.description='Speakers'" remix=no master=alsa_output.pci-0000_00_1f.3.analog-stereo channels=2 master_channel_map=front-left,front-right channel_map=front-left,front-right

load-module module-remap-sink sink_name=headphones sink_properties="device.description='Headphones'" remix=no master=alsa_output.pci-0000_00_1f.3.analog-stereo channels=2 master_channel_map=rear-left,rear-right channel_map=front-left,front-right

is there a way to specify these 2 sinks that i created by adding these lines, to control a specific port

like

Speakers controls = pacmd set-sink-port 1 analog-output-lineout

Headphones controls = pacmd set-sink-port 1 analog-output-headphones

Offline

#11 2020-06-07 10:52:35

V1del
Forum Moderator
Registered: 2012-10-16
Posts: 10,003

Re: [SOLVED] How to change audio source in linux (KDE Plasma)?

I highly doubt that you can have your cake and eat it too. If your hardware is mapped in such a way that it plays everything through the speaker port regardless you won't be able to have a logical split where this doesn't happen. And in that way you must have them be seperate from each other because they directly conflict. You can't have a headphone sink active at the same time as the speaker sink as the headphone sink has to mute your hardware's speaker control.

The only way you can have this from what we see so far is check with hdajackretask whether there's a way to decouple the headphone port from the speaker out completely. If you can't do that on a driver/hardware level you cannot enforce that via pulseaudio.

Edit: So I read some of the other threads, if your entire end goal is just switching between these two port options via GUI, you can do so in pavucontrol, or follow the last advice on the level1tech forum for marking the headphone as available unconditionally, if it is marked as available that should make plasma-pa show a dropdown to switch between the ports. But yes remap-sink is the wrong approach/solution here.

Maybe with all those edits in place repost

pacmd list-cards
pacmd list-sinks

Last edited by V1del (2020-06-07 11:41:38)

Offline

#12 2020-06-07 19:49:13

apoorv569
Member
Registered: 2020-05-26
Posts: 15

Re: [SOLVED] How to change audio source in linux (KDE Plasma)?

V1del wrote:

I highly doubt that you can have your cake and eat it too. If your hardware is mapped in such a way that it plays everything through the speaker port regardless you won't be able to have a logical split where this doesn't happen. And in that way you must have them be seperate from each other because they directly conflict. You can't have a headphone sink active at the same time as the speaker sink as the headphone sink has to mute your hardware's speaker control.

The only way you can have this from what we see so far is check with hdajackretask whether there's a way to decouple the headphone port from the speaker out completely. If you can't do that on a driver/hardware level you cannot enforce that via pulseaudio.

Edit: So I read some of the other threads, if your entire end goal is just switching between these two port options via GUI, you can do so in pavucontrol, or follow the last advice on the level1tech forum for marking the headphone as available unconditionally, if it is marked as available that should make plasma-pa show a dropdown to switch between the ports. But yes remap-sink is the wrong approach/solution here.

Maybe with all those edits in place repost

pacmd list-cards
pacmd list-sinks

in the last post i already told you i was able to edit this file

/usr/share/pulseaudio/alsa-mixer/paths/analog-output-headphones.conf

which allowed me to mute the other output for example i switch to headphones it mutes the other output (i.e Speakers) and vice versa. and as from the terminal i can switch between the 2 ports from terminal just fine by these commands

pacmd set-sink-port 1 analog-output-lineout

or this

pacmd set-sink-port 1 analog-output-headphones

there should be a way to control both sinks in the lines i added in

"/etc/pulse/default.pa"

or somewhere else

I DONT WANT THEM OUTPUTTING AT THE SAME TIME.

im able to switch between the 2 in Windows 10 just fine. so it should be that my hardware is not mapped in that way.

please try to read the thread before answering. i have said this 3 times.

-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

pacmd list-cards
pacmd list-cards                                                                                                      ✔ 
2 card(s) available.
    index: 0
        name: <alsa_card.pci-0000_01_00.1>
        driver: <module-alsa-card.c>
        owner module: 6
        properties:
                alsa.card = "1"
                alsa.card_name = "HDA NVidia"
                alsa.long_card_name = "HDA NVidia at 0xdf080000 irq 17"
                alsa.driver_name = "snd_hda_intel"
                device.bus_path = "pci-0000:01:00.1"
                sysfs.path = "/devices/pci0000:00/0000:00:01.0/0000:01:00.1/sound/card1"
                device.bus = "pci"
                device.vendor.id = "10de"
                device.vendor.name = "NVIDIA Corporation"
                device.product.id = "10f1"
                device.product.name = "GP106 High Definition Audio Controller"
                device.string = "1"
                device.description = "GP106 High Definition Audio Controller"
                module-udev-detect.discovered = "1"
                device.icon_name = "audio-card-pci"
        profiles:
                output:hdmi-stereo: Digital Stereo (HDMI) Output (priority 5900, available: no)
                output:hdmi-surround: Digital Surround 5.1 (HDMI) Output (priority 800, available: no)
                output:hdmi-surround71: Digital Surround 7.1 (HDMI) Output (priority 800, available: no)
                output:hdmi-stereo-extra1: Digital Stereo (HDMI 2) Output (priority 5700, available: unknown)
                output:hdmi-surround-extra1: Digital Surround 5.1 (HDMI 2) Output (priority 600, available: unknown)
                output:hdmi-surround71-extra1: Digital Surround 7.1 (HDMI 2) Output (priority 600, available: unknown)
                output:hdmi-stereo-extra2: Digital Stereo (HDMI 3) Output (priority 5700, available: no)
                output:hdmi-surround-extra2: Digital Surround 5.1 (HDMI 3) Output (priority 600, available: no)
                output:hdmi-surround71-extra2: Digital Surround 7.1 (HDMI 3) Output (priority 600, available: no)
                output:hdmi-stereo-extra3: Digital Stereo (HDMI 4) Output (priority 5700, available: no)
                output:hdmi-surround-extra3: Digital Surround 5.1 (HDMI 4) Output (priority 600, available: no)
                output:hdmi-surround71-extra3: Digital Surround 7.1 (HDMI 4) Output (priority 600, available: no)
                output:hdmi-stereo-extra4: Digital Stereo (HDMI 5) Output (priority 5700, available: no)
                output:hdmi-surround-extra4: Digital Surround 5.1 (HDMI 5) Output (priority 600, available: no)
                output:hdmi-surround71-extra4: Digital Surround 7.1 (HDMI 5) Output (priority 600, available: no)
                output:hdmi-stereo-extra5: Digital Stereo (HDMI 6) Output (priority 5700, available: no)
                output:hdmi-surround-extra5: Digital Surround 5.1 (HDMI 6) Output (priority 600, available: no)
                output:hdmi-surround71-extra5: Digital Surround 7.1 (HDMI 6) Output (priority 600, available: no)
                output:hdmi-stereo-extra6: Digital Stereo (HDMI 7) Output (priority 5700, available: no)
                output:hdmi-surround-extra6: Digital Surround 5.1 (HDMI 7) Output (priority 600, available: no)
                output:hdmi-surround71-extra6: Digital Surround 7.1 (HDMI 7) Output (priority 600, available: no)
                off: Off (priority 0, available: unknown)
        active profile: <output:hdmi-stereo-extra1>
        sinks:
                alsa_output.pci-0000_01_00.1.hdmi-stereo-extra1/#0: GP106 High Definition Audio Controller Digital Stereo (HDMI 2)
        sources:
                alsa_output.pci-0000_01_00.1.hdmi-stereo-extra1.monitor/#0: Monitor of GP106 High Definition Audio Controller Digital Stereo (HDMI 2)
        ports:
                hdmi-output-0: HDMI / DisplayPort (priority 5900, latency offset 0 usec, available: no)
                        properties:
                                device.icon_name = "video-display"
                hdmi-output-1: HDMI / DisplayPort 2 (priority 5800, latency offset 0 usec, available: yes)
                        properties:
                                device.icon_name = "video-display"
                                device.product.name = "HP LE1901w
  "
                hdmi-output-2: HDMI / DisplayPort 3 (priority 5700, latency offset 0 usec, available: no)
                        properties:
                                device.icon_name = "video-display"
                hdmi-output-3: HDMI / DisplayPort 4 (priority 5600, latency offset 0 usec, available: no)
                        properties:
                                device.icon_name = "video-display"
                hdmi-output-4: HDMI / DisplayPort 5 (priority 5500, latency offset 0 usec, available: no)
                        properties:
                                device.icon_name = "video-display"
                hdmi-output-5: HDMI / DisplayPort 6 (priority 5400, latency offset 0 usec, available: no)
                        properties:
                                device.icon_name = "video-display"
                hdmi-output-6: HDMI / DisplayPort 7 (priority 5300, latency offset 0 usec, available: no)
                        properties:
                                device.icon_name = "video-display"
    index: 1
        name: <alsa_card.pci-0000_00_1f.3>
        driver: <module-alsa-card.c>
        owner module: 7
        properties:
                alsa.card = "0"
                alsa.card_name = "HDA Intel PCH"
                alsa.long_card_name = "HDA Intel PCH at 0xdf220000 irq 127"
                alsa.driver_name = "snd_hda_intel"
                device.bus_path = "pci-0000:00:1f.3"
                sysfs.path = "/devices/pci0000:00/0000:00:1f.3/sound/card0"
                device.bus = "pci"
                device.vendor.id = "8086"
                device.vendor.name = "Intel Corporation"
                device.product.id = "a170"
                device.product.name = "100 Series/C230 Series Chipset Family HD Audio Controller"
                device.form_factor = "internal"
                device.string = "0"
                device.description = "Built-in Audio"
                module-udev-detect.discovered = "1"
                device.icon_name = "audio-card-pci"
        profiles:
                input:analog-stereo: Analog Stereo Input (priority 65, available: no)
                output:analog-stereo: Analog Stereo Output (priority 6500, available: unknown)
                output:analog-stereo+input:analog-stereo: Analog Stereo Duplex (priority 6565, available: no)
                output:analog-surround-21: Analog Surround 2.1 Output (priority 1300, available: unknown)
                output:analog-surround-21+input:analog-stereo: Analog Surround 2.1 Output + Analog Stereo Input (priority 1365, available: no)
                output:analog-surround-40: Analog Surround 4.0 Output (priority 1200, available: unknown)
                output:analog-surround-40+input:analog-stereo: Analog Surround 4.0 Output + Analog Stereo Input (priority 1265, available: no)
                output:analog-surround-41: Analog Surround 4.1 Output (priority 1300, available: unknown)
                output:analog-surround-41+input:analog-stereo: Analog Surround 4.1 Output + Analog Stereo Input (priority 1365, available: no)
                output:analog-surround-50: Analog Surround 5.0 Output (priority 1200, available: unknown)
                output:analog-surround-50+input:analog-stereo: Analog Surround 5.0 Output + Analog Stereo Input (priority 1265, available: no)
                output:analog-surround-51: Analog Surround 5.1 Output (priority 1300, available: unknown)
                output:analog-surround-51+input:analog-stereo: Analog Surround 5.1 Output + Analog Stereo Input (priority 1365, available: no)
                output:iec958-stereo: Digital Stereo (IEC958) Output (priority 5500, available: unknown)
                output:iec958-stereo+input:analog-stereo: Digital Stereo (IEC958) Output + Analog Stereo Input (priority 5565, available: no)
                off: Off (priority 0, available: unknown)
        active profile: <output:analog-stereo>
        sinks:
                alsa_output.pci-0000_00_1f.3.analog-stereo/#1: Built-in Audio Analog Stereo
        sources:
                alsa_output.pci-0000_00_1f.3.analog-stereo.monitor/#1: Monitor of Built-in Audio Analog Stereo
        ports:
                analog-input-front-mic: Front Microphone (priority 8500, latency offset 0 usec, available: no)
                        properties:
                                device.icon_name = "audio-input-microphone"
                analog-input-rear-mic: Rear Microphone (priority 8200, latency offset 0 usec, available: no)
                        properties:
                                device.icon_name = "audio-input-microphone"
                analog-input-linein: Line In (priority 8100, latency offset 0 usec, available: no)
                        properties:

                analog-output-lineout: Line Out (priority 9000, latency offset 0 usec, available: yes)
                        properties:

                analog-output-headphones: Headphones (priority 9900, latency offset 0 usec, available: no)
                        properties:
                                device.icon_name = "audio-headphones"
                iec958-stereo-output: Digital Output (S/PDIF) (priority 0, latency offset 0 usec, available: unknown)
                        properties:
pacmd list-sinks
pacmd list-sinks                                                                                                      ✔ 
4 sink(s) available.
    index: 0
        name: <alsa_output.pci-0000_01_00.1.hdmi-stereo-extra1>
        driver: <module-alsa-card.c>
        flags: HARDWARE DECIBEL_VOLUME LATENCY FLAT_VOLUME DYNAMIC_LATENCY
        state: SUSPENDED
        suspend cause: IDLE
        priority: 9030
        volume: front-left: 65536 / 100% / 0.00 dB,   front-right: 65536 / 100% / 0.00 dB
                balance 0.00
        base volume: 65536 / 100% / 0.00 dB
        volume steps: 65537
        muted: no
        current latency: 0.00 ms
        max request: 0 KiB
        max rewind: 0 KiB
        monitor source: 0
        sample spec: s32le 2ch 44100Hz
        channel map: front-left,front-right
                     Stereo
        used by: 0
        linked by: 0
        configured latency: 0.00 ms; range is 0.50 .. 4000.36 ms
        card: 0 <alsa_card.pci-0000_01_00.1>
        module: 6
        properties:
                alsa.resolution_bits = "32"
                device.api = "alsa"
                device.class = "sound"
                alsa.class = "generic"
                alsa.subclass = "generic-mix"
                alsa.name = "HDMI 1"
                alsa.id = "HDMI 1"
                alsa.subdevice = "0"
                alsa.subdevice_name = "subdevice #0"
                alsa.device = "7"
                alsa.card = "1"
                alsa.card_name = "HDA NVidia"
                alsa.long_card_name = "HDA NVidia at 0xdf080000 irq 17"
                alsa.driver_name = "snd_hda_intel"
                device.bus_path = "pci-0000:01:00.1"
                sysfs.path = "/devices/pci0000:00/0000:00:01.0/0000:01:00.1/sound/card1"
                device.bus = "pci"
                device.vendor.id = "10de"
                device.vendor.name = "NVIDIA Corporation"
                device.product.id = "10f1"
                device.product.name = "GP106 High Definition Audio Controller"
                device.string = "hdmi:1,1"
                device.buffering.buffer_size = "1411328"
                device.buffering.fragment_size = "705664"
                device.access_mode = "mmap+timer"
                device.profile.name = "hdmi-stereo-extra1"
                device.profile.description = "Digital Stereo (HDMI 2)"
                device.description = "GP106 High Definition Audio Controller Digital Stereo (HDMI 2)"
                alsa.mixer_name = "Nvidia GPU 84 HDMI/DP"
                alsa.components = "HDA:10de0084,104385ed,00100100"
                module-udev-detect.discovered = "1"
                device.icon_name = "audio-card-pci"
        ports:
                hdmi-output-1: HDMI / DisplayPort 2 (priority 5800, latency offset 0 usec, available: yes)
                        properties:
                                device.icon_name = "video-display"
                                device.product.name = "HP LE1901w
  "
        active port: <hdmi-output-1>
  * index: 1
        name: <alsa_output.pci-0000_00_1f.3.analog-stereo>
        driver: <module-alsa-card.c>
        flags: HARDWARE HW_MUTE_CTRL HW_VOLUME_CTRL DECIBEL_VOLUME LATENCY FLAT_VOLUME DYNAMIC_LATENCY
        state: SUSPENDED
        suspend cause: IDLE
        priority: 9039
        volume: front-left: 0 /   0% / -inf dB,   front-right: 0 /   0% / -inf dB
                balance 0.00
        base volume: 65536 / 100% / 0.00 dB
        volume steps: 65537
        muted: yes
        current latency: 0.00 ms
        max request: 0 KiB
        max rewind: 0 KiB
        monitor source: 1
        sample spec: s32le 2ch 44100Hz
        channel map: front-left,front-right
                     Stereo
        used by: 0
        linked by: 2
        configured latency: 0.00 ms; range is 0.50 .. 2000.00 ms
        card: 1 <alsa_card.pci-0000_00_1f.3>
        module: 7
        properties:
                alsa.resolution_bits = "32"
                device.api = "alsa"
                device.class = "sound"
                alsa.class = "generic"
                alsa.subclass = "generic-mix"
                alsa.name = "ALC892 Analog"
                alsa.id = "ALC892 Analog"
                alsa.subdevice = "0"
                alsa.subdevice_name = "subdevice #0"
                alsa.device = "0"
                alsa.card = "0"
                alsa.card_name = "HDA Intel PCH"
                alsa.long_card_name = "HDA Intel PCH at 0xdf220000 irq 127"
                alsa.driver_name = "snd_hda_intel"
                device.bus_path = "pci-0000:00:1f.3"
                sysfs.path = "/devices/pci0000:00/0000:00:1f.3/sound/card0"
                device.bus = "pci"
                device.vendor.id = "8086"
                device.vendor.name = "Intel Corporation"
                device.product.id = "a170"
                device.product.name = "100 Series/C230 Series Chipset Family HD Audio Controller"
                device.form_factor = "internal"
                device.string = "front:0"
                device.buffering.buffer_size = "705600"
                device.buffering.fragment_size = "352800"
                device.access_mode = "mmap+timer"
                device.profile.name = "analog-stereo"
                device.profile.description = "Analog Stereo"
                device.description = "Built-in Audio Analog Stereo"
                alsa.mixer_name = "Realtek ALC892"
                alsa.components = "HDA:10ec0892,1462f972,00100302"
                module-udev-detect.discovered = "1"
                device.icon_name = "audio-card-pci"
        ports:
                analog-output-lineout: Line Out (priority 9000, latency offset 0 usec, available: yes)
                        properties:

                analog-output-headphones: Headphones (priority 9900, latency offset 0 usec, available: no)
                        properties:
                                device.icon_name = "audio-headphones"
        active port: <analog-output-lineout>
    index: 2
        name: <speakers>
        driver: <module-remap-sink.c>
        flags: DECIBEL_VOLUME LATENCY FLAT_VOLUME DYNAMIC_LATENCY
        state: SUSPENDED
        suspend cause: IDLE
        priority: 1000
        volume: front-left: 65536 / 100% / 0.00 dB,   front-right: 65536 / 100% / 0.00 dB
                balance 0.00
        base volume: 65536 / 100% / 0.00 dB
        volume steps: 65537
        muted: no
        current latency: 0.00 ms
        max request: 0 KiB
        max rewind: 0 KiB
        monitor source: 2
        sample spec: s32le 2ch 44100Hz
        channel map: front-left,front-right
                     Stereo
        used by: 0
        linked by: 0
        configured latency: 0.00 ms; range is 0.50 .. 2000.00 ms
        module: 26
        properties:
                device.master_device = "alsa_output.pci-0000_00_1f.3.analog-stereo"
                device.class = "filter"
                device.description = "Speakers"
                device.icon_name = "audio-card"
    index: 3
        name: <headphones>
        driver: <module-remap-sink.c>
        flags: DECIBEL_VOLUME LATENCY FLAT_VOLUME DYNAMIC_LATENCY
        state: SUSPENDED
        suspend cause: IDLE
        priority: 1000
        volume: front-left: 65536 / 100% / 0.00 dB,   front-right: 65536 / 100% / 0.00 dB
                balance 0.00
        base volume: 65536 / 100% / 0.00 dB
        volume steps: 65537
        muted: no
        current latency: 0.00 ms
        max request: 0 KiB
        max rewind: 0 KiB
        monitor source: 3
        sample spec: s32le 2ch 44100Hz
        channel map: front-left,front-right
                     Stereo
        used by: 0
        linked by: 0
        configured latency: 0.00 ms; range is 0.50 .. 2000.00 ms
        module: 27
        properties:
                device.master_device = "alsa_output.pci-0000_00_1f.3.analog-stereo"
                device.class = "filter"
                device.description = "Headphones"
                device.icon_name = "audio-card"

this has 2 extra sinks as i have created 2 sinks for speakers and headphones as i have mentioned many times above by editing

/etc/pulse/default.pa 

Last edited by apoorv569 (2020-06-07 20:03:16)

Offline

#13 2020-06-08 07:22:19

V1del
Forum Moderator
Registered: 2012-10-16
Posts: 10,003

Re: [SOLVED] How to change audio source in linux (KDE Plasma)?

Again remap sinks are the wrong thing here (they "might" incidentally work but for that you'd have to switch the profile to analog-surround-40 and apply the remap sink on that). You can't have two sinks for this as that would be a conflict. What you want is a port switch which switches the active sink between the headphone and the speaker sink (one sink, different jacks) exclusively. We've already solved the port switch side. The problem right now is that pulse does not register a headphone as present, so most guis will only show you the one that is marked as present.

Did you try the

[Jack Front Headphone]
required-any = any
state.plugged = yes
state.unplugged = unknown

suggestion from Velen?

To summarize, at the current state, your end goal is to turn this line

                analog-output-headphones: Headphones (priority 9900, latency offset 0 usec, available: no)

into

                analog-output-headphones: Headphones (priority 9900, latency offset 0 usec, available: yes)

regardless of what the hardware reports.

I still think you should give hdajackretask a shot here, you should be able to enforce a configuration that marks the headphone jack as present unconditionally.

Offline

#14 2020-06-08 08:53:16

apoorv569
Member
Registered: 2020-05-26
Posts: 15

Re: [SOLVED] How to change audio source in linux (KDE Plasma)?

V1del wrote:

Again remap sinks are the wrong thing here (they "might" incidentally work but for that you'd have to switch the profile to analog-surround-40 and apply the remap sink on that). You can't have two sinks for this as that would be a conflict. What you want is a port switch which switches the active sink between the headphone and the speaker sink (one sink, different jacks) exclusively. We've already solved the port switch side. The problem right now is that pulse does not register a headphone as present, so most guis will only show you the one that is marked as present.

Did you try the

[Jack Front Headphone]
required-any = any
state.plugged = yes
state.unplugged = unknown

suggestion from Velen?

To summarize, at the current state, your end goal is to turn this line

                analog-output-headphones: Headphones (priority 9900, latency offset 0 usec, available: no)

into

                analog-output-headphones: Headphones (priority 9900, latency offset 0 usec, available: yes)

regardless of what the hardware reports.

I still think you should give hdajackretask a shot here, you should be able to enforce a configuration that marks the headphone jack as present unconditionally.

yes, finally its working now thank you for bearing with me big_smile
omg finally big_smile

THIS IS THE SOLUTION

[Jack Front Headphone]
required-any = any
state.plugged = yes
state.unplugged = unknown

i now have a drop down menu with the option to switch to headphones.

Last edited by apoorv569 (2020-06-08 08:56:05)

Offline

#15 2020-06-08 10:02:24

V1del
Forum Moderator
Registered: 2012-10-16
Posts: 10,003

Re: [SOLVED] How to change audio source in linux (KDE Plasma)?

Glad to hear please mark as [SOLVED] by editing the subject in your first post.

As a heads-up if you really did change these files in line, they might get overridden on pulseaudio updates.  You could add them to a pacman's NoExtract= line, or properly split them out into seperate files (that does require some potentially finicky additional configuration via udev rules).

Offline

#16 2020-06-08 10:06:52

apoorv569
Member
Registered: 2020-05-26
Posts: 15

Re: [SOLVED] How to change audio source in linux (KDE Plasma)?

V1del wrote:

Glad to hear please mark as [SOLVED] by editing the subject in your first post.

As a heads-up if you really did change these files in line, they might get overridden on pulseaudio updates.  You could add them to a pacman's NoExtract= line, or properly split them out into seperate files (that does require some potentially finicky additional configuration via udev rules).

i have no idea how to do any of this. can tell me the steps to do so.

Offline

#17 2020-06-08 10:09:08

V1del
Forum Moderator
Registered: 2012-10-16
Posts: 10,003

Re: [SOLVED] How to change audio source in linux (KDE Plasma)?

https://wiki.archlinux.org/index.php/Pa … g_upgraded add these config files you've adjusted to that directive, double check eventually resulting .pacnews whether they've added something you should carry over or not. But pulseaudio has a comparatively low update frequency so this won't be that relevant that often.

Last edited by V1del (2020-06-08 10:10:17)

Offline

#18 2020-06-08 10:35:15

apoorv569
Member
Registered: 2020-05-26
Posts: 15

Re: [SOLVED] How to change audio source in linux (KDE Plasma)?

V1del wrote:

https://wiki.archlinux.org/index.php/Pa … g_upgraded add these config files you've adjusted to that directive, double check eventually resulting .pacnews whether they've added something you should carry over or not. But pulseaudio has a comparatively low update frequency so this won't be that relevant that often.

well in that case i guess i can re-edit the file its just a couple or words only. thanks anyway big_smile

Last edited by apoorv569 (2020-06-08 10:35:32)

Offline

Board footer

Powered by FluxBB