configure.ac | 2 +- src/modules/module-equalizer-sink.c | 26 ++++++++++++++++++++++---- src/modules/module-solaris.c | 9 ++++++++- 3 files changed, 31 insertions(+), 6 deletions(-)
New commits: commit 5e33fe85e17d0ac130672cbd32ac59bd9c974b3a Author: Tanu Kaskinen <[email protected]> Date: Wed Jul 12 22:29:56 2017 +0300 equalizer-sink: update sink description when moving If the description is not updated when moving, the old automatically generated description will refer to the old master sink after the move, which is not nice. diff --git a/src/modules/module-equalizer-sink.c b/src/modules/module-equalizer-sink.c index 96eda11e..27110a92 100644 --- a/src/modules/module-equalizer-sink.c +++ b/src/modules/module-equalizer-sink.c @@ -127,6 +127,8 @@ struct userdata { pa_database *database; char **base_profiles; + + bool automatic_description; }; static const char* const valid_modargs[] = { @@ -1074,6 +1076,17 @@ static void sink_input_moving_cb(pa_sink_input *i, pa_sink *dest) { if (dest) { pa_sink_set_asyncmsgq(u->sink, dest->asyncmsgq); pa_sink_update_flags(u->sink, PA_SINK_LATENCY|PA_SINK_DYNAMIC_LATENCY, dest->flags); + + if (u->automatic_description) { + const char *master_description; + char *new_description; + + master_description = pa_proplist_gets(dest->proplist, PA_PROP_DEVICE_DESCRIPTION); + new_description = pa_sprintf_malloc(_("FFT based equalizer on %s"), + master_description ? master_description : dest->name); + pa_sink_set_description(u->sink, new_description); + pa_xfree(new_description); + } } else pa_sink_set_asyncmsgq(u->sink, NULL); } @@ -1083,7 +1096,6 @@ int pa__init(pa_module*m) { pa_sample_spec ss; pa_channel_map map; pa_modargs *ma; - const char *z; pa_sink *master; pa_sink_input_new_data sink_input_data; pa_sink_new_data sink_data; @@ -1179,9 +1191,6 @@ int pa__init(pa_module*m) { pa_sink_new_data_set_sample_spec(&sink_data, &ss); pa_sink_new_data_set_channel_map(&sink_data, &map); - z = pa_proplist_gets(master->proplist, PA_PROP_DEVICE_DESCRIPTION); - pa_proplist_setf(sink_data.proplist, PA_PROP_DEVICE_DESCRIPTION, "FFT based equalizer on %s", z ? z : master->name); - pa_proplist_sets(sink_data.proplist, PA_PROP_DEVICE_MASTER_DEVICE, master->name); pa_proplist_sets(sink_data.proplist, PA_PROP_DEVICE_CLASS, "filter"); @@ -1191,6 +1200,15 @@ int pa__init(pa_module*m) { goto fail; } + if (!pa_proplist_contains(sink_data.proplist, PA_PROP_DEVICE_DESCRIPTION)) { + const char *master_description; + + master_description = pa_proplist_gets(master->proplist, PA_PROP_DEVICE_DESCRIPTION); + pa_proplist_setf(sink_data.proplist, PA_PROP_DEVICE_DESCRIPTION, + _("FFT based equalizer on %s"), master_description ? master_description : master->name); + u->automatic_description = true; + } + u->autoloaded = DEFAULT_AUTOLOADED; if (pa_modargs_get_value_boolean(ma, "autoloaded", &u->autoloaded) < 0) { pa_log("Failed to parse autoloaded value"); commit 23fa6ef766432a872fee299e78acaa4fe620daeb Author: David Michael <[email protected]> Date: Sat Jun 3 20:53:48 2017 -0700 solaris: Support building on GNU Hurd diff --git a/configure.ac b/configure.ac index da0bfcd5..1f8a1813 100644 --- a/configure.ac +++ b/configure.ac @@ -436,7 +436,7 @@ AM_CONDITIONAL([HAVE_EVDEV], [test "x$HAVE_EVDEV" = "x1"]) AC_CHECK_HEADERS_ONCE([sys/prctl.h]) # Solaris -AC_CHECK_HEADERS_ONCE([sys/filio.h]) +AC_CHECK_HEADERS_ONCE([sys/conf.h sys/filio.h]) # Windows AC_CHECK_HEADERS_ONCE([windows.h winsock2.h ws2tcpip.h]) diff --git a/src/modules/module-solaris.c b/src/modules/module-solaris.c index fee69e74..f44bc7c7 100644 --- a/src/modules/module-solaris.c +++ b/src/modules/module-solaris.c @@ -31,11 +31,18 @@ #include <sys/ioctl.h> #include <sys/types.h> +#ifdef HAVE_POLL_H +#include <poll.h> +#endif + #include <signal.h> #include <stropts.h> -#include <sys/conf.h> #include <sys/audio.h> +#ifdef HAVE_SYS_CONF_H +#include <sys/conf.h> +#endif + #include <pulse/mainloop-signal.h> #include <pulse/xmalloc.h> #include <pulse/timeval.h> _______________________________________________ pulseaudio-commits mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/pulseaudio-commits
