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>
This commit is contained in:
parent
c82e1c8874
commit
78f13d0c5a
3 changed files with 46 additions and 8 deletions
|
@ -36,13 +36,15 @@
|
|||
#define RSND_SSI_CLK_PIN_SHARE (1 << 31)
|
||||
#define RSND_SSI_PLAY (1 << 24)
|
||||
|
||||
#define RSND_SSI(_dma_id, _pio_irq, _flags) \
|
||||
{ .dma_id = _dma_id, .pio_irq = _pio_irq, .flags = _flags }
|
||||
#define RSND_SSI_SET(_dai_id, _dma_id, _pio_irq, _flags) \
|
||||
{ .dai_id = _dai_id, .dma_id = _dma_id, .pio_irq = _pio_irq, .flags = _flags }
|
||||
#define RSND_SSI_UNUSED \
|
||||
{ .dai_id = -1, .dma_id = -1, .pio_irq = -1, .flags = 0 }
|
||||
|
||||
struct rsnd_ssi_platform_info {
|
||||
int dai_id;
|
||||
int dai_id; /* will be removed */
|
||||
int dma_id;
|
||||
int pio_irq;
|
||||
u32 flags;
|
||||
|
@ -53,6 +55,8 @@ struct rsnd_ssi_platform_info {
|
|||
*/
|
||||
#define RSND_SCU_USE_HPBIF (1 << 31) /* it needs RSND_SSI_DEPENDENT */
|
||||
|
||||
#define RSND_SCU(rate, _dma_id) \
|
||||
{ .flags = RSND_SCU_USE_HPBIF, .convert_rate = rate, .dma_id = _dma_id, }
|
||||
#define RSND_SCU_SET(rate, _dma_id) \
|
||||
{ .flags = RSND_SCU_USE_HPBIF, .convert_rate = rate, .dma_id = _dma_id, }
|
||||
#define RSND_SCU_UNUSED \
|
||||
|
@ -64,6 +68,15 @@ struct rsnd_scu_platform_info {
|
|||
int dma_id; /* for Gen2 SCU */
|
||||
};
|
||||
|
||||
struct rsnd_dai_path_info {
|
||||
struct rsnd_ssi_platform_info *ssi;
|
||||
};
|
||||
|
||||
struct rsnd_dai_platform_info {
|
||||
struct rsnd_dai_path_info playback;
|
||||
struct rsnd_dai_path_info capture;
|
||||
};
|
||||
|
||||
/*
|
||||
* flags
|
||||
*
|
||||
|
@ -81,6 +94,8 @@ struct rcar_snd_info {
|
|||
int ssi_info_nr;
|
||||
struct rsnd_scu_platform_info *scu_info;
|
||||
int scu_info_nr;
|
||||
struct rsnd_dai_platform_info *dai_info;
|
||||
int dai_info_nr;
|
||||
int (*start)(int id);
|
||||
int (*stop)(int id);
|
||||
};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue