Received: by 2002:ab2:6816:0:b0:1f9:5764:f03e with SMTP id t22csp932605lqo; Fri, 17 May 2024 06:12:14 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCVBTVcscB8XPFQdOo1qlTEfBiqAr7ievxyUTMCt3c2EW4fFFm71Ebk+5aJU46eQgQ3Fhay2t3KpOpC4OrlCKRIzogv7sQpoL4BLZtpQkA== X-Google-Smtp-Source: AGHT+IGLhLBxhVRLU/u7zKvFdiStKI7yWqtPU7zdVwuJtZfD76eLy8JQMY8BZpcHRpVTZ3fxUqyg X-Received: by 2002:aa7:d74b:0:b0:574:b113:6677 with SMTP id 4fb4d7f45d1cf-574b11366ecmr12714536a12.17.1715951534460; Fri, 17 May 2024 06:12:14 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1715951534; cv=pass; d=google.com; s=arc-20160816; b=s0RQPVHfKNJPr09yoOI0P9fgmcnl6EitTXRCoDKmrf8xLNd5/YLfuqgXZGK54EA/6/ QEaE3MRUCxXjpXB3nO33m5y1H3QxJVTTwRD++/D+pJMpvZvHFljXMFPbhTlauzqlY9Tm ONAufbwbV6H1et75l7WBK/Am/dXQCE0kCXMUso131WFJnYFgEk5wwXfTSYxYQIMDEEPy SI+25Tag2sgE74Xb5we/CcJdRI25R6VZAztBJj8dK2w0cOnCB3bAXdbj/MZvJrLBno76 FslOOq7zTIXOxey0ES+B8vVSyB9UBMbNh33t/Dzo+3a32JcXhqCmJQdtZhwSYXYBr/Xw Flww== 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=pqP7Ve7yMXHfeJiFWVviPzQaEDVWQjkJ/Q6GXdQCFHSqDrb/RuZoxdYswDRCUU4xMW kgNQOY5a0hjmoQGLVBEHU1u9i+TILfyFjZnFmWhDMqbiKHqhO4s359izH1X4KFNM481n xZqGMcdc17f3g37bVbEEWRlTpe+SZeUSt+9MFZKAXgF773UQbILM0UZZt71cxJLt193l R7CF9T18qhWyii2w/20U14IDVsEOU1lLu6+fasbbW6Inkwyl7IQDw1kh3hctsleObzkG LyOBvR3jRexPPK/l5itP4WZ1REk1/n/qoBuzomUAu1aUnd94hbQ/leyPld7bL4IcSV1A mCQg==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@asymptotic.io header.s=google header.b="ubTjf/Fi"; 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-4729-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-bluetooth+bounces-4729-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 4fb4d7f45d1cf-5733c362a33si10160251a12.517.2024.05.17.06.12.14 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 17 May 2024 06:12:14 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-bluetooth+bounces-4729-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="ubTjf/Fi"; 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-4729-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-bluetooth+bounces-4729-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 A76131F23962 for ; Thu, 16 May 2024 14:55:38 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 4EB8014D2A5; Thu, 16 May 2024 14:55:24 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=asymptotic.io header.i=@asymptotic.io header.b="ubTjf/Fi" 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 E45BF14B972 for ; Thu, 16 May 2024 14:55:21 +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=1715871323; cv=none; b=PTz76bKA0lZLpfnbUuOk8aIxOUfUjvJbq8dJtZk5ZLTn/GY9jTTV6hcZARN9slNVYLiPhkVtW2KOuFvXKNHayNzBRDYAmI/AvjpBlHwlc2tu6sLVq/KQralXNBc8mt1nmgpD3Nm6PKAr8UX49JNeHjiocRyT0XxZzboia+ZN3CE= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715871323; c=relaxed/simple; bh=gbVMrPY70hNGVRJcd+ramq0kJAcmnRVOFYt+seXkXT0=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=A8QEXguB5MS4Y2f0yexZvi/Ybhgmlxo8nOWNGq6624/RZvCRRrYjaqjFyhDxuuEONpnIU8S5X3LiwtCAfW7A2xuquIOO1tEKyKaE/YfareLL+cw19gATmYWVopPJDL3+6kpNmkJ77diUdTksZnMw9Zmn4hyKKa8NlRVKzJ0OprE= 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=ubTjf/Fi; 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-571be483ccaso3631403a12.2 for ; Thu, 16 May 2024 07:55:21 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=asymptotic.io; s=google; t=1715871320; x=1716476120; 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=ubTjf/Fi/8E6huYljmvja7kLIqT75RDmrPW2ZCo6/6R8++JPRbBHbDJulSiwfapiyJ Cfzq3VEev4E68nkhSCW6s3o5hCH6Y4YpNz/cHj6ZfKziVJxZgjAR0LBbvHzazz1Pnkjv o/Srt+6fD4ewzm1a8hCwgPdzmp/igEyxC52/kYvtN+KtoPGIVqxuQq6wBFa6fKlA/To7 H//gk1cEG96sOz46wC9fs3+o1D+t9woaeiuWMwcGtuBcdLgM84WlpnRfOQLSF2zsAL2W kB2vkxq4Eq2VQxo6OduQ8TLbZKMthYtfxK97zbApDrNltrlDj57RIyPNyoCQIbKL5qSu SxJQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1715871320; x=1716476120; 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=RjblK9wjKA5Ks13GlE4o7WTmxlyk+DxSrvX6HJQSAUJOSqscorBJx38um8u/33hH4X oLNglhKE+vOzmSA/27K2QjfZ7ispY9cGQzTm5ULoJ+Lt0+NzxC1Y8n8CESaIrr9nDuI4 F+PgweurstLhQh+0vFssjBWYGTn7R+EjV1pkQAMwQSrTFXGzz6U5EA/vahWgIK3bD+G3 Uo9HPF6YrqBlZg/zqZpvAXWRpZ1j54lwpiW2da1Avfo2HoE9Fc8fjxSPNY3z3VFoFjgZ pVaCPEjeRwjP/je7tzw3ve9I1UA/RwbPJNLvQwt484Uf8+SZOLsx4/I3ncIXw6qimeGa svVw== X-Gm-Message-State: AOJu0Yw2jmHvBbLTAbBqovjO9QLf8Uu+HpoOLTKwmOctMpyyD/yXjUyi OuL0Rj8XXkidr7OdVYES6wGdWfT/vCx8+2lbjqMkRhB2OPZQa/hcsC/IdbxTX6yfHiRM7ypMkMa 8IZo= X-Received: by 2002:a50:bb05:0:b0:572:5f28:1f25 with SMTP id 4fb4d7f45d1cf-5734d5c1692mr13682172a12.7.1715871320143; Thu, 16 May 2024 07:55:20 -0700 (PDT) Received: from andromeda.lan ([74.15.47.99]) by smtp.gmail.com with ESMTPSA id 4fb4d7f45d1cf-574b6f6c53asm7484372a12.16.2024.05.16.07.55.19 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 16 May 2024 07:55:19 -0700 (PDT) From: Arun Raghavan To: linux-bluetooth@vger.kernel.org Cc: Arun Raghavan Subject: [PATCH BlueZ,v4 3/5] test: Add a script to test ASHA Date: Thu, 16 May 2024 10:54:59 -0400 Message-ID: <20240516145501.134118-4-arun@asymptotic.io> X-Mailer: git-send-email 2.45.0 In-Reply-To: <20240516145501.134118-1-arun@asymptotic.io> References: <20240516145501.134118-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