From patchwork Mon Aug 29 20:31:21 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: =?utf-8?q?Fr=C3=A9d=C3=A9ric_Danis?= X-Patchwork-Id: 12958401 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 3734DC0502C for ; Mon, 29 Aug 2022 20:31:42 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229532AbiH2Ubl (ORCPT ); Mon, 29 Aug 2022 16:31:41 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:51016 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230091AbiH2Ubi (ORCPT ); Mon, 29 Aug 2022 16:31:38 -0400 Received: from madras.collabora.co.uk (madras.collabora.co.uk [46.235.227.172]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C128086061 for ; Mon, 29 Aug 2022 13:31:36 -0700 (PDT) Received: from localhost.localdomain (67.227.121.78.rev.sfr.net [78.121.227.67]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) (Authenticated sender: fdanis) by madras.collabora.co.uk (Postfix) with ESMTPSA id E75886601EFA for ; Mon, 29 Aug 2022 21:31:34 +0100 (BST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=collabora.com; s=mail; t=1661805095; bh=P3yg9pjA4JOGOzvo6fS5tNf8wsT314FCGhpxG7buljY=; h=From:To:Subject:Date:In-Reply-To:References:From; b=RsspMYT1Iynw8WzMbsChiRxZh4Fm7PQzh1AumRGqEdf7iXAh2lZkq1GKOrgB7LQL5 H1SttnXXVWoYXlHDafR49Qz6/RkM5iDw2QOka6kjRgL2yDS4fOBVqGCoh1b/i67SX1 3Q6+VBFF1WWgoZ7yezi5P77bu1Ju7K7yEsz5aLz+Ehlz7pwHji9CY1MhKNoj295SrX cTkVxahisFeh4rJ3m5X0UiYXq0UKcISSqux/TtljRcXd09Jlaq58ZWoc80QZTRMwwP aFcKNvsyv4OehUf2pjsNNBFUD/pypuiKnlNcmf+fNOk4FzzHFEJpQaeA2PM+1zfHJy Rm6jnejHJrJGg== From: =?utf-8?q?Fr=C3=A9d=C3=A9ric_Danis?= To: linux-bluetooth@vger.kernel.org Subject: [PATCH BlueZ 1/2] profiles: Add remote endpoint path to SelectProperties Date: Mon, 29 Aug 2022 22:31:21 +0200 Message-Id: <20220829203122.51343-2-frederic.danis@collabora.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20220829203122.51343-1-frederic.danis@collabora.com> References: <20220829203122.51343-1-frederic.danis@collabora.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-bluetooth@vger.kernel.org --- profiles/audio/bap.c | 2 +- profiles/audio/media.c | 3 +++ src/shared/bap.c | 2 ++ src/shared/bap.h | 2 ++ 4 files changed, 8 insertions(+), 1 deletion(-) diff --git a/profiles/audio/bap.c b/profiles/audio/bap.c index d388afe56..cf27ec0ae 100644 --- a/profiles/audio/bap.c +++ b/profiles/audio/bap.c @@ -613,7 +613,7 @@ static bool pac_found(struct bt_bap_pac *lpac, struct bt_bap_pac *rpac, /* TODO: Cache LRU? */ if (btd_service_is_initiator(service)) - bt_bap_select(lpac, rpac, select_cb, ep); + bt_bap_select(lpac, rpac, ep->path, select_cb, ep); return true; } diff --git a/profiles/audio/media.c b/profiles/audio/media.c index ff3fa197b..8d777eedd 100644 --- a/profiles/audio/media.c +++ b/profiles/audio/media.c @@ -891,6 +891,7 @@ done: static int pac_select(struct bt_bap_pac *pac, struct bt_bap_pac_qos *qos, struct iovec *caps, struct iovec *metadata, + const char *remote_ep_path, bt_bap_pac_select_t cb, void *cb_data, void *user_data) { struct media_endpoint *endpoint = user_data; @@ -917,6 +918,8 @@ static int pac_select(struct bt_bap_pac *pac, struct bt_bap_pac_qos *qos, dbus_message_iter_init_append(msg, &iter); + dbus_message_iter_append_basic(&iter, DBUS_TYPE_OBJECT_PATH, &remote_ep_path); + dbus_message_iter_open_container(&iter, DBUS_TYPE_ARRAY, "{sv}", &dict); g_dbus_dict_append_basic_array(&dict, DBUS_TYPE_STRING, &key, diff --git a/src/shared/bap.c b/src/shared/bap.c index 8edc7b72e..691fec2fa 100644 --- a/src/shared/bap.c +++ b/src/shared/bap.c @@ -4058,6 +4058,7 @@ static bool match_pac(struct bt_bap_pac *lpac, struct bt_bap_pac *rpac, } int bt_bap_select(struct bt_bap_pac *lpac, struct bt_bap_pac *rpac, + const char *remote_ep_path, bt_bap_pac_select_t func, void *user_data) { if (!lpac || !rpac || !func) @@ -4067,6 +4068,7 @@ int bt_bap_select(struct bt_bap_pac *lpac, struct bt_bap_pac *rpac, return -EOPNOTSUPP; lpac->ops->select(lpac, &rpac->qos, rpac->data, rpac->metadata, + remote_ep_path, func, user_data, lpac->user_data); return 0; diff --git a/src/shared/bap.h b/src/shared/bap.h index ff4bac330..da5fe1431 100644 --- a/src/shared/bap.h +++ b/src/shared/bap.h @@ -122,6 +122,7 @@ struct bt_bap_pac *bt_bap_add_pac(struct gatt_db *db, const char *name, struct bt_bap_pac_ops { int (*select) (struct bt_bap_pac *pac, struct bt_bap_pac_qos *qos, struct iovec *caps, struct iovec *metadata, + const char *remote_ep_path, bt_bap_pac_select_t cb, void *cb_data, void *user_data); int (*config) (struct bt_bap_stream *stream, struct iovec *cfg, struct bt_bap_qos *qos, bt_bap_pac_config_t cb, @@ -188,6 +189,7 @@ int bt_bap_pac_get_codec(struct bt_bap_pac *pac, uint8_t *id, /* Stream related functions */ int bt_bap_select(struct bt_bap_pac *lpac, struct bt_bap_pac *rpac, + const char *remote_ep_path, bt_bap_pac_select_t func, void *user_data); struct bt_bap_stream *bt_bap_config(struct bt_bap *bap, From patchwork Mon Aug 29 20:31:22 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: =?utf-8?q?Fr=C3=A9d=C3=A9ric_Danis?= X-Patchwork-Id: 12958400 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 737D7ECAAD2 for ; Mon, 29 Aug 2022 20:31:41 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230103AbiH2Ubk (ORCPT ); Mon, 29 Aug 2022 16:31:40 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:51014 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230090AbiH2Ubi (ORCPT ); Mon, 29 Aug 2022 16:31:38 -0400 Received: from madras.collabora.co.uk (madras.collabora.co.uk [IPv6:2a00:1098:0:82:1000:25:2eeb:e5ab]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C122A85FDB for ; Mon, 29 Aug 2022 13:31:36 -0700 (PDT) Received: from localhost.localdomain (67.227.121.78.rev.sfr.net [78.121.227.67]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) (Authenticated sender: fdanis) by madras.collabora.co.uk (Postfix) with ESMTPSA id 2A4AE6601EFC for ; Mon, 29 Aug 2022 21:31:35 +0100 (BST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=collabora.com; s=mail; t=1661805095; bh=RV22VPkuxsue9tUo9epYMtrLQw3X95030umtA9KVT40=; h=From:To:Subject:Date:In-Reply-To:References:From; b=N8GRWxxVJ0IlHCPo4/sXc0oWYdmOGjIhu2CqQWYIxSYQOlmfA0upD0gs3TeDTxguE BLw1ZYP3g9kWvpsXPvZJFYIH/BQMKh9jC6/l0MHz0C+Iz7yDwOuIr+7K4TrZ2a63x6 DUc8cri+wfxagywClO6c2vl6PPwFWhgTpjsZPTnIylsDhpJV9udD42w/mPrMVvfQCS 7xL17/PIteCFS+llzUw5BT4UyI7M/16O+2U1S1P7TQtwp7BICG6qlvtzM+0eSFduRf QM09xP5WcT6cwSUqQQ9woI50LbgLJWSKTNmp4p8bjxx3NEnPASd5aM5hs1YaqsE6mG EfH+gHxxwU1aw== From: =?utf-8?q?Fr=C3=A9d=C3=A9ric_Danis?= To: linux-bluetooth@vger.kernel.org Subject: [PATCH BlueZ 2/2] doc: Add remote endpoint path to SelectProperties Date: Mon, 29 Aug 2022 22:31:22 +0200 Message-Id: <20220829203122.51343-3-frederic.danis@collabora.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20220829203122.51343-1-frederic.danis@collabora.com> References: <20220829203122.51343-1-frederic.danis@collabora.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-bluetooth@vger.kernel.org --- doc/media-api.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/media-api.txt b/doc/media-api.txt index 9cd211355..1866ecfcb 100644 --- a/doc/media-api.txt +++ b/doc/media-api.txt @@ -598,7 +598,7 @@ Methods void SetConfiguration(object transport, dict properties) configuration since on success the configuration is send back as parameter of SetConfiguration. - dict SelectProperties(dict properties) + dict SelectProperties(object remote_endpoint, dict properties) Select preferable properties from the supported properties. Refer to SetConfiguration for the list of