You are not logged in.

#1 2021-03-19 04:11:28

bilabila
Member
Registered: 2018-08-07
Posts: 28
Website

pulseaudio how to mute one port from command line

Gui front-end like pavucontrol and Ncurses front-end PAmix support muting one port of output. However, I can't find any commandline method to achieve this. I need this to manually toggle my speaker port.

Offline

#2 2021-03-19 04:41:01

ponyrider
Member
Registered: 2014-11-18
Posts: 112

Re: pulseaudio how to mute one port from command line

find your device

pactl list short 

my line out is "1"

to mute

pactl set-sink-mute 1 1

to unmute

pactl set-sink-mute 1 0

Offline

#3 2021-03-19 04:59:22

bilabila
Member
Registered: 2018-08-07
Posts: 28
Website

Re: pulseaudio how to mute one port from command line

ponyrider wrote:

find your device

pactl list short 

my line out is "1"

to mute

pactl set-sink-mute 1 1

to unmute

pactl set-sink-mute 1 0

set-sink-mute can mute one sink, but not one port. My sink has two ports: headphone and speaker

Offline

#4 2021-03-19 07:58:51

V1del
Forum Moderator
Registered: 2012-10-16
Posts: 25,343

Re: pulseaudio how to mute one port from command line

A port defines a different sink, so that is the correct answer. Of course granted you've moved the active port relevantly with a

pactl set-sink-port $portnameaslistedin pactl list sinks

Offline

#5 2021-03-19 15:22:28

Mrhawkbox
Member
Registered: 2020-11-23
Posts: 63

Re: pulseaudio how to mute one port from command line

Not sure what you are trying to do but alsamixer is great cli as well. Just type alsamixer f6 for an other audio device.

Offline

#6 2021-03-19 15:25:10

Mrhawkbox
Member
Registered: 2020-11-23
Posts: 63

Re: pulseaudio how to mute one port from command line

bilabila wrote:
ponyrider wrote:

find your device

pactl list short 

my line out is "1"

to mute

pactl set-sink-mute 1 1

to unmute

pactl set-sink-mute 1 0

set-sink-mute can mute one sink, but not one port. My sink has two ports: headphone and speaker

Ahh your headphones and speakers at the same time. Alsamixer will work you can mute headphones or speakers or both of you want.

Offline

Board footer

Powered by FluxBB