Received: by 2002:a05:7412:5112:b0:fa:6e18:a558 with SMTP id fm18csp678065rdb; Tue, 23 Jan 2024 11:12:05 -0800 (PST) X-Google-Smtp-Source: AGHT+IHjpFkllR3hcDL1W7CMjsKyU1cIMnmp+cFoIUgZTM/WvelVoyrDRxwDiQzhctIylhUftFxu X-Received: by 2002:a9d:7a50:0:b0:6dd:e35e:cd6f with SMTP id z16-20020a9d7a50000000b006dde35ecd6fmr397516otm.18.1706037125638; Tue, 23 Jan 2024 11:12:05 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1706037125; cv=pass; d=google.com; s=arc-20160816; b=x5LpPi+wILvVDkPAAm2nvHjNcDQJ6f1rADe3AAn9wAAb75zXhdObv4uCIRuu5dw2OO DXxNiM04vQkCOEO0aK6I0LsUTwHlkR90CDpvx9f2qH4ySnjhRyLX3ifq0eqdkwnO1tVc tAdv/BRdvE2OYwsnA1Dw+livmpuUfdSeabPhW9vw42DIGIvk8mMdVUw4CD+sV3QAysr9 SJ9znsOfM9qrV2c059m6wZLZWNUmsc3mA4Mtshn0Oy+ioWrD/km+4Em7EGcoe7DXG1hc Ev3mwcOeIToTiPyJNiBfP632aJK45t0ggnlI7bMmDL/grwXRW6E8y/GtE4AsQhXvZHRT Vv0Q== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:message-id:date:subject:to:from :dkim-signature; bh=FvMoAzW48uPpe4rLWhtOHNstnjZwdQrZbl8AaLzm+G4=; fh=4lGQI6056MBa4/oovMyIYaKLn+Wz/24RGvUivMmQP8E=; b=vRQskoOc2a+j9tEzLWwAo9di5yBBZ43bIYkMfEDg+sgAMmQu2NNZeCZQapwVD60Ufp KUP6+B03+uD5mBUcy5kqBVnd3bkGlO5bgVPB67TGjGPHY9LSmISmj7tmWijGokCuQU4A ifDZACTKUB2chroiuSaReF8Bdkb+svDvOUVPnjATPNwVpl505GTxr4NFjtMQmFmeh3KH A+jzqjcO8mapq4Ir8gP1tly5hiyR8pwsf4x+QGhFA7IEJ/BiqtKzQcysQExVv4MOGhyL ZPnMWi28mdo7CnZmOTU4YcMGnr3cZlViq4prTA3FFkehw/+5CiTsd1QIoMbwsDsQ/9IL uj2w== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=RfCYrKAQ; arc=pass (i=1 spf=pass spfdomain=gmail.com dkim=pass dkdomain=gmail.com dmarc=pass fromdomain=gmail.com); spf=pass (google.com: domain of linux-bluetooth+bounces-1282-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-bluetooth+bounces-1282-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [147.75.199.223]) by mx.google.com with ESMTPS id p9-20020a05622a00c900b0042a12a1520bsi8645239qtw.602.2024.01.23.11.12.05 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 23 Jan 2024 11:12:05 -0800 (PST) Received-SPF: pass (google.com: domain of linux-bluetooth+bounces-1282-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) client-ip=147.75.199.223; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=RfCYrKAQ; arc=pass (i=1 spf=pass spfdomain=gmail.com dkim=pass dkdomain=gmail.com dmarc=pass fromdomain=gmail.com); spf=pass (google.com: domain of linux-bluetooth+bounces-1282-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-bluetooth+bounces-1282-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ny.mirrors.kernel.org (Postfix) with ESMTPS id 457761C26BDF for ; Tue, 23 Jan 2024 19:11:54 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id CED8012C536; Tue, 23 Jan 2024 19:04:32 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="RfCYrKAQ" X-Original-To: linux-bluetooth@vger.kernel.org Received: from mail-yb1-f177.google.com (mail-yb1-f177.google.com [209.85.219.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id DFB4B823B1 for ; Tue, 23 Jan 2024 19:04:30 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.219.177 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706036672; cv=none; b=qX7mPdBGgGyQh/JBf79njIVeQXVOg33x70O1Rrnx70cXI/030PZ++YD0kMJNEXIiqi4tTB3Z87p5KpagbICureeKqabuGZ1Uo1N77Akc3JjQTjTOQxf+u4M7j6kQ91GdRsRq2Xmg2jV7ZQSYLHS+AeV90KhdgLzPPkKbGP0bCq0= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706036672; c=relaxed/simple; bh=UGCahzL9j8E6/1+8rATyqx+OYs9FSUt+sPq4nBsIyu8=; h=From:To:Subject:Date:Message-ID:MIME-Version; b=iI3wvwBKNdn/XMqwrHtnrw3EuV89PheKcCVL8UpPkkQIlv3MVtdvz/joGGGMAOPEiPjMgOyM6/B+2Q2XMzQyo4Qmz+nwH5OtoxU8G1abWtIU65O2cSYCRhmlFu7JH799y/2pOmnyVfZCFTaEMwwzKsrzXkNtekGFi3rsO/Zw3gc= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=RfCYrKAQ; arc=none smtp.client-ip=209.85.219.177 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Received: by mail-yb1-f177.google.com with SMTP id 3f1490d57ef6-db4364ecd6aso2828921276.2 for ; Tue, 23 Jan 2024 11:04:30 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1706036669; x=1706641469; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:message-id:date:subject:to :from:from:to:cc:subject:date:message-id:reply-to; bh=FvMoAzW48uPpe4rLWhtOHNstnjZwdQrZbl8AaLzm+G4=; b=RfCYrKAQegZjb9AqJEY2wvsuXqEMWoujGS6kTbQL5GY69XK1YNL93TcvF+Frur6Bfa S/LXi71c4WPtCcRDN1NG9FTgLKq0CIqfJPypgHitnnON0akZvQEgFOvsmLQG8+kCNALw inNBS7T29/h22VlNXiPkc/eG62EsurdSSB1O27ApXQ4X02rFviLjzcoyY+BhxMUYr0k+ btZUEPa/WpUvYNP2r764p+2eqZo/NUd3SNDS1DYwk22Sy2WqREsaOzP7XrYZSKIQF5cU lUA5V/tuR+w9c16nQmTULYU3IOrAUnC5b3/q7v61LYyScJg2cm+OYCxssvQh9UmaZdR+ gPOg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1706036669; x=1706641469; h=content-transfer-encoding:mime-version:message-id:date:subject:to :from:x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=FvMoAzW48uPpe4rLWhtOHNstnjZwdQrZbl8AaLzm+G4=; b=FBZEsuK2JRJk/hJXvNCKbIlouHOdABrcpukzo7IE64TtPMbEerZuqJBJZywLoqhuc8 zbLi5/ioacYkCXwhhWox69z4EhME5OkhsrUyTNWM1DLZ8zXfEwpsDXLKDIXVG/q9NCMp O1KCWq/JDwWMHqf5MjJIOwLUsr+9AiWyKS/9/0lmOthsgWJ3ln7FjRUZtnAPzj3YaWWr vIQSYBv1uZ+Z5rvagZe+C79kxCjpp8t7xuTE4JLWPdCKJJZQSpHVP6Y2lwPF26zF4qIt 1rKb2d6HGjb2/IJ5j4Y11IjsUBZoh3me7wmOybRegllemXB4p/p7wZ5b/yAvxyN+61RK 7l9A== X-Gm-Message-State: AOJu0Yyp4ogyJdvzcapNO1rvwOh/VWxvtQDNAH9n2Poy8CLsmHdlkJkL qs5V0SRWEo6cV9PMqNh/Tl799PLe5d8c/btHI2kIRtSMo9CSQjtupB2mPFB4 X-Received: by 2002:a81:53c3:0:b0:5ff:32a7:a31a with SMTP id h186-20020a8153c3000000b005ff32a7a31amr3325971ywb.84.1706036669181; Tue, 23 Jan 2024 11:04:29 -0800 (PST) Received: from lvondent-mobl4.. (071-047-239-151.res.spectrum.com. [71.47.239.151]) by smtp.gmail.com with ESMTPSA id x70-20020a81a049000000b005ff5fc95e2esm5590109ywg.142.2024.01.23.11.04.28 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 23 Jan 2024 11:04:28 -0800 (PST) From: Luiz Augusto von Dentz To: linux-bluetooth@vger.kernel.org Subject: [PATCH BlueZ v1 1/2] bap: Add missing Metadata property Date: Tue, 23 Jan 2024 14:04:26 -0500 Message-ID: <20240123190427.3031698-1-luiz.dentz@gmail.com> X-Mailer: git-send-email 2.43.0 Precedence: bulk X-Mailing-List: linux-bluetooth@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit From: Luiz Augusto von Dentz This adds missing Metadata property to MediaEndpoint objects. --- profiles/audio/bap.c | 35 +++++++++++++++++++++++++++++++++++ 1 file changed, 35 insertions(+) diff --git a/profiles/audio/bap.c b/profiles/audio/bap.c index 63bdbb52a53c..6184c9d178a8 100644 --- a/profiles/audio/bap.c +++ b/profiles/audio/bap.c @@ -255,6 +255,39 @@ static gboolean get_capabilities(const GDBusPropertyTable *property, return TRUE; } +static gboolean has_metadata(const GDBusPropertyTable *property, void *data) +{ + struct bap_ep *ep = data; + struct iovec *d = NULL; + + bt_bap_pac_get_codec(ep->rpac, NULL, NULL, &d); + + if (d) + return TRUE; + + return FALSE; +} + +static gboolean get_metadata(const GDBusPropertyTable *property, + DBusMessageIter *iter, void *data) +{ + struct bap_ep *ep = data; + DBusMessageIter array; + struct iovec *d; + + bt_bap_pac_get_codec(ep->rpac, NULL, NULL, &d); + + dbus_message_iter_open_container(iter, DBUS_TYPE_ARRAY, + DBUS_TYPE_BYTE_AS_STRING, &array); + + dbus_message_iter_append_fixed_array(&array, DBUS_TYPE_BYTE, + &d->iov_base, d->iov_len); + + dbus_message_iter_close_container(iter, &array); + + return TRUE; +} + static gboolean get_device(const GDBusPropertyTable *property, DBusMessageIter *iter, void *data) { @@ -360,6 +393,8 @@ static const GDBusPropertyTable ep_properties[] = { G_DBUS_PROPERTY_FLAG_EXPERIMENTAL }, { "Capabilities", "ay", get_capabilities, NULL, has_capabilities, G_DBUS_PROPERTY_FLAG_EXPERIMENTAL }, + { "Metadata", "ay", get_metadata, NULL, has_metadata, + G_DBUS_PROPERTY_FLAG_EXPERIMENTAL }, { "Device", "o", get_device, NULL, NULL, G_DBUS_PROPERTY_FLAG_EXPERIMENTAL }, { "Locations", "u", get_locations, NULL, NULL, -- 2.43.0