Received: by 2002:a05:7412:f690:b0:e2:908c:2ebd with SMTP id ej16csp1051838rdb; Fri, 20 Oct 2023 07:13:48 -0700 (PDT) X-Google-Smtp-Source: AGHT+IFrEREY4vhbfn0b9YeqkKdthmxyl9vEULJAWzELoTO7V4x0v9o665j2xquUf+lW/WtlR6eD X-Received: by 2002:a05:6a00:150a:b0:68e:3772:4e40 with SMTP id q10-20020a056a00150a00b0068e37724e40mr2029985pfu.3.1697811227642; Fri, 20 Oct 2023 07:13:47 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1697811227; cv=none; d=google.com; s=arc-20160816; b=Urhs+FVlHZqUiihzE4Fq+TJlJR4FSuI6fjpGZQf3WPP+lIf+rEbWndK6sy671Mag9a VSbf3sgPOL5R/TQ6Cq3S96+isfvIBES1QrLPEsq8wfmVhu8yp+x+lOt/BAhOCLZR/DNU TiKIsPizV5Ikcmz1wjVoSv6xxF2YI45XHUU0QOOiUBuRsR7wkdWNOiKx8lljrjQvj7X5 gyup6up0Wivz+okqpnZyz9FGHQIfsILPut1ju8Ui8nUtgaQc3xdzXki9FJoqG3X4Q7a/ PRRBdbjFXrZHuhyAS6JIGqZK/GGVlwRc9HB8UZDWr8I3wPRgiy6uyA4LxkoBWs6/qetp FS3A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from:dkim-signature; bh=h387w78f0EsIN7StGnEH5FcwYftp6xSYWLxFmJnAzGU=; fh=U3ev7U7uX1ilviB+nfdu7oOFhneDnAUw+Nb8W7HsKBg=; b=Mqu85vbzM0pWSZdWlya9t7xHTP4nhb+xzIyjHvsB8CsAyvMn1gIXRu7dQowJlf5ys9 kXp2nHAgrmkc12yePIZ2GkHwpePXgQWEuimXbCEzf4rpHeJc2/9ytypoFQFlfWoax2jL mNG8Tvnk8oye00ZvJez4mwEVA+tyt/LFlAUiVcF1HzUmFKd/+Dka4yVSazSDKnC2B6TO eQSyRw0OYaRhALg3VRjXqRMtfFL35qnPQkeE2DFyl1QoV5UG9JK7GHYgIh091mUHCCjk hYdwVkjWne3Bvq2ft8rFezdbeBzD9NbUPtXyA6U+ouGhrF8fchDo4ZP2oavFWYs5YeDb v+RQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=PuN3nbvZ; spf=pass (google.com: domain of linux-bluetooth-owner@vger.kernel.org designates 2620:137:e000::3:1 as permitted sender) smtp.mailfrom=linux-bluetooth-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from morse.vger.email (morse.vger.email. [2620:137:e000::3:1]) by mx.google.com with ESMTPS id h10-20020a056a00230a00b006be246c6decsi2120456pfh.351.2023.10.20.07.13.46 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 20 Oct 2023 07:13:47 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-bluetooth-owner@vger.kernel.org designates 2620:137:e000::3:1 as permitted sender) client-ip=2620:137:e000::3:1; Authentication-Results: mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=PuN3nbvZ; spf=pass (google.com: domain of linux-bluetooth-owner@vger.kernel.org designates 2620:137:e000::3:1 as permitted sender) smtp.mailfrom=linux-bluetooth-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by morse.vger.email (Postfix) with ESMTP id 905D8826E8BB; Fri, 20 Oct 2023 07:13:44 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at morse.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1377527AbjJTONn (ORCPT + 99 others); Fri, 20 Oct 2023 10:13:43 -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 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-0.9 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on morse.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-bluetooth@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (morse.vger.email [0.0.0.0]); Fri, 20 Oct 2023 07:13:44 -0700 (PDT) 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, -- 2.34.1