Thursday, May 2, 2024
 Popular · Latest · Hot · Upcoming
5
rated 0 times [  5] [ 0]  / answers: 1 / hits: 79764  / 2 Years ago, sun, august 28, 2022, 8:15:17

I wish to select a default sound card, or disable all others, in order to have the correct one selected after suspend.


More From » sound

 Answers
3

This is a way set default sound output card dynamically using PulseAudio (not ALSA).




  1. Check list of Sources and Sinks



    $ pactl list short sources
    0 alsa_output.pci-0000_00_1b.0.analog-stereo.monitor module-alsa-card.c s16le 2ch 44100Hz SUSPENDED
    1 alsa_input.pci-0000_00_1b.0.analog-stereo module-alsa-card.c s16le 2ch 44100Hz SUSPENDED
    2 combined.monitor module-combine-sink.c s16le 2ch 44100Hz SUSPENDED

    $ pactl list short sinks
    0 alsa_output.pci-0000_00_1b.0.analog-stereo module-alsa-card.c s16le 2ch 44100Hz RUNNING
    1 combined module-combine-sink.c s16le 2ch 44100Hz IDLE
    2 alsa_output.pci-0000_01_00.1.hdmi-stereo module-alsa-card.c s16le 2ch 44100Hz RUNNING

  2. Set defaults:



    $ pactl set-default-source alsa_input.pci-0000_00_1b.0.analog-stereo
    $ pactl set-default-sink alsa_output.pci-0000_00_1b.0.analog-stereo



It is possible even to set ports too. See How to switch sound output with key shortcut



Reference: man pactl


[#37601] Sunday, August 28, 2022, 2 Years  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
skaing

Total Points: 462
Total Questions: 124
Total Answers: 113

Location: Nauru
Member since Thu, Feb 2, 2023
1 Year ago
skaing questions
;