Skip to contentSkip to conversation

ASoC: SAMSUNG: Add I2S0 internal dma driver

PATCH RESEND Superseded Sangbeom Kim 2 participants 4 messages Jul 13, 2011 – Jul 18, 2011

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH RESEND 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.

---
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
index 00ba557..41becdd 100644
@@ -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
new file mode 100644
index 0000000..4827321
@@ -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_BUFFER (128 * 1024)
+
+#endif /* __SND_SOC_SAMSUNG_IDMA_H_ */
Signature · 1 line
1.7.1
#1 lore raw
Quoted 18 lines · Sangbeom Kim

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.

---
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

Quoted 4 lines

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

Perhaps you forgot to mention the reason for resend ?
_______________________________________________
Alsa-devel mailing list [email protected]
http://mailman.alsa-project.org/mailman/listinfo/alsa-devel

#2 lore raw

Hi,

Quoted 19 lines · Jassi Brar
Quoted 18 lines · Sangbeom Kim

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.

---
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

Quoted 6 lines
Quoted 4 lines

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

Perhaps you forgot to mention the reason for resend ?

Sorry, I changed MAX_IDMA_BUFFER value (128KB)
Because I used wrong MAX_IDMA_BUFFER value.

Thanks
SB Kim

#3 lore raw
Quoted 21 lines · Sangbeom Kim

Hi,

Quoted 19 lines · Jassi Brar
Quoted 18 lines · Sangbeom Kim

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.

---
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

Quoted 8 lines
Quoted 6 lines
Quoted 4 lines

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

Perhaps you forgot to mention the reason for resend ?

Sorry, I changed MAX_IDMA_BUFFER value (128KB)
Because I used wrong MAX_IDMA_BUFFER value.

No, we should not set period_bytes_max to half the buffer. That will leave no scope for even customized applications to get max possible power savings.
_______________________________________________
Alsa-devel mailing list [email protected]
http://mailman.alsa-project.org/mailman/listinfo/alsa-devel