From patchwork Fri Nov 6 04:15:06 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Samuel Holland X-Patchwork-Id: 11885973 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.8 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_GIT autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id E8C9CC2D0A3 for ; Fri, 6 Nov 2020 04:18:19 +0000 (UTC) Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 72F79208C3 for ; Fri, 6 Nov 2020 04:18:10 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="vVNO+cVs"; dkim=temperror (0-bit key) header.d=sholland.org header.i=@sholland.org header.b="tQH0+bRt"; dkim=temperror (0-bit key) header.d=messagingengine.com header.i=@messagingengine.com header.b="qhjir15c" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 72F79208C3 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=sholland.org Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=merlin.20170209; h=Sender:Content-Transfer-Encoding: Content-Type:Cc:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:MIME-Version:Message-Id:Date:Subject:To:From: Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender :Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References:List-Owner; bh=/VFmxqJxtnQb/PSZ3zEyfHOuCE9dN2TXJOUV7g5/NIo=; b=vVNO+cVsz94AyVY924N0TLsG3n xPoTbAu80Q2F1WYH9wfrwRLr5HJ03E97UgQZjdETVXlserNzno7Tu9+A8MWd5KI8LGSfqPdEc0OFc LKdSQj6wC8UUOodDHHwzsqvt+yBZvO9wf8gqu/ApSBn3u8x/PlK8xEqqkWcF8O7ULL6sco0vfnu0y H76qOzmjR5w59BJXVAphzTfBhZNDgEZs0tTbCMVCn/83zImUCKSf2bp6KnjXCBruyVQSCOzCDji91 /RIbqlOUyTirjqUWIJ5SFzg8aa6vnZsJYmm8DKbg3yyj+HcGLwOGAD7ZxKHhNNPQ1E+ibAW5psI54 M4UWiwfw==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1kat9q-0001rH-Cg; Fri, 06 Nov 2020 04:15:26 +0000 Received: from new3-smtp.messagingengine.com ([66.111.4.229]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1kat9h-0001mI-3g for linux-arm-kernel@lists.infradead.org; Fri, 06 Nov 2020 04:15:18 +0000 Received: from compute5.internal (compute5.nyi.internal [10.202.2.45]) by mailnew.nyi.internal (Postfix) with ESMTP id 49583580549; Thu, 5 Nov 2020 23:15:15 -0500 (EST) Received: from mailfrontend2 ([10.202.2.163]) by compute5.internal (MEProxy); Thu, 05 Nov 2020 23:15:15 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sholland.org; h= from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; s=fm1; bh=+qDI3QewsKGWtoQxG+q8X0EcPM jQpIpbBevGLhPz5J4=; b=tQH0+bRth6goR3jRxdivrAy8c0dRlWyq9Ym4pN5F3Y frGMxZCqc7Rci1k3BXDtEr9sOerPVLN+leTNrpxLeCouQRiyfsmOlGB/ssYO8OeY qL4PwT7VtVWSwh20Mb0bhSLKLMr7qDjB45vH4QnvHzfxJlREyz9XfiyFVp1Nojnd Qz0iEpT3mQGu/8O/44SfrWpddSmfV34y3GegUi0Ukqw8Ct+cnl2DHnmP3d2mK2Qc 8Og20ydr9kNF9PTAqYMyAb2xVMEPkGCuat4ALFyOtpGqJHQN9bvdvw1V8lWxsll3 xnQXmsVHL3iU17reSm3Y9qBVVoQGY8i2V+0je0cXDPLA== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-transfer-encoding:date:from :message-id:mime-version:subject:to:x-me-proxy:x-me-proxy :x-me-sender:x-me-sender:x-sasl-enc; s=fm1; bh=+qDI3QewsKGWtoQxG +q8X0EcPMjQpIpbBevGLhPz5J4=; b=qhjir15cQmcG2e7U8sW/NJgPzoAxVONII VPN02Eptah1hMwEdxWhceN8jotm5ku9MuNq3dqe6fqnjOBrxWlq+hX3m5WXfj8iC Mbr1nNSsE9p/Qi1bt8fk2KtqVwxaGbcVf8l+Of16efwbPCC2supkbuBPkYMiolN+ s05HqFH6r33bfDrpvnUjtqZ2gQqrLaFUN4pIgneVvpj02k24tzq1di8HdF9y0kma X6Hsgx6bQ7Blj7l4kExIzOaVl1+Yl400fUF9DamzLp5J+SfnC8aAaUceQJ9/usoc Rmh7H+Woj0q7bqF6MBffYaXbQaYVT1kYDOjgPmtBFD+uuZP58Y6sw== X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedujedruddtkedgjedtucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhephffvufffkffoggfgsedtkeertdertddtnecuhfhrohhmpefurghmuhgvlhcu jfholhhlrghnugcuoehsrghmuhgvlhesshhhohhllhgrnhgurdhorhhgqeenucggtffrrg htthgvrhhnpeeiteekhfehuddugfeltddufeejjeefgeevheekueffhffhjeekheeiffdt vedtveenucfkphepjedtrddufeehrddugeekrdduhedunecuvehluhhsthgvrhfuihiivg eptdenucfrrghrrghmpehmrghilhhfrhhomhepshgrmhhuvghlsehshhholhhlrghnugdr ohhrgh X-ME-Proxy: Received: from titanium.stl.sholland.net (70-135-148-151.lightspeed.stlsmo.sbcglobal.net [70.135.148.151]) by mail.messagingengine.com (Postfix) with ESMTPA id 9B0AC306005F; Thu, 5 Nov 2020 23:15:13 -0500 (EST) From: Samuel Holland To: Maxime Ripard , Chen-Yu Tsai , Jernej Skrabec , Liam Girdwood , Mark Brown , Rob Herring Subject: [PATCH 0/7] PinePhone BT audio bringup Date: Thu, 5 Nov 2020 22:15:06 -0600 Message-Id: <20201106041513.38481-1-samuel@sholland.org> X-Mailer: git-send-email 2.26.2 MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20201105_231517_226961_1E2EA91E X-CRM114-Status: GOOD ( 14.31 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: devicetree@vger.kernel.org, alsa-devel@alsa-project.org, Samuel Holland , linux-kernel@vger.kernel.org, phone-devel@vger.kernel.org, linux-arm-kernel@lists.infradead.org Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org This series makes use of the additional DAIs recently added to the sun8i-codec driver to add hardware routing for BT SCO (headset) audio on the PinePhone. The BT audio connection is represented by the "dummy" bt-sco codec. The connection to the Quectel EG-25G modem via AIF2 works as well, but I do not include it here because there is no appropriate codec driver in tree. We have been using an out-of-tree "dummy" codec driver similar to bt-sco, and I'm not sure if such a driver would be desired upstream. The modem has a similar amount of configurability as the rtl8723cs BT chip. For the BT chip, the DAI format and PCM parameters are set in a configuration firmware file and loaded at driver load time. For the modem, the DAI format and PCM parameters are set by (and can be queried from) an AT command. However, this AT command requires a modem restart to take effect, so the parameters cannot feasibly be changed at runtime. With a dummy driver, we pick some "standard" set of PCM parameters, e.g. 16 bit mono at 8 or 16 kHz, and assume the hardware agrees. Similarly, we assume the DAI format pre-programmed in the remote hardware matches what is configured in the DAI link (in this case, in the device tree). Is that the right way to model this? Or does the modem (and maybe even the BT chip) deserve a more featureful driver that reads and/or programs the format and params at probe time? Because of those unanswered questions, I'm sending BT SCO support first/only. Regards, Samuel Arnaud Ferraris (1): arm64: dts: allwinner: pinephone: Set audio card name Samuel Holland (6): ASoC: dt-bindings: sun8i-codec: Increase #sound-dai-cells ARM: dts: sun8i-a33: Allow using multiple codec DAIs arm64: dts: allwinner: a64: Allow using multiple codec DAIs arm64: dts: allwinner: a64: Add pinmux nodes for AIF2/AIF3 arm64: dts: allwinner: a64: Allow multiple DAI links arm64: dts: allwinner: pinephone: Add support for Bluetooth audio .../sound/allwinner,sun8i-a33-codec.yaml | 2 +- arch/arm/boot/dts/sun8i-a33.dtsi | 4 +- .../dts/allwinner/sun50i-a64-pinephone.dtsi | 25 +++++++++++++ arch/arm64/boot/dts/allwinner/sun50i-a64.dtsi | 37 ++++++++++++++----- 4 files changed, 55 insertions(+), 13 deletions(-)