Skip to content

Commit fae4d65

Browse files
sverdlinarndb
authored andcommitted
ASoC: ep93xx: Drop legacy DMA support
And rely on OF DMA. Signed-off-by: Alexander Sverdlin <[email protected]> Signed-off-by: Nikita Shubin <[email protected]> Tested-by: Alexander Sverdlin <[email protected]> Reviewed-by: Andy Shevchenko <[email protected]> Reviewed-by: Krzysztof Kozlowski <[email protected]> Reviewed-by: Guenter Roeck <[email protected]> Reviewed-by: Mark Brown <[email protected]> Reviewed-by: Andy Shevchenko <[email protected]> Acked-by: Miquel Raynal <[email protected]> Acked-by: Vinod Koul <[email protected]> Signed-off-by: Arnd Bergmann <[email protected]>
1 parent fb37c3a commit fae4d65

File tree

2 files changed

+1
-37
lines changed

2 files changed

+1
-37
lines changed

sound/soc/cirrus/ep93xx-i2s.c

Lines changed: 0 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,6 @@
2424
#include <sound/initval.h>
2525
#include <sound/soc.h>
2626

27-
#include <linux/platform_data/dma-ep93xx.h>
2827
#include <linux/soc/cirrus/ep93xx.h>
2928

3029
#include "ep93xx-pcm.h"
@@ -80,19 +79,6 @@ struct ep93xx_i2s_info {
8079
struct snd_dmaengine_dai_dma_data dma_params_tx;
8180
};
8281

83-
static struct ep93xx_dma_data ep93xx_i2s_dma_data[] = {
84-
[SNDRV_PCM_STREAM_PLAYBACK] = {
85-
.name = "i2s-pcm-out",
86-
.port = EP93XX_DMA_I2S1,
87-
.direction = DMA_MEM_TO_DEV,
88-
},
89-
[SNDRV_PCM_STREAM_CAPTURE] = {
90-
.name = "i2s-pcm-in",
91-
.port = EP93XX_DMA_I2S1,
92-
.direction = DMA_DEV_TO_MEM,
93-
},
94-
};
95-
9682
static inline void ep93xx_i2s_write_reg(struct ep93xx_i2s_info *info,
9783
unsigned reg, unsigned val)
9884
{
@@ -198,11 +184,6 @@ static int ep93xx_i2s_dai_probe(struct snd_soc_dai *dai)
198184
{
199185
struct ep93xx_i2s_info *info = snd_soc_dai_get_drvdata(dai);
200186

201-
info->dma_params_tx.filter_data =
202-
&ep93xx_i2s_dma_data[SNDRV_PCM_STREAM_PLAYBACK];
203-
info->dma_params_rx.filter_data =
204-
&ep93xx_i2s_dma_data[SNDRV_PCM_STREAM_CAPTURE];
205-
206187
snd_soc_dai_init_dma_data(dai, &info->dma_params_tx,
207188
&info->dma_params_rx);
208189

sound/soc/cirrus/ep93xx-pcm.c

Lines changed: 1 addition & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,6 @@
1818
#include <sound/soc.h>
1919
#include <sound/dmaengine_pcm.h>
2020

21-
#include <linux/platform_data/dma-ep93xx.h>
22-
2321
#include "ep93xx-pcm.h"
2422

2523
static const struct snd_pcm_hardware ep93xx_pcm_hardware = {
@@ -35,30 +33,15 @@ static const struct snd_pcm_hardware ep93xx_pcm_hardware = {
3533
.fifo_size = 32,
3634
};
3735

38-
static bool ep93xx_pcm_dma_filter(struct dma_chan *chan, void *filter_param)
39-
{
40-
struct ep93xx_dma_data *data = filter_param;
41-
42-
if (data->direction == ep93xx_dma_chan_direction(chan)) {
43-
chan->private = data;
44-
return true;
45-
}
46-
47-
return false;
48-
}
49-
5036
static const struct snd_dmaengine_pcm_config ep93xx_dmaengine_pcm_config = {
5137
.pcm_hardware = &ep93xx_pcm_hardware,
52-
.compat_filter_fn = ep93xx_pcm_dma_filter,
5338
.prealloc_buffer_size = 131072,
5439
};
5540

5641
int devm_ep93xx_pcm_platform_register(struct device *dev)
5742
{
5843
return devm_snd_dmaengine_pcm_register(dev,
59-
&ep93xx_dmaengine_pcm_config,
60-
SND_DMAENGINE_PCM_FLAG_NO_DT |
61-
SND_DMAENGINE_PCM_FLAG_COMPAT);
44+
&ep93xx_dmaengine_pcm_config, 0);
6245
}
6346
EXPORT_SYMBOL_GPL(devm_ep93xx_pcm_platform_register);
6447

0 commit comments

Comments
 (0)