switch-on-port-available: checking the off profile when switching profile

System Internals / PulseAudio - Hui Wang [canonical.com] - 18 January 2021 17:51 UTC

If the current active profile is off, it has no sinks and sources, and if users plug a headset to the audio port, the profile including this audio port becomes available and should be selected as active profile.

But with the current design, the profile_good_for_output() will return false because the sources in off profile and target profile doesn't match.

For example: (Before users plug headset) Profiles: HiFi (Speaker): Default (sinks: 1, sources: 1, priority: 8100, available: no) HiFi (Headphones): Default (sinks: 1, sources: 1, priority: 8200, available: no) off: Off (sinks: 0, sources: 0, priority: 0, available: yes) Active Profile: off

(After users plug headset) Profiles: HiFi (Speaker): Default (sinks: 1, sources: 1, priority: 8100, available: yes) HiFi (Headphones): Default (sinks: 1, sources: 1, priority: 8200, available: yes) off: Off (sinks: 0, sources: 0, priority: 0, available: yes) Active Profile: off

6d41b93cd switch-on-port-available: checking the off profile when switching profile
src/modules/module-switch-on-port-available.c | 6 ++++++
1 file changed, 6 insertions(+)

Upstream: cgit.freedesktop.org


  • Share