diff options
author | Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> | 2014-03-03 20:49:50 -0800 |
---|---|---|
committer | Mark Brown <broonie@linaro.org> | 2014-03-05 14:07:52 +0800 |
commit | 78f13d0c5a2888564b2bed7f8433c8ec889997ff (patch) | |
tree | 7e02accb8329e190585d57735bcd777fb42e59f7 /sound/soc/sh/rcar/ssi.c | |
parent | c82e1c8874e5abaf52f9ed886386cbe08ec98a5b (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 'sound/soc/sh/rcar/ssi.c')
-rw-r--r-- | sound/soc/sh/rcar/ssi.c | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/sound/soc/sh/rcar/ssi.c b/sound/soc/sh/rcar/ssi.c index 25a7d441f8f..34234813f74 100644 --- a/sound/soc/sh/rcar/ssi.c +++ b/sound/soc/sh/rcar/ssi.c @@ -451,12 +451,26 @@ static struct rsnd_mod_ops rsnd_ssi_non_ops = { struct rsnd_mod *rsnd_ssi_mod_get_frm_dai(struct rsnd_priv *priv, int dai_id, int is_play) { + struct rsnd_dai_platform_info *dai_info = NULL; + struct rsnd_dai_path_info *path_info = NULL; + struct rsnd_ssi_platform_info *target_info = NULL; struct rsnd_ssi *ssi; int i, has_play; + if (priv->rdai) + dai_info = priv->rdai[dai_id].info; + if (dai_info) + path_info = (is_play) ? &dai_info->playback : &dai_info->capture; + if (path_info) + target_info = path_info->ssi; + is_play = !!is_play; for_each_rsnd_ssi(ssi, priv, i) { + if (target_info == ssi->info) + return &ssi->mod; + + /* for compatible */ if (rsnd_ssi_dai_id(ssi) != dai_id) continue; |