mirror of
https://gitlab.freedesktop.org/pulseaudio/pulseaudio.git
synced 2025-11-03 09:01:50 -05:00
module-switch-on-port-available: make the output more accurate
It is possible that the chosen active_port doesn't equal new_data->active_port, using p->name is more accurate. Please refer to sink_new_hook_callback() Signed-off-by: Hui Wang <hui.wang@canonical.com>
This commit is contained in:
parent
380a7fc240
commit
0e44b127d0
1 changed files with 1 additions and 2 deletions
|
|
@ -264,8 +264,7 @@ static pa_hook_result_t source_new_hook_callback(pa_core *c, pa_source_new_data
|
||||||
pa_device_port *p = new_sink_source(new_data->ports, new_data->active_port);
|
pa_device_port *p = new_sink_source(new_data->ports, new_data->active_port);
|
||||||
|
|
||||||
if (p) {
|
if (p) {
|
||||||
pa_log_debug("Switching initial port for source '%s' to '%s'", new_data->name,
|
pa_log_debug("Switching initial port for source '%s' to '%s'", new_data->name, p->name);
|
||||||
new_data->active_port);
|
|
||||||
pa_source_new_data_set_port(new_data, p->name);
|
pa_source_new_data_set_port(new_data, p->name);
|
||||||
}
|
}
|
||||||
return PA_HOOK_OK;
|
return PA_HOOK_OK;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue