mirror of
https://gitlab.freedesktop.org/pulseaudio/pulseaudio.git
synced 2025-11-02 09:01:46 -05:00
module-switch-on-port-available: Don't switch profiles on uninitialized cards
This could cause the HDMI port to become the default on some systems where analog output was available. BugLink: https://bugs.launchpad.net/ubuntu/+source/pulseaudio/+bug/1256511 BugLink: https://bugs.freedesktop.org/show_bug.cgi?id=73375 Signed-off-by: David Henningsson <david.henningsson@canonical.com>
This commit is contained in:
parent
b75a20db10
commit
ef4a41e8b0
1 changed files with 5 additions and 0 deletions
|
|
@ -173,6 +173,11 @@ static pa_hook_result_t port_available_hook_callback(pa_core *c, pa_device_port
|
|||
return PA_HOOK_OK;
|
||||
}
|
||||
|
||||
if (pa_idxset_size(card->sinks) == 0 && pa_idxset_size(card->sources) == 0)
|
||||
/* This card is not initialized yet. We'll handle it in
|
||||
sink_new / source_new callbacks later. */
|
||||
return PA_HOOK_OK;
|
||||
|
||||
find_sink_and_source(card, port, &sink, &source);
|
||||
|
||||
is_active_profile = card->active_profile == pa_hashmap_get(port->profiles, card->active_profile->name);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue