-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #3 from nixgoat/stoney-6.6-upstream
stoney: Upgrade to 6.6.x
- Loading branch information
Showing
3 changed files
with
114 additions
and
116 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,110 @@ | ||
From 505e384212e123959ece829ca9b20bf6822a0f56 Mon Sep 17 00:00:00 2001 | ||
From: Lux Aliaga <[email protected]> | ||
Date: Wed, 4 Oct 2023 01:11:07 -0300 | ||
Subject: [PATCH] Revert "ASoC: dwc: add DMA handshake control" | ||
|
||
This reverts commit a42e988b6265dcd489feb1adab8551b40c988f43. | ||
--- | ||
sound/soc/dwc/dwc-i2s.c | 50 +++-------------------------------------- | ||
sound/soc/dwc/local.h | 6 ----- | ||
2 files changed, 3 insertions(+), 53 deletions(-) | ||
|
||
diff --git a/sound/soc/dwc/dwc-i2s.c b/sound/soc/dwc/dwc-i2s.c | ||
index 9ea4be56d3b7..46e4d9e8fafa 100644 | ||
--- a/sound/soc/dwc/dwc-i2s.c | ||
+++ b/sound/soc/dwc/dwc-i2s.c | ||
@@ -151,60 +151,19 @@ static irqreturn_t i2s_irq_handler(int irq, void *dev_id) | ||
return IRQ_NONE; | ||
} | ||
|
||
-static void i2s_enable_dma(struct dw_i2s_dev *dev, u32 stream) | ||
-{ | ||
- u32 dma_reg = i2s_read_reg(dev->i2s_base, I2S_DMACR); | ||
- | ||
- /* Enable DMA handshake for stream */ | ||
- if (stream == SNDRV_PCM_STREAM_PLAYBACK) | ||
- dma_reg |= I2S_DMAEN_TXBLOCK; | ||
- else | ||
- dma_reg |= I2S_DMAEN_RXBLOCK; | ||
- | ||
- i2s_write_reg(dev->i2s_base, I2S_DMACR, dma_reg); | ||
-} | ||
- | ||
-static void i2s_disable_dma(struct dw_i2s_dev *dev, u32 stream) | ||
-{ | ||
- u32 dma_reg = i2s_read_reg(dev->i2s_base, I2S_DMACR); | ||
- | ||
- /* Disable DMA handshake for stream */ | ||
- if (stream == SNDRV_PCM_STREAM_PLAYBACK) { | ||
- dma_reg &= ~I2S_DMAEN_TXBLOCK; | ||
- i2s_write_reg(dev->i2s_base, I2S_RTXDMA, 1); | ||
- } else { | ||
- dma_reg &= ~I2S_DMAEN_RXBLOCK; | ||
- i2s_write_reg(dev->i2s_base, I2S_RRXDMA, 1); | ||
- } | ||
- i2s_write_reg(dev->i2s_base, I2S_DMACR, dma_reg); | ||
-} | ||
- | ||
static void i2s_start(struct dw_i2s_dev *dev, | ||
struct snd_pcm_substream *substream) | ||
{ | ||
struct i2s_clk_config_data *config = &dev->config; | ||
|
||
- u32 reg = IER_IEN; | ||
- | ||
- if (dev->tdm_slots) { | ||
- reg |= (dev->tdm_slots - 1) << IER_TDM_SLOTS_SHIFT; | ||
- reg |= IER_INTF_TYPE; | ||
- reg |= dev->frame_offset << IER_FRAME_OFF_SHIFT; | ||
- } | ||
- | ||
- i2s_write_reg(dev->i2s_base, IER, reg); | ||
+ i2s_write_reg(dev->i2s_base, IER, 1); | ||
+ i2s_enable_irqs(dev, substream->stream, config->chan_nr); | ||
|
||
if (substream->stream == SNDRV_PCM_STREAM_PLAYBACK) | ||
i2s_write_reg(dev->i2s_base, ITER, 1); | ||
else | ||
i2s_write_reg(dev->i2s_base, IRER, 1); | ||
|
||
- /* I2S needs to enable IRQ to make a handshake with DMAC on the JH7110 SoC */ | ||
- if (dev->use_pio || dev->is_jh7110) | ||
- i2s_enable_irqs(dev, substream->stream, config->chan_nr); | ||
- else | ||
- i2s_enable_dma(dev, substream->stream); | ||
- | ||
i2s_write_reg(dev->i2s_base, CER, 1); | ||
} | ||
|
||
@@ -218,10 +177,7 @@ static void i2s_stop(struct dw_i2s_dev *dev, | ||
else | ||
i2s_write_reg(dev->i2s_base, IRER, 0); | ||
|
||
- if (dev->use_pio || dev->is_jh7110) | ||
- i2s_disable_irqs(dev, substream->stream, 8); | ||
- else | ||
- i2s_disable_dma(dev, substream->stream); | ||
+ i2s_disable_irqs(dev, substream->stream, 8); | ||
|
||
if (!dev->active) { | ||
i2s_write_reg(dev->i2s_base, CER, 0); | ||
diff --git a/sound/soc/dwc/local.h b/sound/soc/dwc/local.h | ||
index dce88c9ad5f3..81eee700c1c2 100644 | ||
--- a/sound/soc/dwc/local.h | ||
+++ b/sound/soc/dwc/local.h | ||
@@ -69,12 +69,6 @@ | ||
#define I2S_COMP_VERSION 0x01F8 | ||
#define I2S_COMP_TYPE 0x01FC | ||
|
||
-#define I2S_RRXDMA 0x01C4 | ||
-#define I2S_RTXDMA 0x01CC | ||
-#define I2S_DMACR 0x0200 | ||
-#define I2S_DMAEN_RXBLOCK (1 << 16) | ||
-#define I2S_DMAEN_TXBLOCK (1 << 17) | ||
- | ||
/* | ||
* Component parameter register fields - define the I2S block's | ||
* configuration. | ||
-- | ||
2.40.0 | ||
|
This file was deleted.
Oops, something went wrong.