diff options
author | Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> | 2015-01-15 08:06:24 +0000 |
---|---|---|
committer | Mark Brown <broonie@kernel.org> | 2015-01-15 11:37:48 +0000 |
commit | 54cb556247b171753484efb3c4777ca4d1babfa0 (patch) | |
tree | 4a2e2c8e63b7212a5ca5446c9976fa41105cef1b | |
parent | 7c57d76f5181d50ae04adf92180c5d53dd3c9756 (diff) | |
download | blackbird-op-linux-54cb556247b171753484efb3c4777ca4d1babfa0.tar.gz blackbird-op-linux-54cb556247b171753484efb3c4777ca4d1babfa0.zip |
ASoC: rsnd: add rsnd_io_to_rdai()
Current rsnd driver request rdai in everywhere, but each mod should
reach to rdai by itself. this patch adds missing rsnd_io_to_rdai().
io = rsnd_mod_to_io(mod);
rdai = rsnd_io_to_rdai(io);
Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
-rw-r--r-- | sound/soc/sh/rcar/core.c | 2 | ||||
-rw-r--r-- | sound/soc/sh/rcar/rsnd.h | 2 |
2 files changed, 4 insertions, 0 deletions
diff --git a/sound/soc/sh/rcar/core.c b/sound/soc/sh/rcar/core.c index 852fa0410afd..c8111857c9d9 100644 --- a/sound/soc/sh/rcar/core.c +++ b/sound/soc/sh/rcar/core.c @@ -886,6 +886,7 @@ static int rsnd_dai_probe(struct platform_device *pdev, drv[i].playback.channels_max = 2; rdai[i].playback.info = &info->dai_info[i].playback; + rdai[i].playback.rdai = rdai + i; rsnd_path_init(priv, &rdai[i], &rdai[i].playback); } if (cmod) { @@ -895,6 +896,7 @@ static int rsnd_dai_probe(struct platform_device *pdev, drv[i].capture.channels_max = 2; rdai[i].capture.info = &info->dai_info[i].capture; + rdai[i].capture.rdai = rdai + i; rsnd_path_init(priv, &rdai[i], &rdai[i].capture); } diff --git a/sound/soc/sh/rcar/rsnd.h b/sound/soc/sh/rcar/rsnd.h index ad76870dba13..0b5518259c28 100644 --- a/sound/soc/sh/rcar/rsnd.h +++ b/sound/soc/sh/rcar/rsnd.h @@ -282,6 +282,7 @@ struct rsnd_dai_stream { struct snd_pcm_substream *substream; struct rsnd_mod *mod[RSND_MOD_MAX]; struct rsnd_dai_path_info *info; /* rcar_snd.h */ + struct rsnd_dai *rdai; int byte_pos; int period_pos; int byte_per_period; @@ -290,6 +291,7 @@ struct rsnd_dai_stream { #define rsnd_io_to_mod_ssi(io) ((io)->mod[RSND_MOD_SSI]) #define rsnd_io_to_mod_src(io) ((io)->mod[RSND_MOD_SRC]) #define rsnd_io_to_mod_dvc(io) ((io)->mod[RSND_MOD_DVC]) +#define rsnd_io_to_rdai(io) ((io)->rdai) #define rsnd_io_to_runtime(io) ((io)->substream ? \ (io)->substream->runtime : NULL) |