[alsa-devel] [PATCH 0/7] ASoC: samsung: DMA parameters handling cleanup
The motivation for this series is to remove the s3c_dma_params data structure and use struct snd_dmaengine_dai_dma_data instead, which removes some kind of indirection and makes the code easier to follow.
Sylwester Nawrocki (7): ASoC: samsung: Drop usage of struct s3c_dma_params from i2s.c ASoC: samsung: Drop usage of struct s3c_dma_params from s3c24xx-i2s.c ASoC: samsung: Drop usage of struct s3c_dma_params from s3c2412-i2s.c ASoC: samsung: Drop usage of struct s3c_dma_params from ac97.c ASoC: samsung: Drop usage of struct s3c_dma_params from spdif.c ASoC: samsung: Drop usage of of struct s3c_dma_params from pcm.c ASoC: samsung: Remove unused now unused struct s3c_dma_params
sound/soc/samsung/ac97.c | 28 +++++++++++----------- sound/soc/samsung/dma.h | 20 +++------------- sound/soc/samsung/dmaengine.c | 31 ------------------------ sound/soc/samsung/i2s.c | 48 +++++++++++++++++++------------------- sound/soc/samsung/idma.c | 1 - sound/soc/samsung/pcm.c | 26 ++++++++++----------- sound/soc/samsung/s3c-i2s-v2.c | 3 +-- sound/soc/samsung/s3c-i2s-v2.h | 4 ++-- sound/soc/samsung/s3c2412-i2s.c | 24 +++++++++---------- sound/soc/samsung/s3c24xx-i2s.c | 24 +++++++++---------- sound/soc/samsung/smdk_wm8580pcm.c | 1 - sound/soc/samsung/smdk_wm8994pcm.c | 1 - sound/soc/samsung/spdif.c | 12 +++++----- 13 files changed, 86 insertions(+), 137 deletions(-)
-- 1.9.1
struct s3c_dma_params already includes struct snd_dmaengine_dai_dma_data, there is no need for such an indirection so switch to using struct snd_dmaengine_dai_dma_data instead of struct s3c_dma_params. This also allows us to use snd_soc_dai_init_dma_data() function instead of the platform specific samsung_asoc_init_dma_data helper.
Signed-off-by: Sylwester Nawrocki s.nawrocki@samsung.com --- sound/soc/samsung/i2s.c | 48 ++++++++++++++++++++++++------------------------ 1 file changed, 24 insertions(+), 24 deletions(-)
diff --git a/sound/soc/samsung/i2s.c b/sound/soc/samsung/i2s.c index 50635ee..fa3ff03 100644 --- a/sound/soc/samsung/i2s.c +++ b/sound/soc/samsung/i2s.c @@ -87,9 +87,9 @@ struct i2s_dai { /* Driver for this DAI */ struct snd_soc_dai_driver i2s_dai_drv; /* DMA parameters */ - struct s3c_dma_params dma_playback; - struct s3c_dma_params dma_capture; - struct s3c_dma_params idma_playback; + struct snd_dmaengine_dai_dma_data dma_playback; + struct snd_dmaengine_dai_dma_data dma_capture; + struct snd_dmaengine_dai_dma_data idma_playback; dma_filter_fn filter; u32 quirks; u32 suspend_i2smod; @@ -692,15 +692,15 @@ static int i2s_hw_params(struct snd_pcm_substream *substream, break; case 2: if (substream->stream == SNDRV_PCM_STREAM_PLAYBACK) - i2s->dma_playback.dma_size = 4; + i2s->dma_playback.addr_width = 4; else - i2s->dma_capture.dma_size = 4; + i2s->dma_capture.addr_width = 4; break; case 1: if (substream->stream == SNDRV_PCM_STREAM_PLAYBACK) - i2s->dma_playback.dma_size = 2; + i2s->dma_playback.addr_width = 2; else - i2s->dma_capture.dma_size = 2; + i2s->dma_capture.addr_width = 2;
break; default: @@ -754,7 +754,7 @@ static int i2s_hw_params(struct snd_pcm_substream *substream, writel(mod, i2s->addr + I2SMOD); spin_unlock_irqrestore(i2s->lock, flags);
- samsung_asoc_init_dma_data(dai, &i2s->dma_playback, &i2s->dma_capture); + snd_soc_dai_init_dma_data(dai, &i2s->dma_playback, &i2s->dma_capture);
i2s->frmclk = params_rate(params);
@@ -991,10 +991,10 @@ static int samsung_i2s_dai_probe(struct snd_soc_dai *dai) unsigned long flags;
if (is_secondary(i2s)) { /* If this is probe on the secondary DAI */ - samsung_asoc_init_dma_data(dai, &other->sec_dai->dma_playback, + snd_soc_dai_init_dma_data(dai, &other->sec_dai->dma_playback, NULL); } else { - samsung_asoc_init_dma_data(dai, &i2s->dma_playback, + snd_soc_dai_init_dma_data(dai, &i2s->dma_playback, &i2s->dma_capture);
if (i2s->quirks & QUIRK_NEED_RSTCLR) @@ -1002,7 +1002,7 @@ static int samsung_i2s_dai_probe(struct snd_soc_dai *dai)
if (i2s->quirks & QUIRK_SUPPORTS_IDMA) idma_reg_addr_init(i2s->addr, - i2s->sec_dai->idma_playback.dma_addr); + i2s->sec_dai->idma_playback.addr); }
/* Reset any constraint on RFS and BFS */ @@ -1262,8 +1262,8 @@ static int samsung_i2s_probe(struct platform_device *pdev) return -EINVAL; }
- pri_dai->dma_playback.slave = i2s_pdata->dma_playback; - pri_dai->dma_capture.slave = i2s_pdata->dma_capture; + pri_dai->dma_playback.filter_data = i2s_pdata->dma_playback; + pri_dai->dma_capture.filter_data = i2s_pdata->dma_capture; pri_dai->filter = i2s_pdata->dma_filter;
if (&i2s_pdata->type) @@ -1302,12 +1302,12 @@ static int samsung_i2s_probe(struct platform_device *pdev) dev_err(&pdev->dev, "failed to enable clock: %d\n", ret); return ret; } - pri_dai->dma_playback.dma_addr = regs_base + I2STXD; - pri_dai->dma_capture.dma_addr = regs_base + I2SRXD; - pri_dai->dma_playback.ch_name = "tx"; - pri_dai->dma_capture.ch_name = "rx"; - pri_dai->dma_playback.dma_size = 4; - pri_dai->dma_capture.dma_size = 4; + pri_dai->dma_playback.addr = regs_base + I2STXD; + pri_dai->dma_capture.addr = regs_base + I2SRXD; + pri_dai->dma_playback.chan_name = "tx"; + pri_dai->dma_capture.chan_name = "rx"; + pri_dai->dma_playback.addr_width = 4; + pri_dai->dma_capture.addr_width = 4; pri_dai->quirks = quirks; pri_dai->variant_regs = i2s_dai_data->i2s_variant_regs;
@@ -1323,19 +1323,19 @@ static int samsung_i2s_probe(struct platform_device *pdev)
sec_dai->lock = &pri_dai->spinlock; sec_dai->variant_regs = pri_dai->variant_regs; - sec_dai->dma_playback.dma_addr = regs_base + I2STXDS; - sec_dai->dma_playback.ch_name = "tx-sec"; + sec_dai->dma_playback.addr = regs_base + I2STXDS; + sec_dai->dma_playback.chan_name = "tx-sec";
if (!np) { - sec_dai->dma_playback.slave = i2s_pdata->dma_play_sec; + sec_dai->dma_playback.filter_data = i2s_pdata->dma_play_sec; sec_dai->filter = i2s_pdata->dma_filter; }
- sec_dai->dma_playback.dma_size = 4; + sec_dai->dma_playback.addr_width = 4; sec_dai->addr = pri_dai->addr; sec_dai->clk = pri_dai->clk; sec_dai->quirks = quirks; - sec_dai->idma_playback.dma_addr = idma_addr; + sec_dai->idma_playback.addr = idma_addr; sec_dai->pri_dai = pri_dai; pri_dai->sec_dai = sec_dai; }
struct s3c_dma_params already includes struct snd_dmaengine_dai_dma_data, there is no need for such an indirection so switch to using struct snd_dmaengine_dai_dma_data instead of struct s3c_dma_params. This also allows us to use snd_soc_dai_init_dma_data() function instead of the platform specific samsung_asoc_init_dma_data helper.
Signed-off-by: Sylwester Nawrocki s.nawrocki@samsung.com --- sound/soc/samsung/s3c24xx-i2s.c | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-)
diff --git a/sound/soc/samsung/s3c24xx-i2s.c b/sound/soc/samsung/s3c24xx-i2s.c index 3e76f2a..c78a936 100644 --- a/sound/soc/samsung/s3c24xx-i2s.c +++ b/sound/soc/samsung/s3c24xx-i2s.c @@ -32,14 +32,14 @@
#include <linux/platform_data/asoc-s3c.h>
-static struct s3c_dma_params s3c24xx_i2s_pcm_stereo_out = { - .ch_name = "tx", - .dma_size = 2, +static struct snd_dmaengine_dai_dma_data s3c24xx_i2s_pcm_stereo_out = { + .chan_name = "tx", + .addr_width = 2, };
-static struct s3c_dma_params s3c24xx_i2s_pcm_stereo_in = { - .ch_name = "rx", - .dma_size = 2, +static struct snd_dmaengine_dai_dma_data s3c24xx_i2s_pcm_stereo_in = { + .chan_name = "rx", + .addr_width = 2, };
struct s3c24xx_i2s_info { @@ -360,8 +360,8 @@ static int s3c24xx_i2s_probe(struct snd_soc_dai *dai) { pr_debug("Entered %s\n", __func__);
- samsung_asoc_init_dma_data(dai, &s3c24xx_i2s_pcm_stereo_out, - &s3c24xx_i2s_pcm_stereo_in); + snd_soc_dai_init_dma_data(dai, &s3c24xx_i2s_pcm_stereo_out, + &s3c24xx_i2s_pcm_stereo_in);
s3c24xx_i2s.iis_clk = devm_clk_get(dai->dev, "iis"); if (IS_ERR(s3c24xx_i2s.iis_clk)) { @@ -469,10 +469,10 @@ static int s3c24xx_iis_dev_probe(struct platform_device *pdev) if (IS_ERR(s3c24xx_i2s.regs)) return PTR_ERR(s3c24xx_i2s.regs);
- s3c24xx_i2s_pcm_stereo_out.dma_addr = res->start + S3C2410_IISFIFO; - s3c24xx_i2s_pcm_stereo_out.slave = pdata->dma_playback; - s3c24xx_i2s_pcm_stereo_in.dma_addr = res->start + S3C2410_IISFIFO; - s3c24xx_i2s_pcm_stereo_in.slave = pdata->dma_capture; + s3c24xx_i2s_pcm_stereo_out.addr = res->start + S3C2410_IISFIFO; + s3c24xx_i2s_pcm_stereo_out.filter_data = pdata->dma_playback; + s3c24xx_i2s_pcm_stereo_in.addr = res->start + S3C2410_IISFIFO; + s3c24xx_i2s_pcm_stereo_in.filter_data = pdata->dma_capture;
ret = devm_snd_soc_register_component(&pdev->dev, &s3c24xx_i2s_component, &s3c24xx_i2s_dai, 1);
struct s3c_dma_params already includes struct snd_dmaengine_dai_dma_data, there is no need for such an indirection so switch to using struct snd_dmaengine_dai_dma_data instead of struct s3c_dma_params. This also allows us to use snd_soc_dai_init_dma_data() function instead of the platform specific samsung_asoc_init_dma_data helper.
Signed-off-by: Sylwester Nawrocki s.nawrocki@samsung.com --- sound/soc/samsung/s3c-i2s-v2.c | 2 +- sound/soc/samsung/s3c-i2s-v2.h | 4 ++-- sound/soc/samsung/s3c2412-i2s.c | 24 ++++++++++++------------ 3 files changed, 15 insertions(+), 15 deletions(-)
diff --git a/sound/soc/samsung/s3c-i2s-v2.c b/sound/soc/samsung/s3c-i2s-v2.c index bf8ae79..74a7f4b 100644 --- a/sound/soc/samsung/s3c-i2s-v2.c +++ b/sound/soc/samsung/s3c-i2s-v2.c @@ -302,7 +302,7 @@ static int s3c_i2sv2_hw_params(struct snd_pcm_substream *substream, struct snd_soc_dai *dai) { struct s3c_i2sv2_info *i2s = to_info(dai); - struct s3c_dma_params *dma_data; + struct snd_dmaengine_dai_dma_data *dma_data; u32 iismod;
pr_debug("Entered %s\n", __func__); diff --git a/sound/soc/samsung/s3c-i2s-v2.h b/sound/soc/samsung/s3c-i2s-v2.h index d068414..182d805 100644 --- a/sound/soc/samsung/s3c-i2s-v2.h +++ b/sound/soc/samsung/s3c-i2s-v2.h @@ -60,8 +60,8 @@ struct s3c_i2sv2_info {
unsigned char master;
- struct s3c_dma_params *dma_playback; - struct s3c_dma_params *dma_capture; + struct snd_dmaengine_dai_dma_data *dma_playback; + struct snd_dmaengine_dai_dma_data *dma_capture;
u32 suspend_iismod; u32 suspend_iiscon; diff --git a/sound/soc/samsung/s3c2412-i2s.c b/sound/soc/samsung/s3c2412-i2s.c index d45dffb..3e89fbc 100644 --- a/sound/soc/samsung/s3c2412-i2s.c +++ b/sound/soc/samsung/s3c2412-i2s.c @@ -34,14 +34,14 @@
#include <linux/platform_data/asoc-s3c.h>
-static struct s3c_dma_params s3c2412_i2s_pcm_stereo_out = { - .ch_name = "tx", - .dma_size = 4, +static struct snd_dmaengine_dai_dma_data s3c2412_i2s_pcm_stereo_out = { + .chan_name = "tx", + .addr_width = 4, };
-static struct s3c_dma_params s3c2412_i2s_pcm_stereo_in = { - .ch_name = "rx", - .dma_size = 4, +static struct snd_dmaengine_dai_dma_data s3c2412_i2s_pcm_stereo_in = { + .chan_name = "rx", + .addr_width = 4, };
static struct s3c_i2sv2_info s3c2412_i2s; @@ -52,8 +52,8 @@ static int s3c2412_i2s_probe(struct snd_soc_dai *dai)
pr_debug("Entered %s\n", __func__);
- samsung_asoc_init_dma_data(dai, &s3c2412_i2s_pcm_stereo_out, - &s3c2412_i2s_pcm_stereo_in); + snd_soc_dai_init_dma_data(dai, &s3c2412_i2s_pcm_stereo_out, + &s3c2412_i2s_pcm_stereo_in);
ret = s3c_i2sv2_probe(dai, &s3c2412_i2s, S3C2410_PA_IIS); if (ret) @@ -163,10 +163,10 @@ static int s3c2412_iis_dev_probe(struct platform_device *pdev) if (IS_ERR(s3c2412_i2s.regs)) return PTR_ERR(s3c2412_i2s.regs);
- s3c2412_i2s_pcm_stereo_out.dma_addr = res->start + S3C2412_IISTXD; - s3c2412_i2s_pcm_stereo_out.slave = pdata->dma_playback; - s3c2412_i2s_pcm_stereo_in.dma_addr = res->start + S3C2412_IISRXD; - s3c2412_i2s_pcm_stereo_in.slave = pdata->dma_capture; + s3c2412_i2s_pcm_stereo_out.addr = res->start + S3C2412_IISTXD; + s3c2412_i2s_pcm_stereo_out.filter_data = pdata->dma_playback; + s3c2412_i2s_pcm_stereo_in.addr = res->start + S3C2412_IISRXD; + s3c2412_i2s_pcm_stereo_in.filter_data = pdata->dma_capture;
ret = s3c_i2sv2_register_component(&pdev->dev, -1, &s3c2412_i2s_component,
struct s3c_dma_params already includes struct snd_dmaengine_dai_dma_data, there is no need for such an indirection so switch to using struct snd_dmaengine_dai_dma_data instead of struct s3c_dma_params. This also allows us to use snd_soc_dai_init_dma_data() function instead of the platform specific samsung_asoc_init_dma_data helper.
Signed-off-by: Sylwester Nawrocki s.nawrocki@samsung.com --- sound/soc/samsung/ac97.c | 28 ++++++++++++++-------------- 1 file changed, 14 insertions(+), 14 deletions(-)
diff --git a/sound/soc/samsung/ac97.c b/sound/soc/samsung/ac97.c index 547d310..5eafb66 100644 --- a/sound/soc/samsung/ac97.c +++ b/sound/soc/samsung/ac97.c @@ -38,16 +38,16 @@ struct s3c_ac97_info { }; static struct s3c_ac97_info s3c_ac97;
-static struct s3c_dma_params s3c_ac97_pcm_out = { - .dma_size = 4, +static struct snd_dmaengine_dai_dma_data s3c_ac97_pcm_out = { + .addr_width = 4, };
-static struct s3c_dma_params s3c_ac97_pcm_in = { - .dma_size = 4, +static struct snd_dmaengine_dai_dma_data s3c_ac97_pcm_in = { + .addr_width = 4, };
-static struct s3c_dma_params s3c_ac97_mic_in = { - .dma_size = 4, +static struct snd_dmaengine_dai_dma_data s3c_ac97_mic_in = { + .addr_width = 4, };
static void s3c_ac97_activate(struct snd_ac97 *ac97) @@ -273,14 +273,14 @@ static const struct snd_soc_dai_ops s3c_ac97_mic_dai_ops = {
static int s3c_ac97_dai_probe(struct snd_soc_dai *dai) { - samsung_asoc_init_dma_data(dai, &s3c_ac97_pcm_out, &s3c_ac97_pcm_in); + snd_soc_dai_init_dma_data(dai, &s3c_ac97_pcm_out, &s3c_ac97_pcm_in);
return 0; }
static int s3c_ac97_mic_dai_probe(struct snd_soc_dai *dai) { - samsung_asoc_init_dma_data(dai, NULL, &s3c_ac97_mic_in); + snd_soc_dai_init_dma_data(dai, NULL, &s3c_ac97_mic_in);
return 0; } @@ -346,12 +346,12 @@ static int s3c_ac97_probe(struct platform_device *pdev) if (IS_ERR(s3c_ac97.regs)) return PTR_ERR(s3c_ac97.regs);
- s3c_ac97_pcm_out.slave = ac97_pdata->dma_playback; - s3c_ac97_pcm_out.dma_addr = mem_res->start + S3C_AC97_PCM_DATA; - s3c_ac97_pcm_in.slave = ac97_pdata->dma_capture; - s3c_ac97_pcm_in.dma_addr = mem_res->start + S3C_AC97_PCM_DATA; - s3c_ac97_mic_in.slave = ac97_pdata->dma_capture_mic; - s3c_ac97_mic_in.dma_addr = mem_res->start + S3C_AC97_MIC_DATA; + s3c_ac97_pcm_out.filter_data = ac97_pdata->dma_playback; + s3c_ac97_pcm_out.addr = mem_res->start + S3C_AC97_PCM_DATA; + s3c_ac97_pcm_in.filter_data = ac97_pdata->dma_capture; + s3c_ac97_pcm_in.addr = mem_res->start + S3C_AC97_PCM_DATA; + s3c_ac97_mic_in.filter_data = ac97_pdata->dma_capture_mic; + s3c_ac97_mic_in.addr = mem_res->start + S3C_AC97_MIC_DATA;
init_completion(&s3c_ac97.done); mutex_init(&s3c_ac97.lock);
struct s3c_dma_params already includes struct snd_dmaengine_dai_dma_data, there is no need for such an indirection so switch to using struct snd_dmaengine_dai_dma_data instead of struct s3c_dma_params. This also allows us to use snd_soc_dai_init_dma_data() function instead of the platform specific samsung_asoc_init_dma_data helper.
Signed-off-by: Sylwester Nawrocki s.nawrocki@samsung.com --- sound/soc/samsung/spdif.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-)
diff --git a/sound/soc/samsung/spdif.c b/sound/soc/samsung/spdif.c index 0cb9c85..26c1fbe 100644 --- a/sound/soc/samsung/spdif.c +++ b/sound/soc/samsung/spdif.c @@ -90,10 +90,10 @@ struct samsung_spdif_info { u32 saved_clkcon; u32 saved_con; u32 saved_cstas; - struct s3c_dma_params *dma_playback; + struct snd_dmaengine_dai_dma_data *dma_playback; };
-static struct s3c_dma_params spdif_stereo_out; +static struct snd_dmaengine_dai_dma_data spdif_stereo_out; static struct samsung_spdif_info spdif_info;
static inline struct samsung_spdif_info *to_info(struct snd_soc_dai *cpu_dai) @@ -179,7 +179,7 @@ static int spdif_hw_params(struct snd_pcm_substream *substream, struct snd_soc_pcm_runtime *rtd = substream->private_data; struct samsung_spdif_info *spdif = to_info(rtd->cpu_dai); void __iomem *regs = spdif->regs; - struct s3c_dma_params *dma_data; + struct snd_dmaengine_dai_dma_data *dma_data; u32 con, clkcon, cstas; unsigned long flags; int i, ratio; @@ -425,11 +425,11 @@ static int spdif_probe(struct platform_device *pdev) goto err4; }
- spdif_stereo_out.dma_size = 2; - spdif_stereo_out.dma_addr = mem_res->start + DATA_OUTBUF; + spdif_stereo_out.addr_width = 2; + spdif_stereo_out.addr = mem_res->start + DATA_OUTBUF; filter = NULL; if (spdif_pdata) { - spdif_stereo_out.slave = spdif_pdata->dma_playback; + spdif_stereo_out.filter_data = spdif_pdata->dma_playback; filter = spdif_pdata->dma_filter; }
struct s3c_dma_params already includes struct snd_dmaengine_dai_dma_data, there is no need for such an indirection so switch to using struct snd_dmaengine_dai_dma_data instead of struct s3c_dma_params. This also allows us to use snd_soc_dai_init_dma_data() function instead of the platform specific samsung_asoc_init_dma_data helper.
Signed-off-by: Sylwester Nawrocki s.nawrocki@samsung.com --- sound/soc/samsung/pcm.c | 26 ++++++++++++-------------- 1 file changed, 12 insertions(+), 14 deletions(-)
diff --git a/sound/soc/samsung/pcm.c b/sound/soc/samsung/pcm.c index 490c1a8..43e367a 100644 --- a/sound/soc/samsung/pcm.c +++ b/sound/soc/samsung/pcm.c @@ -127,25 +127,25 @@ struct s3c_pcm_info { struct clk *pclk; struct clk *cclk;
- struct s3c_dma_params *dma_playback; - struct s3c_dma_params *dma_capture; + struct snd_dmaengine_dai_dma_data *dma_playback; + struct snd_dmaengine_dai_dma_data *dma_capture; };
-static struct s3c_dma_params s3c_pcm_stereo_out[] = { +static struct snd_dmaengine_dai_dma_data s3c_pcm_stereo_out[] = { [0] = { - .dma_size = 4, + .addr_width = 4, }, [1] = { - .dma_size = 4, + .addr_width = 4, }, };
-static struct s3c_dma_params s3c_pcm_stereo_in[] = { +static struct snd_dmaengine_dai_dma_data s3c_pcm_stereo_in[] = { [0] = { - .dma_size = 4, + .addr_width = 4, }, [1] = { - .dma_size = 4, + .addr_width = 4, }, };
@@ -552,15 +552,13 @@ static int s3c_pcm_dev_probe(struct platform_device *pdev) } clk_prepare_enable(pcm->pclk);
- s3c_pcm_stereo_in[pdev->id].dma_addr = mem_res->start - + S3C_PCM_RXFIFO; - s3c_pcm_stereo_out[pdev->id].dma_addr = mem_res->start - + S3C_PCM_TXFIFO; + s3c_pcm_stereo_in[pdev->id].addr = mem_res->start + S3C_PCM_RXFIFO; + s3c_pcm_stereo_out[pdev->id].addr = mem_res->start + S3C_PCM_TXFIFO;
filter = NULL; if (pcm_pdata) { - s3c_pcm_stereo_in[pdev->id].slave = pcm_pdata->dma_capture; - s3c_pcm_stereo_out[pdev->id].slave = pcm_pdata->dma_playback; + s3c_pcm_stereo_in[pdev->id].filter_data = pcm_pdata->dma_capture; + s3c_pcm_stereo_out[pdev->id].filter_data = pcm_pdata->dma_playback; filter = pcm_pdata->dma_filter; }
There is no user of this data structure now, all users have been converted to use struct snd_dmaengine_dai_dma_data instead.
Signed-off-by: Sylwester Nawrocki s.nawrocki@samsung.com --- sound/soc/samsung/dma.h | 20 +++----------------- sound/soc/samsung/dmaengine.c | 31 ------------------------------- sound/soc/samsung/idma.c | 1 - sound/soc/samsung/s3c-i2s-v2.c | 1 - sound/soc/samsung/smdk_wm8580pcm.c | 1 - sound/soc/samsung/smdk_wm8994pcm.c | 1 - 6 files changed, 3 insertions(+), 52 deletions(-)
diff --git a/sound/soc/samsung/dma.h b/sound/soc/samsung/dma.h index 3830f29..7ae580d 100644 --- a/sound/soc/samsung/dma.h +++ b/sound/soc/samsung/dma.h @@ -1,6 +1,4 @@ /* - * dma.h -- - * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by the * Free Software Foundation; either version 2 of the License, or (at your @@ -9,27 +7,15 @@ * ALSA PCM interface for the Samsung SoC */
-#ifndef _S3C_AUDIO_H -#define _S3C_AUDIO_H +#ifndef _SAMSUNG_DMA_H +#define _SAMSUNG_DMA_H
#include <sound/dmaengine_pcm.h> -#include <linux/dmaengine.h> - -struct s3c_dma_params { - void *slave; /* Channel ID */ - dma_addr_t dma_addr; - int dma_size; /* Size of the DMA transfer */ - char *ch_name; - struct snd_dmaengine_dai_dma_data dma_data; -};
-void samsung_asoc_init_dma_data(struct snd_soc_dai *dai, - struct s3c_dma_params *playback, - struct s3c_dma_params *capture); /* * @tx, @rx arguments can be NULL if the DMA channel names are "tx", "rx", * otherwise actual DMA channel names must be passed to this function. */ int samsung_asoc_dma_platform_register(struct device *dev, dma_filter_fn filter, const char *tx, const char *rx); -#endif +#endif /* _SAMSUNG_DMA_H */ diff --git a/sound/soc/samsung/dmaengine.c b/sound/soc/samsung/dmaengine.c index 2c87f38..9104c98 100644 --- a/sound/soc/samsung/dmaengine.c +++ b/sound/soc/samsung/dmaengine.c @@ -16,49 +16,18 @@ */
#include <linux/module.h> -#include <linux/amba/pl08x.h> -#include <linux/platform_data/dma-s3c24xx.h> - #include <sound/core.h> #include <sound/pcm.h> #include <sound/pcm_params.h> #include <sound/dmaengine_pcm.h> #include <sound/soc.h> -#include <sound/soc-dai.h>
#include "dma.h"
-void samsung_asoc_init_dma_data(struct snd_soc_dai *dai, - struct s3c_dma_params *playback, - struct s3c_dma_params *capture) -{ - struct snd_dmaengine_dai_dma_data *playback_data = NULL; - struct snd_dmaengine_dai_dma_data *capture_data = NULL; - - if (playback) { - playback_data = &playback->dma_data; - playback_data->filter_data = playback->slave; - playback_data->chan_name = playback->ch_name; - playback_data->addr = playback->dma_addr; - playback_data->addr_width = playback->dma_size; - } - if (capture) { - capture_data = &capture->dma_data; - capture_data->filter_data = capture->slave; - capture_data->chan_name = capture->ch_name; - capture_data->addr = capture->dma_addr; - capture_data->addr_width = capture->dma_size; - } - - snd_soc_dai_init_dma_data(dai, playback_data, capture_data); -} -EXPORT_SYMBOL_GPL(samsung_asoc_init_dma_data); - int samsung_asoc_dma_platform_register(struct device *dev, dma_filter_fn filter, const char *tx, const char *rx) { unsigned int flags = SND_DMAENGINE_PCM_FLAG_COMPAT; - struct snd_dmaengine_pcm_config *pcm_conf;
pcm_conf = devm_kzalloc(dev, sizeof(*pcm_conf), GFP_KERNEL); diff --git a/sound/soc/samsung/idma.c b/sound/soc/samsung/idma.c index 4ed29ff..3e40815 100644 --- a/sound/soc/samsung/idma.c +++ b/sound/soc/samsung/idma.c @@ -22,7 +22,6 @@
#include "i2s.h" #include "idma.h" -#include "dma.h" #include "i2s-regs.h"
#define ST_RUNNING (1<<0) diff --git a/sound/soc/samsung/s3c-i2s-v2.c b/sound/soc/samsung/s3c-i2s-v2.c index 74a7f4b..644f186 100644 --- a/sound/soc/samsung/s3c-i2s-v2.c +++ b/sound/soc/samsung/s3c-i2s-v2.c @@ -24,7 +24,6 @@
#include "regs-i2s-v2.h" #include "s3c-i2s-v2.h" -#include "dma.h"
#undef S3C_IIS_V2_SUPPORTED
diff --git a/sound/soc/samsung/smdk_wm8580pcm.c b/sound/soc/samsung/smdk_wm8580pcm.c index 6deec52..a6d2233 100644 --- a/sound/soc/samsung/smdk_wm8580pcm.c +++ b/sound/soc/samsung/smdk_wm8580pcm.c @@ -16,7 +16,6 @@ #include <asm/mach-types.h>
#include "../codecs/wm8580.h" -#include "dma.h" #include "pcm.h"
/* diff --git a/sound/soc/samsung/smdk_wm8994pcm.c b/sound/soc/samsung/smdk_wm8994pcm.c index b1c89ec..2e62149 100644 --- a/sound/soc/samsung/smdk_wm8994pcm.c +++ b/sound/soc/samsung/smdk_wm8994pcm.c @@ -15,7 +15,6 @@ #include <sound/pcm_params.h>
#include "../codecs/wm8994.h" -#include "dma.h" #include "pcm.h"
/*
participants (1)
-
Sylwester Nawrocki