Received: by 2002:ab2:6c55:0:b0:1fd:c486:4f03 with SMTP id v21csp701260lqp; Wed, 12 Jun 2024 13:37:50 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCXtD1xxWZ0QVj6+kCWdNERT7Mco0OH92NidvrUrMkcoHMg/8EK7yqy4gsItb9GuZ+5L7FWucOyc36aYxOzjnfQ3HY5LiozaE6gaiyOISA== X-Google-Smtp-Source: AGHT+IHr3crx6sQWfv6LzYKbcAN4ElE8YZEKZCsx9HnY/M+XfkiYrjzFstbMy2vvJup4CaYmBpUF X-Received: by 2002:a17:902:da83:b0:1f8:3f13:1972 with SMTP id d9443c01a7336-1f83f131debmr25528025ad.28.1718224670355; Wed, 12 Jun 2024 13:37:50 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1718224670; cv=pass; d=google.com; s=arc-20160816; b=jtDBGKxI4TE/lhUW2H8IOOpbaOtOx54ILZuNaBkvZ8GYhwhGAr4tpOr93XoDVMPEsO XS9LlNb96LXLmwr2ltQVQn0el9eB5lgnXszmje9fsxdTQK39PUD39nFRjJHLDHtJ83p4 rJ5JDB+iXm99baEqLl+NrFPUuMS4TwAb0PNaUgEpP8cmAEPDj18k2w05PZdzY/1wMmoh BgkcMo+HGqdv3BRnMvOm5tobIRpzBCmo/S58oIU40t2szeJa3Z5LhXi/nEghGDoJamON +riTIyeTt4pqx9uFDVsqKdKoiqkkFkapuvisump7BU37XSwgResnMvbIWoFCnGC4Fvtw q2ew== 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:references:in-reply-to:message-id :date:subject:cc:to:from:dkim-signature; bh=VIPQ2p2JQ9cgzYNS6qKd0wXGcyBXoGdSDweRnIvgR1k=; fh=Gg33OXRnrPRrTdx+nczYYEEAdxDOorVRrtzYqt0L5Tg=; b=l8Q6tSh65YnyanukUU7u+YW4pRset/vdGof7VG9Moe9xIChFEZCRCHWt1BMngVqHoG D3c8Q13X8SWlnrC6F6v55yvk9uYJJrBHG5BM6e9FXDZ72p/gQZKusPtx0HeNp6aJjLHF Vrd7dgB808KwPGwdJZxBtQC4feCr2cnl8H19x3v8wxJZ3OqXT0kwEY5NzsyfZqW85QeU NgCe/G0rTYtAGHGPzpbzFjQGbJMPL2hmzH1BqL3KLEpGSBgwZfpyOAlm9U0p5vD5NeYX ewWmSsNr4ysfBgwNLviGG6OMpA68Kau0n2dA1q87cs+9c5T2C5qbFb5o0JjhqM6H3wDr E8kg==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@asymptotic.io header.s=google header.b="nG/sN4AJ"; arc=pass (i=1 spf=pass spfdomain=asymptotic.io dkim=pass dkdomain=asymptotic.io dmarc=pass fromdomain=asymptotic.io); spf=pass (google.com: domain of linux-bluetooth+bounces-5289-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-bluetooth+bounces-5289-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=asymptotic.io Return-Path: Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [147.75.48.161]) by mx.google.com with ESMTPS id d9443c01a7336-1f71a023ae2si58364175ad.296.2024.06.12.13.37.49 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 12 Jun 2024 13:37:50 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-bluetooth+bounces-5289-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) client-ip=147.75.48.161; Authentication-Results: mx.google.com; dkim=pass header.i=@asymptotic.io header.s=google header.b="nG/sN4AJ"; arc=pass (i=1 spf=pass spfdomain=asymptotic.io dkim=pass dkdomain=asymptotic.io dmarc=pass fromdomain=asymptotic.io); spf=pass (google.com: domain of linux-bluetooth+bounces-5289-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-bluetooth+bounces-5289-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=asymptotic.io 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 sy.mirrors.kernel.org (Postfix) with ESMTPS id 182F8B23CE9 for ; Wed, 12 Jun 2024 16:23:12 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 9EB4A18306D; Wed, 12 Jun 2024 16:21:17 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=asymptotic.io header.i=@asymptotic.io header.b="nG/sN4AJ" X-Original-To: linux-bluetooth@vger.kernel.org Received: from mail-qv1-f53.google.com (mail-qv1-f53.google.com [209.85.219.53]) (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 68FC5181BAA for ; Wed, 12 Jun 2024 16:21:15 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.219.53 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1718209277; cv=none; b=riJqLuCdSYB7qy/svIJrAxs5r5n7RaqbjriPlocA90HkzVxxnk30kHD4p0DxyEoxKgCcSbtMM0LNG5+DdTweuL6D//midgxJr553WQ00c0z/zTS7+LNLd15AlXSQRr7p1sge7j0JRgok0y0JubB0fFzf3n8WgEQo1Mh9P0nQ1os= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1718209277; c=relaxed/simple; bh=LK8PRW7YnqLwZKI1w6ie6G28qbhpou+6p4JjGEvZEvA=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=K4xjizne8XbMkQALRc488rksRPRTvjkR5XvhfvUP38mIKl7ghPL1PM3BScDySMHNMA3mnDd8ndCpdanz10SphumzXIxvhSKkISiCpQrq3+iF3uQ2Z5sY6Ymo4DH3lbZQyVnjPM/tXrcY/93dwoyUCvN+89mn3ViowRp7X8JJJe0= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=asymptotic.io; spf=pass smtp.mailfrom=asymptotic.io; dkim=pass (2048-bit key) header.d=asymptotic.io header.i=@asymptotic.io header.b=nG/sN4AJ; arc=none smtp.client-ip=209.85.219.53 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=asymptotic.io Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=asymptotic.io Received: by mail-qv1-f53.google.com with SMTP id 6a1803df08f44-6aedd5167d1so13429536d6.1 for ; Wed, 12 Jun 2024 09:21:15 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=asymptotic.io; s=google; t=1718209274; x=1718814074; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=VIPQ2p2JQ9cgzYNS6qKd0wXGcyBXoGdSDweRnIvgR1k=; b=nG/sN4AJzq1Bx0qGi59jTtw3fxLeYG8O1WQBw1olxFCF/+dV6cokaqhrdQUXkmZ0ld 7+NL79X3X4H0jas6HMvuxVMpPt4IyuW4wrEa4YHRh3xxF8c0RWVKye/2bRRmxdRYdwdy Zrbr6894vxaCkk+yrDuHO0GMX/e37a9GmPWLGH/1IzbABWEwOGs/lx+8xysCBhFHbGXR h21O9Q02/OIkU86HpZY0/l06VLUNgkeuLb7Q9hfE1nNo2wdYnbj14U3bwypBFPOHNarz JWsLgRzqEFQLxuMP0yGXnvtG+nA5ij+rDd7uQ/NU3cAyG5Gzm8lMee0kaYoXORmWd0kg dj8Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1718209274; x=1718814074; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=VIPQ2p2JQ9cgzYNS6qKd0wXGcyBXoGdSDweRnIvgR1k=; b=dY2+ur/S+a0mF6Yp7oiesUNIMk7GvjoIK1UP7lprDJmBGRUjVMzw+ITHD01AA07X5B e1SjEad7e0cSj8udRLDeKK9Oduf6jHZ6i+v1Kjc30YPTSGRfBnknZAaWxVbmLjzf3Ow0 Qw3LiFiiVx0vuMNmN0bbY949gAFg7BH+enrgs87rRDMVrvz72N8Jc1P2BODxqxbEY0jZ bJQx5afAczb+FUGnIxKYATaou26i110MNq7C07wagx9rmFvW6LeW5TCokCo8c74uVktP HZhYJmQkS8iN7LhTQTHG4M1UxfA0zP4AQSl/6Gn7IVPaYZNtg+acczedZnLUTm6SjJpJ SMZA== X-Gm-Message-State: AOJu0YxQ/o5fja8S2UPfEAbGjBFlrDP+VPACJdHqzW59IoLkYELGmw+w 31RwxNQlEwWQNmthAmia5Ug0wJqakgkbX7Db22m7cxvYwzNsJ5dPENywC/lyqVYVnsZ9WtENDyk rWTA= X-Received: by 2002:a05:6214:5541:b0:6b0:8b2d:b6e with SMTP id 6a1803df08f44-6b1a731aeefmr27964216d6.63.1718209273089; Wed, 12 Jun 2024 09:21:13 -0700 (PDT) Received: from andromeda.lan ([70.27.101.40]) by smtp.gmail.com with ESMTPSA id 6a1803df08f44-6b089aa106csm21899616d6.127.2024.06.12.09.21.12 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 12 Jun 2024 09:21:12 -0700 (PDT) From: Arun Raghavan To: linux-bluetooth@vger.kernel.org Cc: Arun Raghavan Subject: [PATCH BlueZ,v10 3/3] test: Add a script to test ASHA Date: Wed, 12 Jun 2024 12:20:41 -0400 Message-ID: <20240612162041.689679-4-arun@asymptotic.io> X-Mailer: git-send-email 2.45.2 In-Reply-To: <20240612162041.689679-1-arun@asymptotic.io> References: <20240612162041.689679-1-arun@asymptotic.io> Precedence: bulk X-Mailing-List: linux-bluetooth@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Plays out an audio file to the device. Depends on GStreamer for media file reading and decoding (specifically, gstreamer core, gst-plugins-base, gst-ffmpeg, and gst-python, or equivalent packages). Resolves: https://github.com/bluez/bluez/issues/481 --- test/simple-asha | 166 +++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 166 insertions(+) create mode 100755 test/simple-asha diff --git a/test/simple-asha b/test/simple-asha new file mode 100755 index 000000000..c90f8a12b --- /dev/null +++ b/test/simple-asha @@ -0,0 +1,166 @@ +#!/usr/bin/env python3 +# SPDX-License-Identifier: LGPL-2.1-or-later + +import os +import signal +import sys + +import dbus +import dbus.service +import dbus.mainloop.glib + +import gi + +gi.require_version("Gst", "1.0") +gi.require_version("GLib", "2.0") +from gi.repository import GLib, Gst + +import bluezutils + +mainloop = None +pipeline = None +seqnum: int = 0 + + +def signal_handler(_sig, _frame): + print("Got interrupt") + mainloop.quit() + + +signal.signal(signal.SIGINT, signal_handler) + + +def usage(): + print(f"Usage: simple-asha