From 54cb556247b171753484efb3c4777ca4d1babfa0 Mon Sep 17 00:00:00 2001 From: Kuninori Morimoto Date: Thu, 15 Jan 2015 08:06:24 +0000 Subject: [PATCH] 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 Signed-off-by: Mark Brown --- sound/soc/sh/rcar/core.c | 2 ++ sound/soc/sh/rcar/rsnd.h | 2 ++ 2 files changed, 4 insertions(+) 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) -- 2.39.5