lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <20230908035449.2211723-1-mwkim@gaonchips.com>
Date:   Fri,  8 Sep 2023 12:54:49 +0900
From:   Myunguk Kim <mwkim@...nchips.com>
To:     alsa-devel@...a-project.org
Cc:     Jaroslav Kysela <perex@...ex.cz>, Takashi Iwai <tiwai@...e.com>,
        Liam Girdwood <lgirdwood@...il.com>,
        Mark Brown <broonie@...nel.org>,
        Maxim Kochetkov <fido_max@...ox.ru>,
        Xingyu Wu <xingyu.wu@...rfivetech.com>,
        Kuninori Morimoto <kuninori.morimoto.gx@...esas.com>,
        Uw e Kleine-König 
        <u.kleine-koenig@...gutronix.de>,
        Myunguk Kim <mwkim@...nchips.com>, linux-kernel@...r.kernel.org
Subject: [PATCH 1/1] ASoC: dwc: Add Single DMA mode support

There is a SoC between dwc and DMA block (ie. PL330)
that does not have a burst signal and supports only single.

So write not-support-burst property on dts, it support single DMA mode.

Signed-off-by: Myunguk Kim <mwkim@...nchips.com>
---
 include/sound/designware_i2s.h |  1 +
 sound/soc/dwc/dwc-i2s.c        | 12 ++++++++++--
 2 files changed, 11 insertions(+), 2 deletions(-)

diff --git a/include/sound/designware_i2s.h b/include/sound/designware_i2s.h
index f6803205a9fb..060e0cbcd55c 100644
--- a/include/sound/designware_i2s.h
+++ b/include/sound/designware_i2s.h
@@ -36,6 +36,7 @@ struct i2s_platform_data 
{ 	#define DW_I2S_QUIRK_COMP_REG_OFFSET	(1 << 0)
 	#define DW_I2S_QUIRK_COMP_PARAM1	(1 << 1)
 	#define DW_I2S_QUIRK_16BIT_IDX_OVERRIDE (1 << 2)
+	#define DW_I2S_QUIRK_NOT_SUPPORT_BURST	(1 << 3)
 	unsigned int quirks;
 	unsigned int i2s_reg_comp1;
 	unsigned int i2s_reg_comp2;
diff --git a/sound/soc/dwc/dwc-i2s.c b/sound/soc/dwc/dwc-i2s.c
index 5ab1b3eb2d28..c4dd8c18beba 100644
--- a/sound/soc/dwc/dwc-i2s.c
+++ b/sound/soc/dwc/dwc-i2s.c
@@ -713,7 +713,10 @@ static int dw_configure_dai_by_dt(struct dw_i2s_dev *dev,
 		dev->play_dma_data.dt.addr = res->start + I2S_TXDMA;
 		dev->play_dma_data.dt.fifo_size = fifo_depth *
 			(fifo_width[idx2]) >> 8;
-		dev->play_dma_data.dt.maxburst = 16;
+		if (dev->quirks & DW_I2S_QUIRK_NOT_SUPPORT_BURST)
+			dev->play_dma_data.dt.maxburst = 1;
+		else
+			dev->play_dma_data.dt.maxburst = 16;
 	}
 	if (COMP1_RX_ENABLED(comp1)) 
{ 		idx2 = COMP2_RX_WORDSIZE_0(comp2);
@@ -722,7 +725,10 @@ static int dw_configure_dai_by_dt(struct dw_i2s_dev *dev,
 		dev->capture_dma_data.dt.addr = res->start + I2S_RXDMA;
 		dev->capture_dma_data.dt.fifo_size = fifo_depth *
 			(fifo_width[idx2] >> 8);
-		dev->capture_dma_data.dt.maxburst = 16;
+		if (dev->quirks & DW_I2S_QUIRK_NOT_SUPPORT_BURST)
+			dev->capture_dma_data.dt.maxburst = 1;
+		else
+			dev->capture_dma_data.dt.maxburst = 16;
 	}
 
 	return 0;
@@ -979,6 +985,8 @@ static int dw_i2s_probe(struct platform_device *pdev)
 		ret = dw_configure_dai_by_pd(dev, dw_i2s_dai, res, pdata);
 	} else 
{ 		clk_id = "i2sclk";
+		if (of_get_property(pdev->dev.of_node, "not-support-burst", NULL))
+			dev->quirks |= DW_I2S_QUIRK_NOT_SUPPORT_BURST;
 		ret = dw_configure_dai_by_dt(dev, dw_i2s_dai, res);
 	}
 	if (ret < 0)
-- 
2.34.1

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ