aboutsummaryrefslogtreecommitdiffstats
path: root/include/sound
diff options
context:
space:
mode:
authorKuninori Morimoto <kuninori.morimoto.gx@renesas.com>2014-03-03 23:49:50 -0500
committerMark Brown <broonie@linaro.org>2014-03-05 01:07:52 -0500
commit78f13d0c5a2888564b2bed7f8433c8ec889997ff (patch)
tree7e02accb8329e190585d57735bcd777fb42e59f7 /include/sound
parentc82e1c8874e5abaf52f9ed886386cbe08ec98a5b (diff)
ASoC: rsnd: add struct rsnd_dai_platform_info
R-Car sound DAI consists from SSI/SCU/SSIU/SRU... Current R-Car sound DAI is decided from these settings, but it is intuitively unclear, and is not good design for DT support. This patch adds new rsnd_dai_platform_info to solve this issue. But now, many platform is using this driver without rsnd_dai_platform_info. So, this patch still supports DAI settings via SSI to keep compatible. It will be removed in next Linux version. Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Signed-off-by: Mark Brown <broonie@linaro.org>
Diffstat (limited to 'include/sound')
-rw-r--r--include/sound/rcar_snd.h17
1 files changed, 16 insertions, 1 deletions
diff --git a/include/sound/rcar_snd.h b/include/sound/rcar_snd.h
index e3d585c67685..698f7b5fc76d 100644
--- a/include/sound/rcar_snd.h
+++ b/include/sound/rcar_snd.h
@@ -36,13 +36,15 @@
36#define RSND_SSI_CLK_PIN_SHARE (1 << 31) 36#define RSND_SSI_CLK_PIN_SHARE (1 << 31)
37#define RSND_SSI_PLAY (1 << 24) 37#define RSND_SSI_PLAY (1 << 24)
38 38
39#define RSND_SSI(_dma_id, _pio_irq, _flags) \
40{ .dma_id = _dma_id, .pio_irq = _pio_irq, .flags = _flags }
39#define RSND_SSI_SET(_dai_id, _dma_id, _pio_irq, _flags) \ 41#define RSND_SSI_SET(_dai_id, _dma_id, _pio_irq, _flags) \
40{ .dai_id = _dai_id, .dma_id = _dma_id, .pio_irq = _pio_irq, .flags = _flags } 42{ .dai_id = _dai_id, .dma_id = _dma_id, .pio_irq = _pio_irq, .flags = _flags }
41#define RSND_SSI_UNUSED \ 43#define RSND_SSI_UNUSED \
42{ .dai_id = -1, .dma_id = -1, .pio_irq = -1, .flags = 0 } 44{ .dai_id = -1, .dma_id = -1, .pio_irq = -1, .flags = 0 }
43 45
44struct rsnd_ssi_platform_info { 46struct rsnd_ssi_platform_info {
45 int dai_id; 47 int dai_id; /* will be removed */
46 int dma_id; 48 int dma_id;
47 int pio_irq; 49 int pio_irq;
48 u32 flags; 50 u32 flags;
@@ -53,6 +55,8 @@ struct rsnd_ssi_platform_info {
53 */ 55 */
54#define RSND_SCU_USE_HPBIF (1 << 31) /* it needs RSND_SSI_DEPENDENT */ 56#define RSND_SCU_USE_HPBIF (1 << 31) /* it needs RSND_SSI_DEPENDENT */
55 57
58#define RSND_SCU(rate, _dma_id) \
59{ .flags = RSND_SCU_USE_HPBIF, .convert_rate = rate, .dma_id = _dma_id, }
56#define RSND_SCU_SET(rate, _dma_id) \ 60#define RSND_SCU_SET(rate, _dma_id) \
57 { .flags = RSND_SCU_USE_HPBIF, .convert_rate = rate, .dma_id = _dma_id, } 61 { .flags = RSND_SCU_USE_HPBIF, .convert_rate = rate, .dma_id = _dma_id, }
58#define RSND_SCU_UNUSED \ 62#define RSND_SCU_UNUSED \
@@ -64,6 +68,15 @@ struct rsnd_scu_platform_info {
64 int dma_id; /* for Gen2 SCU */ 68 int dma_id; /* for Gen2 SCU */
65}; 69};
66 70
71struct rsnd_dai_path_info {
72 struct rsnd_ssi_platform_info *ssi;
73};
74
75struct rsnd_dai_platform_info {
76 struct rsnd_dai_path_info playback;
77 struct rsnd_dai_path_info capture;
78};
79
67/* 80/*
68 * flags 81 * flags
69 * 82 *
@@ -81,6 +94,8 @@ struct rcar_snd_info {
81 int ssi_info_nr; 94 int ssi_info_nr;
82 struct rsnd_scu_platform_info *scu_info; 95 struct rsnd_scu_platform_info *scu_info;
83 int scu_info_nr; 96 int scu_info_nr;
97 struct rsnd_dai_platform_info *dai_info;
98 int dai_info_nr;
84 int (*start)(int id); 99 int (*start)(int id);
85 int (*stop)(int id); 100 int (*stop)(int id);
86}; 101};