Received: by 2002:ab2:6816:0:b0:1f9:5764:f03e with SMTP id t22csp300658lqo; Thu, 16 May 2024 06:52:09 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCVuWnOAUDAB7FWqZk0J4ZL6d8wjiFU4KDLCZ0jV7rdJ3dQ0dFni6uZFSUyuABHFXzNWd8HgtYWOF+QH6+S0JgWCuGBTC/mz51HEDnUYTQ== X-Google-Smtp-Source: AGHT+IFrnkV4feW0cf5vLkR3mDXS5G1AKp0UsB2w6E7FhibnSwMQCiNfdR2kG0Tz1P2JCL08vH3z X-Received: by 2002:a05:6512:2356:b0:519:6953:2ffc with SMTP id 2adb3069b0e04-5221007027amr15040216e87.42.1715867528997; Thu, 16 May 2024 06:52:08 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1715867528; cv=pass; d=google.com; s=arc-20160816; b=KuHjig5nBWYOdcRNdUn+hDf2IOrSDYI0J+W9cb7U53zQx5bw/hk+q5Q8EittmhgK+Y nmNni4IWwFUlnVgI0oY27UXGvaGvnWFl3dNYcoFleIWZMlFQ0Zq19zHDX9mw22AeuBZL 7/jLghTBV703OopbF5nd6QBSiUub24zGhpCHsbbDPUg8Ewfk9G2DxlsADii/ZQQ1tKam kiFIWcBlG4nlxr/tGrQdnKjw1GkNpu61sbxsxx2MXz1mWLZ2UPBXRAAojdGf50cFYbtR JCIDtxGiZAwblx0P7U3AkUKfa+uDpPNoKeN/mnhiWS4FnliYTLwuup6uoFhQO9wy2Wov ouBA== 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=dqSpV7fmg1v3Tem3cwAYpfCqBii01pFKWcG15GV8olM=; fh=Gg33OXRnrPRrTdx+nczYYEEAdxDOorVRrtzYqt0L5Tg=; b=rgcRwm3uR1aiZetHo3B7yLgH9lCD9h9U3fsZCj1oVhLTWCWVanWrxjRquS2P21B6q3 dQ/A0qpmTAhk3x44lv3kZzjkpifuO2gRMrM1zKfEGrI/j25Tv3lrujM4EY6ZApStGoNE mlFIJZwJNiPtinDs03vpwVxZAmwD1z/tr7m4bSTeo/W3x0G2SfP2ljBEFOPjH3hSXbuk gK7CWjAqgAfd8eysjVmtR+K6YCU7x3YefMqThoSb8W+HG0a8p8y2W7vDJa7Jz4MEuBBC 5DZixgt5sJkkzPSgmNkylngv+A9qsoOGCRYtXSJloufVHbSeqnZAowHKskwuzSDCWhkS 4/0Q==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@asymptotic.io header.s=google header.b=sUDO5aDA; 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-4666-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-bluetooth+bounces-4666-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=asymptotic.io Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [147.75.80.249]) by mx.google.com with ESMTPS id a640c23a62f3a-a5a17ba5866si826279066b.657.2024.05.16.06.52.08 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 16 May 2024 06:52:08 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-bluetooth+bounces-4666-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) client-ip=147.75.80.249; Authentication-Results: mx.google.com; dkim=pass header.i=@asymptotic.io header.s=google header.b=sUDO5aDA; 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-4666-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-bluetooth+bounces-4666-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 am.mirrors.kernel.org (Postfix) with ESMTPS id 73F561F23696 for ; Wed, 15 May 2024 20:16:34 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 685CD15B10F; Wed, 15 May 2024 20:16:23 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=asymptotic.io header.i=@asymptotic.io header.b="sUDO5aDA" X-Original-To: linux-bluetooth@vger.kernel.org Received: from mail-ed1-f44.google.com (mail-ed1-f44.google.com [209.85.208.44]) (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 B8F0E2E3EB for ; Wed, 15 May 2024 20:16:20 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.208.44 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715804182; cv=none; b=PAt+Nf1a+LmLIXKT935fqW7egEKyvxhTxaYzF6BFXDEMH8xmdqDnyWtkxRvRldL3Vr5A/QcSwp9OvWySrAg8r98grcKv6Dkc0SzLbcJ6GyIT97s8/gJZm9WCp5UhuTciT8REtfAIMW3DhcPOrhCCaLyZPxJUn5bEZHleUxheJVU= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715804182; c=relaxed/simple; bh=gbVMrPY70hNGVRJcd+ramq0kJAcmnRVOFYt+seXkXT0=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=f001cIyb9b1oJRnlwcw9VvrKAYIhh4wMX0Q+H5FHbNou9e0KaBcJ6dSfst1CmGMXMttqLg1X363C+57H2eoOCYqWLpID/BxSliM+JKqUtfHyXfBAAHRx7LRrAvW3vT5GzuxueIkaJiS9oJZJiw5WZCepfm2Y+US6oEcXcybXhv8= 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=sUDO5aDA; arc=none smtp.client-ip=209.85.208.44 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-ed1-f44.google.com with SMTP id 4fb4d7f45d1cf-5731ffcc905so2634646a12.2 for ; Wed, 15 May 2024 13:16:20 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=asymptotic.io; s=google; t=1715804179; x=1716408979; 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=dqSpV7fmg1v3Tem3cwAYpfCqBii01pFKWcG15GV8olM=; b=sUDO5aDArZEp/n/zZgU3IOKCw5iX0FDejJoNLxdcP7vPzut5pZH3QXs/SJ4Zu769Im +Wbg9oUXHrHV+PeTKLgcsGt51uv+Jk52C5MEvK6sHonPGJj8IqFDUWNVBk+f4nK5qdDV bQgbwfByLFgm2wqCU8MNTQXvb4yG6PbA5/UqelFFySS7Cz2IVO8jNH6D2GtWzOWbD70Z 6naRcHYGWO3RUJVtNmB3fG6swFjQT26giysR7n/JLlmPcyCxPmeJN1m8zgaaEmqG40kg mGDfblfqYUulXzoGSd7FzqSffknTNaQrSO1OMZoqEn4sUcpTIyqVMW5QSkOP/gq5yTAR L0zw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1715804179; x=1716408979; 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=dqSpV7fmg1v3Tem3cwAYpfCqBii01pFKWcG15GV8olM=; b=tOjd/UKUOsaJvz+MBflDwbl7VW5n05+771CZEAFmY2l2e9z6oznp4VtTi4TnKwcQX4 Qe0KSPJR05znVwj2TW6+EYI3j8ofbaf6E5cUc6ibaJ3KJCxJ/RjDrhijFU8tgT7jjSm3 CsrQoi+Wty3aA2y0S92qwI8PM53V3N6IvfBzRtw1E/YwGQnsW3Nd9kxrZXtDWGfTzKn8 VOR8b9799/AmK6KPljGCnmgseVge1nNh28EnWRo9CbqY7V3kaQs6T18ZN6Vgjiw/xpJn 0ery/toIPJ5nuX3GHmAWy4krRRw0Ke5At2qBpAwRIrMOLzQPgYphfTGKzknwBQIjb9YH YDcQ== X-Gm-Message-State: AOJu0YzSpP7ry0ckThsV2fAwrGo23aco/PQgGQ1PNfleKxuZcnl1KCm/ tJykc3g74SDcvUzybgJ+UxOa4kBacLwlv85492Avjl3CzeVxj3moA1huJLjl2XF/qR4bFMcppF/ a X-Received: by 2002:a50:aac7:0:b0:572:71b2:e200 with SMTP id 4fb4d7f45d1cf-5734d5ce3d3mr11343963a12.22.1715804178686; Wed, 15 May 2024 13:16:18 -0700 (PDT) Received: from andromeda.lan ([74.15.47.99]) by smtp.gmail.com with ESMTPSA id 4fb4d7f45d1cf-5743065dd09sm7457142a12.64.2024.05.15.13.16.17 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 15 May 2024 13:16:18 -0700 (PDT) From: Arun Raghavan To: linux-bluetooth@vger.kernel.org Cc: Arun Raghavan Subject: [PATCH BlueZ,v3 3/5] test: Add a script to test ASHA Date: Wed, 15 May 2024 16:15:50 -0400 Message-ID: <20240515201552.1831618-4-arun@asymptotic.io> X-Mailer: git-send-email 2.45.0 In-Reply-To: <20240515201552.1831618-1-arun@asymptotic.io> References: <20240515201552.1831618-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). --- test/simple-asha | 158 +++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 158 insertions(+) create mode 100755 test/simple-asha diff --git a/test/simple-asha b/test/simple-asha new file mode 100755 index 000000000..bd2e05ce0 --- /dev/null +++ b/test/simple-asha @@ -0,0 +1,158 @@ +#!/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