[pulseaudio-discuss] [PATCH] protocol-native: log who changes card profiles
Tanu Kaskinen
tanuk at iki.fi
Tue Apr 4 09:46:25 UTC 2017
Some volume control applications, including gnome-control-center[1],
Budgie Volume Control[2] and possibly something in xfce4 too[3],
sometimes do unwanted card profile changes. This patch makes it possible
to see from the log which application requested a profile change, which
makes it easier to detect when an application misbehaves.
[1] https://bugzilla.gnome.org/show_bug.cgi?id=762932
[2] https://bugs.freedesktop.org/show_bug.cgi?id=93903#c41
[3] https://bugs.freedesktop.org/show_bug.cgi?id=93903#c40
---
src/pulsecore/protocol-native.c | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/src/pulsecore/protocol-native.c b/src/pulsecore/protocol-native.c
index 13f4f6238..efe9bd244 100644
--- a/src/pulsecore/protocol-native.c
+++ b/src/pulsecore/protocol-native.c
@@ -4721,6 +4721,11 @@ static void command_set_card_profile(pa_pdispatch *pd, uint32_t command, uint32_
CHECK_VALIDITY(c->pstream, profile, tag, PA_ERR_NOENTITY);
+ pa_log_info("Application \"%s\" requests card profile change. card = %s, profile = %s",
+ pa_strnull(pa_proplist_gets(c->client->proplist, PA_PROP_APPLICATION_NAME)),
+ card->name,
+ profile->name);
+
if ((ret = pa_card_set_profile(card, profile, true)) < 0) {
pa_pstream_send_error(c->pstream, tag, -ret);
return;
--
2.11.0
More information about the pulseaudio-discuss
mailing list