ASoC: SAMSUNG: Modify I2S driver to support idma
Subsystems (3)
PATCH v4 3/4 ASoC: SAMSUNG: Modify I2S driver to support idma
Previously, I2S driver only can support system dma. In this patch, i2s driver can support internal dma too. IDMA h/w configuration is initialized on idma.c
---
As Mark brown request, I repost i2s v4 patch
sound/soc/samsung/i2s.c | 7 +++++++ 1 files changed, 7 insertions(+), 0 deletions(-)
sound/soc/samsung/i2s.c +7 -0
@@ -21,6 +21,7 @@#include <plat/audio.h> #include "dma.h" +#include "idma.h" #include "i2s.h" #include "i2s-regs.h"
@@ -60,6 +61,7 @@ struct i2s_dai {/* DMA parameters */ struct s3c_dma_params dma_playback;struct s3c_dma_params dma_capture; +struct s3c_dma_params idma_playback;u32 quirks;u32 suspend_i2smod;u32 suspend_i2scon;
@@ -877,6 +879,10 @@ static int samsung_i2s_dai_probe(struct snd_soc_dai *dai)if (i2s->quirks &QUIRK_NEED_RSTCLR )writel (CON_RSTCLR , i2s->addr +I2SCON ); +if (i2s->quirks &QUIRK_SEC_DAI ) +idma_reg_addr_init ((void *)i2s->addr, + i2s->sec_dai->idma_playback.dma_addr); + probe_exit:/* Reset any constraint on RFS and BFS */ i2s->rfs =0 ;
@@ -1077,6 +1083,7 @@ static __devinit int samsung_i2s_probe(struct platform_device *pdev) sec_dai->dma_playback.dma_size =4 ; sec_dai->base = regs_base; sec_dai->quirks = quirks; + sec_dai->idma_playback.dma_addr = i2s_cfg->idma_addr; sec_dai->pri_dai = pri_dai; pri_dai->sec_dai = sec_dai; }
Signature · 1 line
1.7.1
PATCH v5 4/4 ASoC: SAMSUNG: Add I2S0 internal dma driver
I2S in Exynos4 and S5PC110(S5PV210) has a internal dma. It can be used low power audio mode and 2nd channel transfer. This patch can support idma.
---
As Mark brown request, I repost idma v5 patch
V2: change idma_new by new pcm_new api
add handling different idma address
as jassi comments, Modify the idma driver
V3: merge idma_reg_int and idma_addr_init
V4: move idma setting in i2s.c to idma_hw_params in idma.c
move idma_reg_addr_init calling
modify idma address handling error
modify module information
delete useless dev_dbg
V5: delete redundant error print and check routine
modify irq handler as jassi comment
fix the indent error
modify period_bytes_max value to set half size of max buffer
sound/soc/samsung/Makefile | 2 + sound/soc/samsung/idma.c | 453 ++++++++++++++++++++++++++++++++++++++++++++ sound/soc/samsung/idma.h | 26 +++ 3 files changed, 481 insertions(+), 0 deletions(-) create mode 100644 sound/soc/samsung/idma.c create mode 100644 sound/soc/samsung/idma.h
sound/soc/samsung/Makefile +2 -0
@@ -1,5 +1,6 @@ # S3c24XX Platform Support snd-soc-s3c24xx-objs := dma.o +snd-soc-idma-objs := idma.o snd-soc-s3c24xx-i2s-objs := s3c24xx-i2s.o snd-soc-s3c2412-i2s-objs := s3c2412-i2s.o snd-soc-ac97-objs := ac97.o
@@ -16,6 +17,7 @@ obj-$(CONFIG_SND_S3C_I2SV2_SOC) += snd-soc-s3c-i2s-v2.o obj-$(CONFIG_SND_SAMSUNG_SPDIF) += snd-soc-samsung-spdif.o obj-$(CONFIG_SND_SAMSUNG_PCM) += snd-soc-pcm.o obj-$(CONFIG_SND_SAMSUNG_I2S) += snd-soc-i2s.o +obj-$(CONFIG_SND_SAMSUNG_I2S) += snd-soc-idma.o # S3C24XX Machine Support snd-soc-jive-wm8750-objs := jive_wm8750.o
sound/soc/samsung/idma.c new file +453 -0
453 lines not on this page · raw message
sound/soc/samsung/idma.h new file +26 -0
@@ -0,0 +1,26 @@ +/* +* sound/soc/samsung/idma.h +* +* Copyright (c) 2011 Samsung Electronics Co., Ltd +* http://www.samsung.com +* +* 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 +* option) any later version. +* +*/ + +#ifndef __SND_SOC_SAMSUNG_IDMA_H_ +#define __SND_SOC_SAMSUNG_IDMA_H_ + +extern void idma_reg_addr_init (void *regs,dma_addr_t addr); + +/* dma_state */ +#define LPAM_DMA_STOP 0 +#define LPAM_DMA_START 1 + +#define MAX_IDMA_PERIOD (128 * 1024) +#define MAX_IDMA_BUFFER (160 * 1024) + +#endif /* __SND_SOC_SAMSUNG_IDMA_H_ */
Signature · 1 line
1.7.1
Quoted 6 lines · Sangbeom Kim
Previously, I2S driver only can support system dma. In this patch, i2s driver can support internal dma too. IDMA h/w configuration is initialized on
idma.cSigned-off-by Sangbeom Kim <[email protected]>Acked-by Liam Girdwood <[email protected]>
Mark Brown
AppliedQuoted 3 lines · Sangbeom Kim
Previously, I2S driver only can support system dma. In this patch, i2s driver can support internal dma too. IDMA h/w configuration is initialized on
idma.c
I've applied this and patch 4 as they seem to make sense by themselves but I can't see patch 1 or patch 2?
Hi,Mark
Quoted 2 lines · Mark Brown
I've applied this and patch 4 as they seem to make sense by themselves but I can't see patch 1 or patch 2?
Patch1 and Patch2 had already applied. And I checked in for-next branch.
http://mailman.alsa-project.org/pipermail/alsa-devel/2011-June/041321.html
Thanks,
SB Kim
Quoted 7 lines · Sangbeom Kim
Quoted 2 lines · Mark Brown
I've applied this and patch 4 as they seem to make sense by themselves but I can't see patch 1 or patch 2?
Patch1 and Patch2 had already applied. And I checked in for-next branch.
http://mailman.alsa-project.org/pipermail/alsa-devel/2011-June/041321.html
Right, but they're not part of your current posting. The patch numbering you're using needs to make sense within the series you're posting, just ignore the numbering you used in previous postings.