[pulseaudio-discuss] Never auto-select a device as the fallback

Sean Greenslade sean at seangreenslade.com
Sat Oct 23 01:47:35 UTC 2021


On Mon, Oct 18, 2021 at 10:53:02AM -0600, Chris Keller wrote:
> Hello folks,
> 
> As I mentioned in a previous thread, I use some external sound cards as
> interfaces to amateur radios. For those sound cards, I never want them to
> be selected as the fallback or default, especially for output but also for
> input. I'd like to keep the behavior of automatically moving fallbacks so
> my Bluetooth headphones will be selected when they're connected, and go
> back to my speakers when they're disconnected, but the radio interfaces
> should never be eligible for auto-selection like that. Is that possible?

Hi, Chris.

As far as I know, the only time a device is forced to become the
fallback is if it's the only sound device present on the machine.
Otherwise, the device you select manually as the fallback should remain
selected. In your setup, is there ever a time where the external cards
are the only ones Pulse sees?

Internally, Pulseaudio uses some hardcoded rules for deciding port
priorities if the fallback is not selected / present. One slightly hacky
workaround I might suggest is to declare your low-priority sound cards
as modem-class devices. This would put them at minimum priority, so the
auto-select routine would never choose them. You could probably craft a
Udev rule to it. I'd look to [1] for inspiration.

--Sean

[1]: https://kernel.googlesource.com/pub/scm/linux/hotplug/udev/+/427c9ba24a8138ea3a9c17ebc661df9290dfbcf2/rules/78-sound-card.rules


More information about the pulseaudio-discuss mailing list