So the question is,
- How can I set the default source?
- How can I list the current default source?
Details
I have 4 sound input sources on my linux device. Here is the result of pactl list sources
:
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
I tried to set the source 1 alsa_input.pci-0000_00_1b.0.analog-stereo as my default source by several ways:
1.change /etc/pulse/client.conf, add following lines:
default-sink = alsa_output.pci-0000_00_1b.0.hdmi-stereo
default-source = alsa_input.pci-0000_00_1b.0.analog-stereo
2.change /etc/pulse/default.pa, add following lines:
### Make some devices default
set-default-source alsa_input.pci-0000_00_1b.0.analog-stereo
After configuration complete, I tried pulseaudio -D
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:
$> pactl load-module module-loopback latency_msec=500
$> 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
The pactl
still use my usb camera's microphone as its default source.
System Info
Linux kernel:
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
PulseAudio version:
$> pulseaudio --version
11.1
Any advice is welcome!
pactl
– Albemarle