0

After the resolution of this question, I'm using the following script to alternate my computer sound-output through a keyboard shortcut

#!/bin/bash
sound_output=$(pacmd list-cards | grep "active")

if [[ $sound_output = *"analog-stereo"* ]]; then
  sound_output=hdmi-stereo
else
  sound_output=analog-stereo
fi

pactl set-card-profile 0 output:"$sound_output"
echo -e "PulseAudio sound server output set to $sound_output"

However, while I have a device wire-connected in headphone output port there's a third output option in system settings sound menu that also use an analog-stereo profile.

system settings sound menu

Which other strategy could I use to find out the available outputs options and circle through them?

artu-hnrq
  • 675
  • 1
  • 11
  • 31
  • 1
    What is the output of `pacmd list-cards`? – CL. Jan 05 '20 at 18:20
  • 1
    You want to change the port, not the profile. See [Change default port for PulseAudio (line out, not headphones)](https://unix.stackexchange.com/q/175930). – CL. Jan 06 '20 at 09:29

0 Answers0