From patchwork Tue Mar 26 03:50:03 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: John Watts X-Patchwork-Id: 13603531 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 25EC5CD11DD for ; Tue, 26 Mar 2024 03:50:55 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:Cc:To:Message-Id:MIME-Version:Subject: Date: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=dUaWrW91hVYIJqFNcsNyddYG5YdfOonpmHDuZvix61I=; b=Vpy7bK1dqqrXhD o7FMPV+IhguVs+CMPM0ljzhr2EUXbr/6bjPuMn9b1kyQQLbHj4k2GcQ/RYE9KAXZAS5Eb3i9hU04w haLWp7ysZk2nL+EbgF9fqWazxF4tFeZ4O+oTtg15G4+YdZHfRxOk7ZI5jvcs/0HLVEFVYji4wdtq4 ayqL+th/RK6zEv+oFeLA5LU4Ml9+8cFkUCWD+NlZEVwWYMtwSw8WuULL7593tWxUffLYirnbkHI2G ozdNQmZeaG1RgG3GoS/YvJBPZF3RoL02IWzxR/2I8NwYcD5O+yrBULSGZwNh8DKpwEjYmmps/eIGn pajrgqOSkY6+X7ulV/IA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1roxpb-00000002yB2-2imo; Tue, 26 Mar 2024 03:50:40 +0000 Received: from out-180.mta1.migadu.com ([95.215.58.180]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1roxpP-00000002y7r-3g7v for linux-arm-kernel@lists.infradead.org; Tue, 26 Mar 2024 03:50:25 +0000 X-Report-Abuse: Please report any abuse attempt to abuse@migadu.com and include these headers. DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=jookia.org; s=key1; t=1711425015; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=K9DFWcbSfaZCwj5K7OSlhvorCFoj07hKTzCP89IkAuA=; b=pGuva+Uac4faL7cAdCOY51vt/AXVNR2AT7b/EsX4N4yx/vjM89RFH1EEGcZEH3zMLII4uc TjKqbTX5GMWpmnIwbTrYuFNoBJ8SUxqFrqqbVFV0+l8METXSuEqMA6M42TLXNwhdaiWdAY Av5q49y28YcZH/DQjgS3sFS8Gyk8SfXrm6AAV7KVVVTzMwzBxXceC4aOIvf3qaY5138gbf MZa127VUNTNK1SaSmrOgEos5/JqP/knJyjS1MPKY8nKIX7BttNhgCo5V0dTlRIjZb/1MEx TcPZX/JVDZ13nGn2bkb7MCCcvZyz30/vPq+MXSqnnQa+kbbrAwfOCLymn9bX2A== From: John Watts Date: Tue, 26 Mar 2024 14:50:03 +1100 Subject: [PATCH] ASoC: sunxi: sun4i-i2s: Enable 32-bit audio formats MIME-Version: 1.0 Message-Id: <20240326-sunxi_s32-v1-1-899f71dcb1e6@jookia.org> X-B4-Tracking: v=1; b=H4sIAOpFAmYC/6tWKk4tykwtVrJSqFYqSi3LLM7MzwNyDHUUlJIzE vPSU3UzU4B8JSMDIxMDYyMz3eLSvIrM+GJjI900o8QkI9Mki1QzCwsloPqCotS0zAqwWdGxtbU AUQ+OeVsAAAA= To: Liam Girdwood , Mark Brown , Jaroslav Kysela , Takashi Iwai , Chen-Yu Tsai , Jernej Skrabec , Samuel Holland Cc: linux-sound@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-sunxi@lists.linux.dev, linux-kernel@vger.kernel.org, John Watts X-Developer-Signature: v=1; a=openssh-sha256; t=1711425003; l=1320; i=contact@jookia.org; h=from:subject:message-id; bh=bctQBJg26saGhxU9s8UlkMFaCikEYQsmHPO5D2q9/BE=; b=U1NIU0lHAAAAAQAAAEoAAAAac2stc3NoLWVkMjU1MTlAb3BlbnNzaC5jb20AAAAgpGuA3uho2 8zVxm554DVLHyl4gq5/nBHglU5WIWN8/zYAAAAEc3NoOgAAAAZwYXRhdHQAAAAAAAAABnNoYTUx MgAAAGcAAAAac2stc3NoLWVkMjU1MTlAb3BlbnNzaC5jb20AAABAWWEuABqUeoiIQmUDevKLBIs 55txNImjUfXyzNdEM4lMfiVhlRL7Fz/dVUvLSegPOrhOchxP+1vRLZ0uIkvZMDQUAAOcU X-Developer-Key: i=contact@jookia.org; a=openssh; fpr=SHA256:6LBQmZH5u7i/edmEZXzCTwCrpSevs/ZshZxNmlD1thY X-Migadu-Flow: FLOW_OUT X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240325_205024_456500_29F943D8 X-CRM114-Status: GOOD ( 13.88 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org The I2S driver already supports and checks for 32-bit sample sizes, so indicate this size is available for use in the DAI driver. This change has been tested on the T113-S3, but it should work just fine on older hardware as get_sr checks for sample size support correctly according to each core's datasheet. Signed-off-by: John Watts --- This patch enables support for 32-bit audio in the sunxi I2S driver. I have only tested this on the Allwinner T113 but I'm fairly certain it will work on older boards. --- sound/soc/sunxi/sun4i-i2s.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) --- base-commit: 72fb52fb0ac44b6a1edd9bc390e44bce3acccd26 change-id: 20240326-sunxi_s32-f2ab25b8e688 Best regards, diff --git a/sound/soc/sunxi/sun4i-i2s.c b/sound/soc/sunxi/sun4i-i2s.c index a736f632bf0b..aeea852141c1 100644 --- a/sound/soc/sunxi/sun4i-i2s.c +++ b/sound/soc/sunxi/sun4i-i2s.c @@ -1103,7 +1103,8 @@ static const struct snd_soc_dai_ops sun4i_i2s_dai_ops = { #define SUN4I_FORMATS (SNDRV_PCM_FMTBIT_S16_LE | \ SNDRV_PCM_FMTBIT_S20_LE | \ - SNDRV_PCM_FMTBIT_S24_LE) + SNDRV_PCM_FMTBIT_S24_LE | \ + SNDRV_PCM_FMTBIT_S32_LE) static struct snd_soc_dai_driver sun4i_i2s_dai = { .capture = {