From d6a7db80204d0c6423be615c260c1d5651f1b5e7 Mon Sep 17 00:00:00 2001 From: Pauli Virtanen Date: Tue, 12 Jul 2022 14:14:41 +0300 Subject: [PATCH] bluez5: mark HFP/HSP streams with media.role=Communication --- spa/plugins/bluez5/sco-sink.c | 1 + spa/plugins/bluez5/sco-source.c | 1 + 2 files changed, 2 insertions(+) diff --git a/spa/plugins/bluez5/sco-sink.c b/spa/plugins/bluez5/sco-sink.c index 909a14928..94d477483 100644 --- a/spa/plugins/bluez5/sco-sink.c +++ b/spa/plugins/bluez5/sco-sink.c @@ -759,6 +759,7 @@ static void emit_node_info(struct impl *this, bool full) { SPA_KEY_MEDIA_CLASS, "Stream/Input/Audio" }, { "media.name", ((this->transport && this->transport->device->name) ? this->transport->device->name : "HSP/HFP") }, + { SPA_KEY_MEDIA_ROLE, "Communication" }, }; bool is_ag = this->transport && (this->transport->profile & SPA_BT_PROFILE_HEADSET_AUDIO_GATEWAY); diff --git a/spa/plugins/bluez5/sco-source.c b/spa/plugins/bluez5/sco-source.c index 05726d77f..b1c7373de 100644 --- a/spa/plugins/bluez5/sco-source.c +++ b/spa/plugins/bluez5/sco-source.c @@ -805,6 +805,7 @@ static void emit_node_info(struct impl *this, bool full) { SPA_KEY_MEDIA_CLASS, "Stream/Output/Audio" }, { "media.name", ((this->transport && this->transport->device->name) ? this->transport->device->name : "HSP/HFP") }, + { SPA_KEY_MEDIA_ROLE, "Communication" }, }; bool is_ag = this->transport && (this->transport->profile & SPA_BT_PROFILE_HEADSET_AUDIO_GATEWAY); uint64_t old = full ? this->info.change_mask : 0;