summaryrefslogtreecommitdiff
path: root/sound/soc/sh/rcar/core.c
diff options
context:
space:
mode:
authorKuninori Morimoto <kuninori.morimoto.gx@renesas.com>2014-06-22 17:59:28 -0700
committerMark Brown <broonie@linaro.org>2014-07-02 12:35:56 +0100
commit34cb6123f90d264d63bdcd3ee0df0d2cb4b36aab (patch)
tree201069d465c2f0c7144933e9f995b192c99d8f9c /sound/soc/sh/rcar/core.c
parent340371005d399b595f4044fc5e336f4a66ead101 (diff)
ASoC: rsnd: add DT support to DVC
Now, DVC can use DT 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/core.c')
-rw-r--r--sound/soc/sh/rcar/core.c13
1 files changed, 11 insertions, 2 deletions
diff --git a/sound/soc/sh/rcar/core.c b/sound/soc/sh/rcar/core.c
index 49d9b31b185c..907d4802fd5c 100644
--- a/sound/soc/sh/rcar/core.c
+++ b/sound/soc/sh/rcar/core.c
@@ -286,7 +286,13 @@ static void rsnd_dma_of_path(struct rsnd_dma *dma,
mod[i] = src;
src = NULL;
} else {
- mod[i] = dvc;
+ if ((!is_play) && (this == src))
+ this = dvc;
+
+ mod[i] = (is_play) ? src : dvc;
+ i++;
+ mod[i] = (is_play) ? dvc : src;
+ src = NULL;
dvc = NULL;
}
@@ -719,12 +725,13 @@ static void rsnd_of_parse_dai(struct platform_device *pdev,
struct device_node *dai_node, *dai_np;
struct device_node *ssi_node, *ssi_np;
struct device_node *src_node, *src_np;
+ struct device_node *dvc_node, *dvc_np;
struct device_node *playback, *capture;
struct rsnd_dai_platform_info *dai_info;
struct rcar_snd_info *info = rsnd_priv_to_info(priv);
struct device *dev = &pdev->dev;
int nr, i;
- int dai_i, ssi_i, src_i;
+ int dai_i, ssi_i, src_i, dvc_i;
if (!of_data)
return;
@@ -750,6 +757,7 @@ static void rsnd_of_parse_dai(struct platform_device *pdev,
ssi_node = of_get_child_by_name(dev->of_node, "rcar_sound,ssi");
src_node = of_get_child_by_name(dev->of_node, "rcar_sound,src");
+ dvc_node = of_get_child_by_name(dev->of_node, "rcar_sound,dvc");
#define mod_parse(name) \
if (name##_node) { \
@@ -785,6 +793,7 @@ if (name##_node) { \
mod_parse(ssi);
mod_parse(src);
+ mod_parse(dvc);
if (playback)
of_node_put(playback);