Received: by 2002:ab2:715a:0:b0:1fd:c064:50c with SMTP id l26csp133307lqm; Mon, 10 Jun 2024 15:36:26 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCVuflNEdPpSRm6MqtmYW4FRVyPB2lHx5xqiOMaWgTvb8YpPJjDxyrav/o5EHHDXXoMJBjTUV5URyxBeoq+rSsMhH6ukqYsVYXQWsEngsw== X-Google-Smtp-Source: AGHT+IFtbHeFUwahbOce0+0XJfSux7wu+l91JHOymp/E/meAXubticwO53QUSrQSkAcws/0ue8nC X-Received: by 2002:a2e:bc09:0:b0:2eb:dd68:b50e with SMTP id 38308e7fff4ca-2ebdd68b860mr50662611fa.9.1718058986217; Mon, 10 Jun 2024 15:36:26 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1718058986; cv=pass; d=google.com; s=arc-20160816; b=uedmWWdLuISe0StzLCqaXvQIgILkpFArGp6pRvaPlHaEzfS8ekIg7h1/PQPJO3OBHY cI9wnQA6LZPajAe4w/y0feftPKJkFzvn0OLqVjFg7OUe0pPG8kIQPhnWjnEWq9fMTIs5 fa0BBsW4wIPmmIBrgb/do3HkTZkIzZzxlihnbUoGk1ljEMbjKcBDkwEDWuP0/WD8y4Le xQIV2xOxb/lnESqdvYvanXLBCGP7GY1ClL7+108AVmnm0WNF1rzBzBcjF3G992s3npK/ xRfGYQP2+1svrLlaf+dzhextFR4tYyk07RUK7gkTynSp9IfBK8jZ9HUISEKWStoc3mc7 8+Ow== 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=0v2d06+guO1PwQL/lLWpqf8Gb8WpYdr2rO8E1Fh0RzE=; fh=Gg33OXRnrPRrTdx+nczYYEEAdxDOorVRrtzYqt0L5Tg=; b=oYom4DlDqUUVrItrfh7Rq23HNPdH7C2xUBp/OBHGjxrPTb9AgQrck4loxXvPPaZWa6 1r1VcvpvosktZmNGwfpp5J/ZSHLfdcqysrVSMF98dCzxdf63RGYP6QMf5CTAmJlCkGmv 1eCVYjmWdmR9bgOAuhfZxk6jz6FeIgnADIv1+2BI5XA3DrLIV4+zUQq3WfgTdGXnxTSY D1OtmDgDK1cuJq7k7IAEulOx9FJErhmjcHToxNnpszYRB/q4xt5ge8BS8wxK2XHf8XAw I6ehFpBlHsWHE+g/SVB6GjI7bNIr/jdoP1PqP3Zfi6Nu2WZsdONp9sK9Qn6NmnxKuQvN 7JKg==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@asymptotic.io header.s=google header.b=KyE0OWE7; 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-5244-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-bluetooth+bounces-5244-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. [2604:1380:4601:e00::3]) by mx.google.com with ESMTPS id a640c23a62f3a-a6f2f12e860si56125766b.564.2024.06.10.15.36.26 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 10 Jun 2024 15:36:26 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-bluetooth+bounces-5244-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) client-ip=2604:1380:4601:e00::3; Authentication-Results: mx.google.com; dkim=pass header.i=@asymptotic.io header.s=google header.b=KyE0OWE7; 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-5244-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-bluetooth+bounces-5244-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 B10991F22A2B for ; Mon, 10 Jun 2024 22:36:25 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 8C2B715098F; Mon, 10 Jun 2024 22:36:15 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=asymptotic.io header.i=@asymptotic.io header.b="KyE0OWE7" X-Original-To: linux-bluetooth@vger.kernel.org Received: from mail-qt1-f176.google.com (mail-qt1-f176.google.com [209.85.160.176]) (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 5DF2C1509A7 for ; Mon, 10 Jun 2024 22:36:13 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.160.176 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1718058975; cv=none; b=lLaur1S0oI7tGfMQydV0RgBCPqzF3uQCJlZMqgn2z+e5XMUWN7KCYstOzidKnD/nty/9i+OwNyfyel/9zxsBQ7Ak872zYU6GhhLjvU4b6ruNBMNfID8o9pWI4Apg7Wh8r8TO9TY5kOJ39TuMwVE2KPcNX4y58CnRm5wc7Tzzip8= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1718058975; c=relaxed/simple; bh=nPDywn0tj8lVWC6ia1S1axYcky1wisRxE01rfCsr34k=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=HtrbU5rMwLyBrOXznU+ExFXAzBnZmSKq31BnbbzgNqLPzTULxXNG669ZG4CCPUa/s6e35QBN3ROcWb7SmN7T9uedEwH4pbAlp+iTFPvd66ltUovNm1BODHTDcPeHnLtQPLV0Q6aYSDeN0JTCDFPf37opszZAHVGUZmOQ8cxCDJo= 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=KyE0OWE7; arc=none smtp.client-ip=209.85.160.176 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-qt1-f176.google.com with SMTP id d75a77b69052e-4405743ac19so19659081cf.0 for ; Mon, 10 Jun 2024 15:36:12 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=asymptotic.io; s=google; t=1718058971; x=1718663771; 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=0v2d06+guO1PwQL/lLWpqf8Gb8WpYdr2rO8E1Fh0RzE=; b=KyE0OWE7nH/q/im2GkkEshg6f+V8bXs+I+cfeVpFO25ADp1iXJ6W66VyJiFq/5OK/Q BnFNDutxuM3sWqrjYQXjE8sQoPu1+N4/DBpyfwb5trM3PJAB6+NyiHq2xonxDKdl4eok DHfsK0c2w82RMf8PTCOqy8wCuifnc9MLB8g+KLZK+r0EnIBlwTJFFfMduuphSOI9dRyp pI+TEQ0vEAuAXQjt2F/pjPq1V81+Z9xhhN0ILrqNxxlVkookuez0dAZ94fR70yqlmzmY jgZKaMvmoEc7ucAsj0vVYOE5xLH75yTpnjousFzpFnzGD/8FtnKLNo/cBGxs69Gkr9W7 xXUA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1718058971; x=1718663771; 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=0v2d06+guO1PwQL/lLWpqf8Gb8WpYdr2rO8E1Fh0RzE=; b=rzeBv2Yn8xXiTSa1O2lENmjQqmefH0HPcrs6tvgp7L51D55TYe0t2m95nLyqvuz7Cb oX/oux/f6LU2QPxmaE5yCl/JlDbl5JUzUTmutjSOnAVSUqIJto8hGo8DojWNu5XAIma7 5lI1hngl21sGvMqjvuW/MHGN2KdUzO38MLfJtRZ5PYXY/mqBKUKH4OOqGYBVF1ULFWEc CJgDPc6aGRWXUxGrqcZya1TJq+Rx666rYDHVvdqnlFSauznn/LHtM3N6Qdi2QhVbIEPe gpFP36uF7viKm8pQvb6qMg+HYWztalbhkXkJuggRMHr2Bb8g1N2gofZ8YLflzH39Thga 6LKA== X-Gm-Message-State: AOJu0YwNIUBoTHZV+nElSDOGrSJF9eMesxQ58E70FpH6ZBfnZnrFUkYN imrj9V7pM301bNwK3OUl+BwuInNc53Iq/f86E+SJ4k1uNFCjXFaY0ay+HKQNJ816QhofLo94sYO C X-Received: by 2002:a05:622a:281:b0:440:97b5:cb with SMTP id d75a77b69052e-4413ba8d789mr20481211cf.32.1718058971307; Mon, 10 Jun 2024 15:36:11 -0700 (PDT) Received: from andromeda.lan (bras-base-toroon0359w-grc-41-70-27-101-40.dsl.bell.ca. [70.27.101.40]) by smtp.gmail.com with ESMTPSA id d75a77b69052e-440711c3c53sm16283221cf.80.2024.06.10.15.36.10 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 10 Jun 2024 15:36:10 -0700 (PDT) From: Arun Raghavan To: linux-bluetooth@vger.kernel.org Cc: Arun Raghavan Subject: [PATCH BlueZ,v9 3/3] test: Add a script to test ASHA Date: Mon, 10 Jun 2024 18:36:01 -0400 Message-ID: <20240610223601.378127-4-arun@asymptotic.io> X-Mailer: git-send-email 2.45.2 In-Reply-To: <20240610223601.378127-1-arun@asymptotic.io> References: <20240610223601.378127-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