[pulseaudio-commits] [Git][pulseaudio/pulseaudio][master] switch-on-connect: Do not ignore HDMI sinks
Tanu Kaskinen
gitlab at gitlab.freedesktop.org
Thu Nov 22 09:28:51 UTC 2018
Tanu Kaskinen pushed to branch master at PulseAudio / pulseaudio
Commits:
bae8c16b by João Paulo Rechi Vita at 2018-11-22T09:26:42Z
switch-on-connect: Do not ignore HDMI sinks
HDMI ports are normally present on cards connected to an internal bus,
and module-switch-on-connect should switch to them when a HDMI monitor
is plugged.
This is specially relevant on setups where the HDMI port of a machine is
connected to a different audio card then the analog outputs, which is
the case for machines with AMD graphics cards.
- - - - -
1 changed file:
- src/modules/module-switch-on-connect.c
Changes:
=====================================
src/modules/module-switch-on-connect.c
=====================================
@@ -70,11 +70,14 @@ static pa_hook_result_t sink_put_hook_callback(pa_core *c, pa_sink *sink, void*
pa_log_debug("Trying to switch to new sink %s", sink->name);
- /* Don't switch to any internal devices */
- s = pa_proplist_gets(sink->proplist, PA_PROP_DEVICE_BUS);
- if (pa_safe_streq(s, "pci") || pa_safe_streq(s, "isa")) {
- pa_log_debug("Refusing to switch to sink on %s bus", s);
- return PA_HOOK_OK;
+ /* Don't switch to any internal devices except HDMI */
+ s = pa_proplist_gets(sink->proplist, PA_PROP_DEVICE_STRING);
+ if (s && !pa_startswith(s, "hdmi")) {
+ s = pa_proplist_gets(sink->proplist, PA_PROP_DEVICE_BUS);
+ if (pa_safe_streq(s, "pci") || pa_safe_streq(s, "isa")) {
+ pa_log_debug("Refusing to switch to sink on %s bus", s);
+ return PA_HOOK_OK;
+ }
}
/* Ignore virtual sinks if not configured otherwise on the command line */
View it on GitLab: https://gitlab.freedesktop.org/pulseaudio/pulseaudio/commit/bae8c16bfadb43c596b03f9c7ff7c9e9f1709b76
--
View it on GitLab: https://gitlab.freedesktop.org/pulseaudio/pulseaudio/commit/bae8c16bfadb43c596b03f9c7ff7c9e9f1709b76
You're receiving this email because of your account on gitlab.freedesktop.org.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/pulseaudio-commits/attachments/20181122/dd672408/attachment.html>
More information about the pulseaudio-commits
mailing list