From: Ryan Walklin <ryan@testtoast.com>
To: Liam Girdwood <lgirdwood@gmail.com>,
Mark Brown <broonie@kernel.org>, Jaroslav Kysela <perex@perex.cz>,
Takashi Iwai <tiwai@suse.com>, Chen-Yu Tsai <wens@csie.org>,
Jernej Skrabec <jernej.skrabec@gmail.com>,
Samuel Holland <samuel@sholland.org>
Cc: 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 <codekipper@gmail.com>,
Ryan Walklin <ryan@testtoast.com>
Subject: [PATCH 2/6] ASoC: sun4i-codec: Add playback only flag to quirks
Date: Sun, 29 Sep 2024 23:06:03 +1300 [thread overview]
Message-ID: <20240929100750.860329-3-ryan@testtoast.com> (raw)
In-Reply-To: <20240929100750.860329-1-ryan@testtoast.com>
From: Marcus Cooper <codekipper@gmail.com>
Some devices only have the playback side of the codec implemented
so add a quirk to check for this.
Signed-off-by: Marcus Cooper <codekipper@gmail.com>
Signed-off-by: Ryan Walklin <ryan@testtoast.com>
---
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);
--
2.46.1
next prev parent reply other threads:[~2024-09-29 10:08 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-09-29 10:06 [PATCH 0/6] ASoC: add Allwinner H616 audio codec support Ryan Walklin
2024-09-29 10:06 ` [PATCH 1/6] ASoC: sun4i-codec: Add support for different DAC FIFOC addresses to quirks Ryan Walklin
2024-10-08 12:22 ` Andre Przywara
2024-09-29 10:06 ` Ryan Walklin [this message]
2024-10-08 12:32 ` [PATCH 2/6] ASoC: sun4i-codec: Add playback only flag " Andre Przywara
2024-10-20 6:04 ` Ryan Walklin
2024-10-20 10:19 ` Andre Przywara
2024-09-29 10:06 ` [PATCH 3/6] clk: sunxi-ng: h616: Add sigma-delta modulation settings for audio PLL Ryan Walklin
2024-10-01 13:28 ` Andre Przywara
2024-10-18 9:29 ` Andre Przywara
2024-10-20 6:38 ` Ryan Walklin
2024-09-29 10:06 ` [PATCH 4/6] dt-bindings: allwinner: add H616 sun4i audio codec binding Ryan Walklin
2024-09-29 19:56 ` Krzysztof Kozlowski
2024-10-20 6:58 ` Ryan Walklin
2024-10-20 10:27 ` Andre Przywara
2024-09-29 10:06 ` [PATCH 5/6] ASoC: sun4i-codec: support allwinner H616 codec Ryan Walklin
2024-10-18 9:55 ` Andre Przywara
2024-09-29 10:06 ` [PATCH 6/6] arm64: dts: allwinner: h616: Add audio codec node Ryan Walklin
2024-10-08 12:37 ` Andre Przywara
2024-10-18 10:07 ` Andre Przywara
2024-10-05 18:44 ` [PATCH 0/6] ASoC: add Allwinner H616 audio codec support Philippe Simons
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20240929100750.860329-3-ryan@testtoast.com \
--to=ryan@testtoast.com \
--cc=broonie@kernel.org \
--cc=codekipper@gmail.com \
--cc=devicetree@vger.kernel.org \
--cc=jernej.skrabec@gmail.com \
--cc=lgirdwood@gmail.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-clk@vger.kernel.org \
--cc=linux-sound@vger.kernel.org \
--cc=linux-sunxi@lists.linux.dev \
--cc=perex@perex.cz \
--cc=samuel@sholland.org \
--cc=tiwai@suse.com \
--cc=wens@csie.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox