title: Pulseaudio set/check default source
body: <p>So the <strong>question</strong> is,</p>
  
  <ol>
  <li>How can I set the default source?</li>
  <li>How can I list the current default source?</li>
  </ol>
  
  <p><strong>Details</strong></p>
  
  <p>I have 4 sound input sources on my linux device. Here is the result of <code>pactl list sources</code>:</p>
  
  <pre><code>1   alsa_input.pci-0000_00_1b.0.analog-stereo   module-alsa-card.c  s16le 2ch 44100Hz SUSPENDED
  2   alsa_input.usb-Generic_Rmoncam_HD_720P_200901010001-02.analog-stereo    module-alsa-card.c  s16le 2ch 48000Hz   SUSPENDED
  3   alsa_input.usb-Generic_Rmoncam_HD_720P_200901010001-02.analog-stereo.2  module-alsa-card.c  s16le 2ch 48000Hz   SUSPENDED
  5   alsa_output.pci-0000_00_1b.0.hdmi-stereo.monitor    module-alsa-card.c  s16le 2ch 44100Hz   SUSPENDED
  </code></pre>
  
  <p>I tried to set the source <em>1 alsa_input.pci-0000_00_1b.0.analog-stereo</em> as my default source by several ways:</p>
  
  <p>1.change /etc/pulse/client.conf, add following lines:</p>
  
  <pre><code>default-sink = alsa_output.pci-0000_00_1b.0.hdmi-stereo
  
  default-source = alsa_input.pci-0000_00_1b.0.analog-stereo
  </code></pre>
  
  <p>2.change /etc/pulse/default.pa, add following lines:</p>
  
  <pre><code>### Make some devices default
  set-default-source alsa_input.pci-0000_00_1b.0.analog-stereo
  </code></pre>
  
  <p>After configuration complete, I tried <code>pulseaudio -D</code> and reboot the device, but the config take no effect. I don't know how to list the current default source and sink, so I use following command to verify:</p>
  
  <pre><code>$&gt; pactl load-module module-loopback latency_msec=500
  $&gt; pactl list sources short | grep RUNNING
     3    alsa_input.usb-Generic_Rmoncam_HD_720P_200901010001-02.analog-stereo.2  module-alsa-card.c  s16le 2ch 48000Hz   RUNNING
  </code></pre>
  
  <p>The <code>pactl</code> still use my usb camera's microphone as its default source.</p>
  
  <p><strong>System Info</strong></p>
  
  <p>Linux kernel:</p>
  
  <pre><code>Linux D2-A109 4.15.0-55-generic #60-Ubuntu SMP Tue Jul 2 18:22:20 UTC 2019 x86_64 x86_64 x86_64 GNU/Linux
  </code></pre>
  
  <p>PulseAudio version:</p>
  
  <pre><code>$&gt; pulseaudio --version
     11.1
  </code></pre>
  
  <p>Any advice is welcome!</p>