From mboxrd@z Thu Jan 1 00:00:00 1970 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 C3DFDD3C92A for ; Sun, 20 Oct 2024 10:40:43 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:List-Subscribe:List-Help :List-Post:List-Archive:List-Unsubscribe:List-Id:Content-Transfer-Encoding: Content-Type:MIME-Version:References:In-Reply-To:Message-ID:Subject:Cc:To: From:Date:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=5//X8hoKuCj87T75pVEHL41rLiwf8wSM9EnQG/n2ABQ=; b=QF+QFsHtSX2hPwjcvh2Re1crab pRWOm5tf5fu2eBFU0A+lkmkk2tXqiXtpd3wFo0hKqTjJ6iuk8160ymTxPOAH3HYB1OC+RSPYdTuLH 9eAZErb4MNqHe6WgvKSNHaptG24ODnSiELR3DelOBiTwi2LYNVIG8A3DHT0UEtr8Np0rumbsG6B7k rRv4RwFR0lMz8EtwA/ViKtzB/pmxPDj19DjN82UDDkFvy9vpTo9XMvx92WL5qQ1GWjiVfgi/CBCnQ KC2f9yO0/wxVXn1VU31yg/kW2uU3n0OB5jmqh1Sr/N1HqlMSy7UhSmneDafHiVw/SwjOcI+xKby2i UqxVBhTg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.98 #2 (Red Hat Linux)) id 1t2TMK-00000004kZY-3uRD; Sun, 20 Oct 2024 10:40:28 +0000 Received: from foss.arm.com ([217.140.110.172]) by bombadil.infradead.org with esmtp (Exim 4.98 #2 (Red Hat Linux)) id 1t2TKr-00000004kV9-21Zq for linux-arm-kernel@lists.infradead.org; Sun, 20 Oct 2024 10:38:59 +0000 Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id CF429DA7; Sun, 20 Oct 2024 03:39:25 -0700 (PDT) Received: from minigeek.lan (usa-sjc-mx-foss1.foss.arm.com [172.31.20.19]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 17C033F58B; Sun, 20 Oct 2024 03:38:53 -0700 (PDT) Date: Sun, 20 Oct 2024 11:37:59 +0100 From: Andre Przywara To: Ryan Walklin Cc: Liam Girdwood , Mark Brown , Jaroslav Kysela , Takashi Iwai , Chen-Yu Tsai , Jernej Skrabec , Samuel Holland , Chris Morgan , Philippe Simons , linux-sound@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-sunxi@lists.linux.dev, devicetree@vger.kernel.org, linux-clk@vger.kernel.org, Marcus Cooper Subject: Re: [PATCH v2 4/7] ASoC: sun4i-codec: Add playback only flag to quirks Message-ID: <20241020113759.1eeb76b2@minigeek.lan> In-Reply-To: <20241020083124.174724-5-ryan@testtoast.com> References: <20241020083124.174724-1-ryan@testtoast.com> <20241020083124.174724-5-ryan@testtoast.com> Organization: Arm Ltd. X-Mailer: Claws Mail 4.2.0 (GTK 3.24.31; x86_64-slackware-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20241020_033857_605230_040B3AEB X-CRM114-Status: GOOD ( 21.76 ) 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 On Sun, 20 Oct 2024 21:30:54 +1300 Ryan Walklin wrote: > From: Marcus Cooper > > Some devices only have the playback side of the codec implemented > so add a quirk to check for this. If you respin, you could mention here that the capture is also explicitly disabled in the dai_link member in the create_card() routine later, to keep that comment from your email alive in the commit log. But anyway: > Signed-off-by: Marcus Cooper > Signed-off-by: Ryan Walklin Reviewed-by: Andre Przywara Cheers, Andre > --- > sound/soc/sunxi/sun4i-codec.c | 12 ++++++++---- > 1 file changed, 8 insertions(+), 4 deletions(-) > > diff --git a/sound/soc/sunxi/sun4i-codec.c b/sound/soc/sunxi/sun4i-codec.c > index 37f5678b55291..312d2655c3f4e 100644 > --- a/sound/soc/sunxi/sun4i-codec.c > +++ b/sound/soc/sunxi/sun4i-codec.c > @@ -1571,6 +1571,7 @@ struct sun4i_codec_quirks { > unsigned int reg_dac_txdata; /* TX FIFO offset for DMA config */ > unsigned int reg_adc_rxdata; /* RX FIFO offset for DMA config */ > bool has_reset; > + bool playback_only; > }; > > static const struct sun4i_codec_quirks sun4i_codec_quirks = { > @@ -1779,10 +1780,13 @@ static int sun4i_codec_probe(struct platform_device *pdev) > scodec->playback_dma_data.maxburst = 8; > scodec->playback_dma_data.addr_width = DMA_SLAVE_BUSWIDTH_2_BYTES; > > - /* DMA configuration for RX FIFO */ > - scodec->capture_dma_data.addr = res->start + quirks->reg_adc_rxdata; > - scodec->capture_dma_data.maxburst = 8; > - scodec->capture_dma_data.addr_width = DMA_SLAVE_BUSWIDTH_2_BYTES; > + if (!quirks->playback_only) { > + /* DMA configuration for RX FIFO */ > + scodec->capture_dma_data.addr = res->start + > + quirks->reg_adc_rxdata; > + scodec->capture_dma_data.maxburst = 8; > + scodec->capture_dma_data.addr_width = DMA_SLAVE_BUSWIDTH_2_BYTES; > + } > > ret = devm_snd_soc_register_component(&pdev->dev, quirks->codec, > &sun4i_codec_dai, 1);