Commit 54cb5562 authored by Kuninori Morimoto's avatar Kuninori Morimoto Committed by Mark Brown

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: default avatarKuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: default avatarMark Brown <broonie@kernel.org>
parent 7c57d76f
......@@ -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);
}
......
......@@ -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)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment