From patchwork Fri Oct 20 14:25:50 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "K, Kiran" X-Patchwork-Id: 13430801 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 67313C00A98 for ; Fri, 20 Oct 2023 14:13:44 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1377529AbjJTONo (ORCPT ); Fri, 20 Oct 2023 10:13:44 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42064 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1377419AbjJTONn (ORCPT ); Fri, 20 Oct 2023 10:13:43 -0400 Received: from mgamail.intel.com (mgamail.intel.com [192.55.52.136]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 955EA1A8 for ; Fri, 20 Oct 2023 07:13:41 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1697811221; x=1729347221; h=from:to:cc:subject:date:message-id:mime-version: content-transfer-encoding; bh=iUOfA+abYciVODA+PW1TPL5pUtyOvPBYkEvwRJEFPvY=; b=PuN3nbvZpPwPlIhpjIpWvJLxtSw0FNRTlq/hWSgTGrEKKwamLvhbcuoe KZwxEC7kSQ5hHYCWoT0eSXRYBniQWZ0yRbTaEPXs5wSmTv967COIqzOhG MqYPBWwxVG0dc2joSenxJDXXmjvfLwSV/oGIFzEkPMrlhk8iKtfwQnQDL 0SWCvbrcRSg9Z/EbyALStwEEWIbkgOZy44p0TOy4fTWAzBf+SUE+cHkHg MHWZ2nFEVuxZxrSxS1S73Y+5fYFzqSVc7x0XYxYR3URAxOZlg+7NrsQnq IfDJBPpvM7gX3oyGFHhcwgu1XwHMsaR42gWTbsC5T41pwl/eOR3l8datj g==; X-IronPort-AV: E=McAfee;i="6600,9927,10869"; a="365840850" X-IronPort-AV: E=Sophos;i="6.03,239,1694761200"; d="scan'208";a="365840850" Received: from fmsmga005.fm.intel.com ([10.253.24.32]) by fmsmga106.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 20 Oct 2023 07:13:41 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10869"; a="1088756470" X-IronPort-AV: E=Sophos;i="6.03,239,1694761200"; d="scan'208";a="1088756470" Received: from intel-lenovo-legion-y540-15irh-pg0.iind.intel.com ([10.224.186.95]) by fmsmga005.fm.intel.com with ESMTP; 20 Oct 2023 07:13:40 -0700 From: Kiran K To: linux-bluetooth@vger.kernel.org Cc: ravishankar.srivatsa@intel.com, Kiran K Subject: [PATCH v1 1/5] media: Populate location to qos structure Date: Fri, 20 Oct 2023 19:55:50 +0530 Message-Id: <20231020142554.486629-1-kiran.k@intel.com> X-Mailer: git-send-email 2.34.1 MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-bluetooth@vger.kernel.org Allow clients to register Location for endpoint. --- profiles/audio/media.c | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/profiles/audio/media.c b/profiles/audio/media.c index 1d98ac5a1a70..d0520d3216c9 100644 --- a/profiles/audio/media.c +++ b/profiles/audio/media.c @@ -1609,6 +1609,10 @@ static int parse_properties(DBusMessageIter *props, const char **uuid, if (var != DBUS_TYPE_UINT16) return -EINVAL; dbus_message_iter_get_basic(&value, &qos->ppd_max); + } else if (strcasecmp(key, "Location") == 0) { + if (var != DBUS_TYPE_UINT32) + return -EINVAL; + dbus_message_iter_get_basic(&value, &qos->location); } dbus_message_iter_next(props); @@ -2799,6 +2803,13 @@ static void app_register_endpoint(void *data, void *user_data) dbus_message_iter_get_basic(&iter, &qos.ppd_min); } + if (g_dbus_proxy_get_property(proxy, "Location", &iter)) { + if (dbus_message_iter_get_arg_type(&iter) != DBUS_TYPE_UINT32) + goto fail; + + dbus_message_iter_get_basic(&iter, &qos.location); + } + endpoint = media_endpoint_create(app->adapter, app->sender, path, uuid, delay_reporting, codec, vendor.cid, vendor.vid, &qos, From patchwork Fri Oct 20 14:25:51 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "K, Kiran" X-Patchwork-Id: 13430802 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 801DAC0032E for ; Fri, 20 Oct 2023 14:13:45 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1377531AbjJTONp (ORCPT ); Fri, 20 Oct 2023 10:13:45 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42068 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1377530AbjJTONo (ORCPT ); Fri, 20 Oct 2023 10:13:44 -0400 Received: from mgamail.intel.com (mgamail.intel.com [192.55.52.136]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 1B94B1A8 for ; Fri, 20 Oct 2023 07:13:43 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1697811223; x=1729347223; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=aBVfpb1kYIWESCE+iWgnY0qK9+sW7PPcGg7TBzMu0OA=; b=RMgu5prW18gPLUD8oug2wZ1v1Woin56Orvvf0P2GhQDqFSilpKrjOYzQ U/p5TbLnq35E7TpQMT0KBxKKe9lAd5egM+BdI8ij+tjIIBRjkG3x9tGcq yDXHz8nWtoHmD6NGJ08OVgESSP1ZCGP6RvkBnOc/iA+rHfJesfzHoSKcc l8ydBcVH7+5PWnCgwYJv8qcNk2oT5FjSp8+B4LM7DL1SwOC7Enm7ghGK0 apzwNxdN2u5c2Wa4goPRnh0XSIsPG0whTv7T49UP5r/NpkI2Zl9ctE5LZ Fux/gq409neBymxWSjYMttSHkks9v4HdxBPBn4WjH/u0iNmLQsxVWGTMZ w==; X-IronPort-AV: E=McAfee;i="6600,9927,10869"; a="365840862" X-IronPort-AV: E=Sophos;i="6.03,239,1694761200"; d="scan'208";a="365840862" Received: from fmsmga005.fm.intel.com ([10.253.24.32]) by fmsmga106.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 20 Oct 2023 07:13:42 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10869"; a="1088756485" X-IronPort-AV: E=Sophos;i="6.03,239,1694761200"; d="scan'208";a="1088756485" Received: from intel-lenovo-legion-y540-15irh-pg0.iind.intel.com ([10.224.186.95]) by fmsmga005.fm.intel.com with ESMTP; 20 Oct 2023 07:13:41 -0700 From: Kiran K To: linux-bluetooth@vger.kernel.org Cc: ravishankar.srivatsa@intel.com, Kiran K Subject: [PATCH v1 2/5] bap: Fix update of sink location value Date: Fri, 20 Oct 2023 19:55:51 +0530 Message-Id: <20231020142554.486629-2-kiran.k@intel.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20231020142554.486629-1-kiran.k@intel.com> References: <20231020142554.486629-1-kiran.k@intel.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-bluetooth@vger.kernel.org pac->sink_loc needs to be updated only if there is a change. --- src/shared/bap.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/shared/bap.c b/src/shared/bap.c index 925501c48d98..2fd21b81b72d 100644 --- a/src/shared/bap.c +++ b/src/shared/bap.c @@ -2491,13 +2491,11 @@ static void pacs_sink_location_changed(struct bt_pacs *pacs) static void pacs_add_sink_location(struct bt_pacs *pacs, uint32_t location) { - location |= pacs->sink_loc_value; - /* Check if location value needs updating */ if (location == pacs->sink_loc_value) return; - pacs->sink_loc_value = location; + pacs->sink_loc_value |= location; pacs_sink_location_changed(pacs); } From patchwork Fri Oct 20 14:25:52 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "K, Kiran" X-Patchwork-Id: 13430803 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 DC318CDB474 for ; Fri, 20 Oct 2023 14:13:46 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1377534AbjJTONr (ORCPT ); Fri, 20 Oct 2023 10:13:47 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42102 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1377530AbjJTONq (ORCPT ); Fri, 20 Oct 2023 10:13:46 -0400 Received: from mgamail.intel.com (mgamail.intel.com [192.55.52.136]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 73004D46 for ; Fri, 20 Oct 2023 07:13:44 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1697811224; x=1729347224; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=Jq5lz68o6ZCwQcCpPIOUbVYd5NuT91qf36kzbJgwtXQ=; b=JenEjpcThpGiO7nnZ22zYSEVpc4Za8w0WXu/s9HYcMD/uiDA/Wk6ej68 wiJzoEGZUrCmXMGfrjNBz6eI1qcaG/5a0QQLTAvGJ2O61Kxvgk3Iu151T WhQYK93UTU6nNmRjLb19+9e2NNBunuPSMGKR0+O7VrNmHhXQdrLTHRDsD pMxiM7JLz3MDv7eG6X1ucg9qncdcbFSw23VwFzrX/sc580M/uPyN1jYBI T2anpICQ3lwMt4JYyXdbZ340VU9n1KLoWtG5S18ugZL+ufaXFkqHQ295D MC3mW8tNCfPh6TeNlXvRJTDs4r0eabDUma+T7r9NoThn2L1YHF5Vgr/kT A==; X-IronPort-AV: E=McAfee;i="6600,9927,10869"; a="365840874" X-IronPort-AV: E=Sophos;i="6.03,239,1694761200"; d="scan'208";a="365840874" Received: from fmsmga005.fm.intel.com ([10.253.24.32]) by fmsmga106.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 20 Oct 2023 07:13:44 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10869"; a="1088756508" X-IronPort-AV: E=Sophos;i="6.03,239,1694761200"; d="scan'208";a="1088756508" Received: from intel-lenovo-legion-y540-15irh-pg0.iind.intel.com ([10.224.186.95]) by fmsmga005.fm.intel.com with ESMTP; 20 Oct 2023 07:13:43 -0700 From: Kiran K To: linux-bluetooth@vger.kernel.org Cc: ravishankar.srivatsa@intel.com, Kiran K Subject: [PATCH v1 3/5] bap: Do not set default location for sink and source Date: Fri, 20 Oct 2023 19:55:52 +0530 Message-Id: <20231020142554.486629-3-kiran.k@intel.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20231020142554.486629-1-kiran.k@intel.com> References: <20231020142554.486629-1-kiran.k@intel.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-bluetooth@vger.kernel.org let the clients register the required location for source and sink endpoints. --- src/shared/bap.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/shared/bap.c b/src/shared/bap.c index 2fd21b81b72d..5cb8b5aba659 100644 --- a/src/shared/bap.c +++ b/src/shared/bap.c @@ -474,9 +474,8 @@ static struct bt_pacs *pacs_new(struct gatt_db *db) pacs = new0(struct bt_pacs, 1); - /* Set default values */ - pacs->sink_loc_value = PACS_SNK_LOCATION; - pacs->source_loc_value = PACS_SRC_LOCATION; + pacs->sink_loc_value = 0; + pacs->source_loc_value = 0; pacs->sink_context_value = PACS_SNK_CTXT; pacs->source_context_value = PACS_SRC_CTXT; pacs->supported_sink_context_value = PACS_SUPPORTED_SNK_CTXT; From patchwork Fri Oct 20 14:25:53 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "K, Kiran" X-Patchwork-Id: 13430804 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 CCBBDC001DF for ; Fri, 20 Oct 2023 14:13:48 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1377539AbjJTONs (ORCPT ); Fri, 20 Oct 2023 10:13:48 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:59384 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1377530AbjJTONr (ORCPT ); Fri, 20 Oct 2023 10:13:47 -0400 Received: from mgamail.intel.com (mgamail.intel.com [192.55.52.136]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D16E2D41 for ; Fri, 20 Oct 2023 07:13:45 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1697811225; x=1729347225; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=KBhe0yXqXt7ZHhsZymsr3fzLps0zsk6XXIct1khCwyI=; b=PcPVjeh3sOyl68+GNREewaw8HVcIOe7JsAVAnUgm8c7wCwYVEi6o1Xi8 bVJHdHJ1gmgZ3z6Ux79kFPpElVzlWAKbiU3BWJ6J23NXY/0yeEiHs2EQk yTSoF+1Z9HuSfL/GW49Kx1bbcP/9/lSvFdYWZP8bYTkoM/ZIptQZ2bCek K5DmnL9DyWdcRV6evGHUJzKYR5wfmzd+5JP3AcJpx2O8eR5s65yDre3Ie haxtuMZ98q/PYo2+4wDPQlRhzKXsJ3jHqa+4O0GGp+SsAquKMvFXY8qbO /gkWNnFugY8S0nVyLgHhndyeYGrWNfNNU8tKMjI/CcR7sHbd4A9y0MqP6 w==; X-IronPort-AV: E=McAfee;i="6600,9927,10869"; a="365840890" X-IronPort-AV: E=Sophos;i="6.03,239,1694761200"; d="scan'208";a="365840890" Received: from fmsmga005.fm.intel.com ([10.253.24.32]) by fmsmga106.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 20 Oct 2023 07:13:45 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10869"; a="1088756511" X-IronPort-AV: E=Sophos;i="6.03,239,1694761200"; d="scan'208";a="1088756511" Received: from intel-lenovo-legion-y540-15irh-pg0.iind.intel.com ([10.224.186.95]) by fmsmga005.fm.intel.com with ESMTP; 20 Oct 2023 07:13:44 -0700 From: Kiran K To: linux-bluetooth@vger.kernel.org Cc: ravishankar.srivatsa@intel.com, Kiran K Subject: [PATCH v1 4/5] bap: Fix reading source codec capabilities Date: Fri, 20 Oct 2023 19:55:53 +0530 Message-Id: <20231020142554.486629-4-kiran.k@intel.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20231020142554.486629-1-kiran.k@intel.com> References: <20231020142554.486629-1-kiran.k@intel.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-bluetooth@vger.kernel.org Sink ASE capabilities were read instead of source. --- src/shared/bap.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/shared/bap.c b/src/shared/bap.c index 5cb8b5aba659..bd00fa210abe 100644 --- a/src/shared/bap.c +++ b/src/shared/bap.c @@ -2634,7 +2634,7 @@ static void bap_add_source(struct bt_bap_pac *pac) iov.iov_base = value; iov.iov_len = 0; - queue_foreach(pac->bdb->sinks, pac_foreach, &iov); + queue_foreach(pac->bdb->sources, pac_foreach, &iov); pacs_add_source_location(pac->bdb->pacs, pac->qos.location); pacs_add_source_supported_context(pac->bdb->pacs, From patchwork Fri Oct 20 14:25:54 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "K, Kiran" X-Patchwork-Id: 13430805 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 D50D2CDB474 for ; Fri, 20 Oct 2023 14:13:49 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1377542AbjJTONu (ORCPT ); Fri, 20 Oct 2023 10:13:50 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:59432 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1377535AbjJTONt (ORCPT ); Fri, 20 Oct 2023 10:13:49 -0400 Received: from mgamail.intel.com (mgamail.intel.com [192.55.52.136]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 4B8E6D5A for ; Fri, 20 Oct 2023 07:13:47 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1697811227; x=1729347227; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=djb+3OFt+//850NJe6tJIgHp8zlYEwTlsouldHOC21A=; b=NO6gTAmY6UKp2fz421KiEpi2lZE/rbKfo9TWeMD61+FOiIYjPFz1p1oX CpLnPzzZulsznl2ls3DJ/qIny+QMjrJYyXXv6uENd1jYmNG97HRPIBSj5 flfSuC9kq/1fLE5m94lxmfJWoXmwJQ2QYhHryaA5jrMXfAU7uF8ODjYJb oRrQZEbKG19BPZkGx4Fy+e7fVXzev8GJl37gkQRDb623lkd/8r+Fcdy8A ex2LN+KXskOnCRCj8+jgmfN+GV/HECvCb+mDKwehoEdFB2bocTO3VmACd OPxUkEhIBgI3MzaPp19YFC6s4tkbi5mPXpLQoFtnFRtadi742NST646eK w==; X-IronPort-AV: E=McAfee;i="6600,9927,10869"; a="365840907" X-IronPort-AV: E=Sophos;i="6.03,239,1694761200"; d="scan'208";a="365840907" Received: from fmsmga005.fm.intel.com ([10.253.24.32]) by fmsmga106.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 20 Oct 2023 07:13:47 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10869"; a="1088756514" X-IronPort-AV: E=Sophos;i="6.03,239,1694761200"; d="scan'208";a="1088756514" Received: from intel-lenovo-legion-y540-15irh-pg0.iind.intel.com ([10.224.186.95]) by fmsmga005.fm.intel.com with ESMTP; 20 Oct 2023 07:13:45 -0700 From: Kiran K To: linux-bluetooth@vger.kernel.org Cc: ravishankar.srivatsa@intel.com, Kiran K Subject: [PATCH v1 5/5] media: Parse conext and supported context Date: Fri, 20 Oct 2023 19:55:54 +0530 Message-Id: <20231020142554.486629-5-kiran.k@intel.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20231020142554.486629-1-kiran.k@intel.com> References: <20231020142554.486629-1-kiran.k@intel.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-bluetooth@vger.kernel.org Allow clients to register available context and supported context for bap endpoint. --- profiles/audio/media.c | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) diff --git a/profiles/audio/media.c b/profiles/audio/media.c index d0520d3216c9..69f77a80c8ea 100644 --- a/profiles/audio/media.c +++ b/profiles/audio/media.c @@ -1613,6 +1613,15 @@ static int parse_properties(DBusMessageIter *props, const char **uuid, if (var != DBUS_TYPE_UINT32) return -EINVAL; dbus_message_iter_get_basic(&value, &qos->location); + } else if (strcasecmp(key, "Context") == 0) { + if (var != DBUS_TYPE_UINT16) + return -EINVAL; + dbus_message_iter_get_basic(&value, &qos->context); + } else if (strcasecmp(key, "SupportedContext") == 0) { + if (var != DBUS_TYPE_UINT16) + return -EINVAL; + dbus_message_iter_get_basic(&value, + &qos->supported_context); } dbus_message_iter_next(props); @@ -2810,6 +2819,20 @@ static void app_register_endpoint(void *data, void *user_data) dbus_message_iter_get_basic(&iter, &qos.location); } + if (g_dbus_proxy_get_property(proxy, "Context", &iter)) { + if (dbus_message_iter_get_arg_type(&iter) != DBUS_TYPE_UINT16) + goto fail; + + dbus_message_iter_get_basic(&iter, &qos.context); + } + + if (g_dbus_proxy_get_property(proxy, "SupportedContext", &iter)) { + if (dbus_message_iter_get_arg_type(&iter) != DBUS_TYPE_UINT16) + goto fail; + + dbus_message_iter_get_basic(&iter, &qos.supported_context); + } + endpoint = media_endpoint_create(app->adapter, app->sender, path, uuid, delay_reporting, codec, vendor.cid, vendor.vid, &qos,