Received: by 2002:a89:d88:0:b0:1fa:5c73:8e2d with SMTP id eb8csp901047lqb; Fri, 24 May 2024 18:52:37 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCUxB+5YWaveSkN8x5S+OxwozAn1AdPVa4WcFKBJZqNvekgIyY5AJTY1eGzAgJx+gDMyjGyzFgEpEdfPPtPye5TF49JxMybQwxsFX1E5nA== X-Google-Smtp-Source: AGHT+IGygo+AeJ37UmKRV+Ss9/lZi0zcsoTg2w5I3TIAOXoPMCGU7BfRg3LxfBpZQcgaR6jQNmbr X-Received: by 2002:a50:9e2f:0:b0:56b:cfef:b2de with SMTP id 4fb4d7f45d1cf-578519be5c2mr2884415a12.26.1716601956808; Fri, 24 May 2024 18:52:36 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1716601956; cv=pass; d=google.com; s=arc-20160816; b=WMmZuTpw1ylyYOVq61XCEYgwGgl8RsXcy1VYw9ui7xJ+Azs8n5b3dUQ5F+FHAaHq33 AAahLUAKfB7m7Wf0xlJ64jqUFagwexYeEOR7nRRbNlpnGaQQnni/klXPKOXLIrm+ZsYz LJs2Dt6DcP6QOPXLvQNfHD0DXOmnjBsj7TSbf1cRxgZM+AQUolJ6qriRMKPii5WkJGtc H4PORHc+JgcxpWJdF2uAAiPPd9tV7GrXJkQbM8Uo76dRtw2A4iQ3Hg8gyTcBnajx/qiF OfYuupTe419llwHFVrBnT5AtEB96B31DkTodFq+mkqILGAMcwneCjblpN+pN480o5B+D 3ffA== 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=Pauh3OFCW1CJgYFyOsqdbbndY3lRlzePb7/+UlEtxfs=; fh=Gg33OXRnrPRrTdx+nczYYEEAdxDOorVRrtzYqt0L5Tg=; b=HRkI+1YW1TdqB3v/oSzyobOrEos9iZFmpmNOEdgVcIDaFv0v9v4snXgdaPw4eXAVMZ ZvM68xMwECPZqiLyYDxTJq+ItshvJ+nsv0Va5jT4/Be72Fx7+or7xqUMkHfXwSXXqRIk D5XEDCT7/FBml2MHlOS3Y/Jbw2XKU1MhacTN0IqhnofPSyPUNRj/GovSLrF/MScWonvE LsmpFd/cr5Erpa5YmpLNTSRBzY5FTXW4zyOyONls/k6Yv+ETzKVfiBxXI9uGMALeUBoc PHBOgFW9NKomKxmQl4GcCQLp0yJSP/A1rX5MbiigKc6rhhnDOazBxdcFeDhb+2pEedI0 4EYQ==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@asymptotic.io header.s=google header.b=YJCW81e3; 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-4902-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-bluetooth+bounces-4902-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 4fb4d7f45d1cf-57861cb3581si806267a12.557.2024.05.24.18.52.36 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 24 May 2024 18:52:36 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-bluetooth+bounces-4902-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=YJCW81e3; 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-4902-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-bluetooth+bounces-4902-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 D7E2C1F22BD7 for ; Thu, 23 May 2024 15:53:28 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id E7E88125C1; Thu, 23 May 2024 15:53:18 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=asymptotic.io header.i=@asymptotic.io header.b="YJCW81e3" X-Original-To: linux-bluetooth@vger.kernel.org Received: from mail-ej1-f51.google.com (mail-ej1-f51.google.com [209.85.218.51]) (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 62563134A8 for ; Thu, 23 May 2024 15:53:16 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.218.51 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1716479598; cv=none; b=BfJLCNLtmA/WeKkEK9jtqrw+4RgHodvAQrXZtEl3g23GG5OhIJPIncgXL92KN0RUWTvFbgkHJP8pGrqCqrnWFeVYVJZzutYUEJvatrifAFIQ0ppHTjToImIzrk8XIqpGeokBA1C7mLND6yb5Nhhll0aEsMsOSjNa1LZCUoJWitY= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1716479598; c=relaxed/simple; bh=kTXOnNSQePf4pgiLORlZ9YxnWTryJR4pVGlUK03V0yk=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=ek0lTUomeW84PAs28v9glfsvJLKCi3lZR6nIUjLJ7nv0Nb+WHh9yHtEFeKyiC6oUD08VPH92R3KaNvZl2HmhhPen+7M27aej3BP9+11dkM7a3KGoB7KOAcbsOtA6CSWL2085V+SGry/a2/3zhfhF2bm9fBla9L/R4S0DpWMHFfE= 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=YJCW81e3; arc=none smtp.client-ip=209.85.218.51 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-ej1-f51.google.com with SMTP id a640c23a62f3a-a620a28e95cso417723466b.3 for ; Thu, 23 May 2024 08:53:16 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=asymptotic.io; s=google; t=1716479594; x=1717084394; 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=Pauh3OFCW1CJgYFyOsqdbbndY3lRlzePb7/+UlEtxfs=; b=YJCW81e3sz/aVGds8n2Vyd1q8yweECOB9WVnK9tJF4FspT7UUYKSAnY9CbcnMKxZfA o3JhEsvFWcGMXKIB8HgYpPZvG4KmZEXpSMmwV3gPI9TlJkZI1QDc56LgMAynrXUeX4JU gYaWFcDZn79mLu/ufaVRtHGpY1PFseiwguNYBvTRGhOYfQ7QTyXFEa9iaiRWNAmw2J7k nv4Muop2btM8V5F4PA1qF7qLVlvwBdjYC0gMWC1L84kMma/JFzSdzpbVkBkCQ+l4JvmS p5x0tlUjS+biIMXwVDC6zOLjwbz0GLLxH6p4EQCvH8jvOVo+nftoDFyvT/YGKvrpHU52 bXRA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1716479594; x=1717084394; 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=Pauh3OFCW1CJgYFyOsqdbbndY3lRlzePb7/+UlEtxfs=; b=WUcQsSia1OA2oaZp18n1CsiDEE3+ll1zG2UAYKa2Q3oTI9VAYphqrTRB1oRgit0jj/ GkD3gXohzeOkqFCW1AdAFU06Na2m6EETxUUuba99VV7gfgQC4Xl8HDmWvRkZrK2+yIka W7tIUPQ0uGusHC6L07gsfcSzSd3ss8381QLTzmmVt7hSg2jRIjTnoYuGq8zCP8QAvTGO ow9wcdYzMRv8HVyawMXkE2mitU996zgKrLgGlWzQG9ukBbin9aKbVuK8d5heSHFfPXzR VbyVXwFmDaNi9fRDQq3H/Idh+L0ydBhZB11U1V45LyC3is8r52dQOr33GjW0AYArE2Bn VUrQ== X-Gm-Message-State: AOJu0YwD8vwTq3qWLFqRdbYmXulhMUg+l8FzqSPfsm1QrVJTaWy/ZA9I sUcF5iIbiKw/olQgSKbJZkpJDeB3txc4/WsW9MpJzrIJsFhhLq8C+bJ4cN3ZXAAMY8R/E/qEXJZ 9 X-Received: by 2002:a17:907:a0c7:b0:a59:d4f0:cfc3 with SMTP id a640c23a62f3a-a6228125461mr342422966b.59.1716479594641; Thu, 23 May 2024 08:53:14 -0700 (PDT) Received: from andromeda.llama-bortle.ts.net (bras-base-toroon0359w-grc-41-70-27-101-40.dsl.bell.ca. [70.27.101.40]) by smtp.gmail.com with ESMTPSA id a640c23a62f3a-a5a1787c686sm1947600566b.47.2024.05.23.08.53.13 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 23 May 2024 08:53:14 -0700 (PDT) From: Arun Raghavan To: linux-bluetooth@vger.kernel.org Cc: Arun Raghavan Subject: [PATCH BlueZ,v8 3/5] test: Add a script to test ASHA Date: Thu, 23 May 2024 11:52:59 -0400 Message-ID: <20240523155301.140522-4-arun@asymptotic.io> X-Mailer: git-send-email 2.45.1 In-Reply-To: <20240523155301.140522-1-arun@asymptotic.io> References: <20240523155301.140522-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 | 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