summaryrefslogtreecommitdiffstats
path: root/sound/soc/sh/rcar/src.c
diff options
context:
space:
mode:
authorMark Brown <broonie@linaro.org>2014-03-24 12:16:33 +0100
committerMark Brown <broonie@linaro.org>2014-03-24 12:16:33 +0100
commitb51086eaee34a2a6fd34f8a37c8e77d1b1c07a44 (patch)
tree932726a834e171663258fbcf88dfde5e04deff2d /sound/soc/sh/rcar/src.c
parentMerge tag 'asoc-v3.15-2' into asoc-next (diff)
parentMerge remote-tracking branches 'asoc/topic/simple' and 'asoc/topic/sirf' into... (diff)
downloadlinux-b51086eaee34a2a6fd34f8a37c8e77d1b1c07a44.tar.xz
linux-b51086eaee34a2a6fd34f8a37c8e77d1b1c07a44.zip
Merge tag 'asoc-v3.15-3' into asoc-next
ASoC: Updates for v3.15 A few more updates for the merge window: - Fixes for the simple-card DAI format DT mess. - A new driver for Cirrus cs42xx8 devices. - DT support for a couple more devices. - A revert of a previous buggy fix for soc-pcm, plus a few more fixes and cleanups. # gpg: Signature made Sun 23 Mar 2014 16:56:11 GMT using RSA key ID 7EA229BD # gpg: Good signature from "Mark Brown <broonie@sirena.org.uk>" # gpg: aka "Mark Brown <broonie@debian.org>" # gpg: aka "Mark Brown <broonie@kernel.org>" # gpg: aka "Mark Brown <broonie@tardis.ed.ac.uk>" # gpg: aka "Mark Brown <broonie@linaro.org>" # gpg: aka "Mark Brown <Mark.Brown@linaro.org>"
Diffstat (limited to 'sound/soc/sh/rcar/src.c')
-rw-r--r--sound/soc/sh/rcar/src.c36
1 files changed, 36 insertions, 0 deletions
diff --git a/sound/soc/sh/rcar/src.c b/sound/soc/sh/rcar/src.c
index ea6a214985d0..eee75ebf961c 100644
--- a/sound/soc/sh/rcar/src.c
+++ b/sound/soc/sh/rcar/src.c
@@ -628,7 +628,41 @@ struct rsnd_mod *rsnd_src_mod_get(struct rsnd_priv *priv, int id)
return &((struct rsnd_src *)(priv->src) + id)->mod;
}
+static void rsnd_of_parse_src(struct platform_device *pdev,
+ const struct rsnd_of_data *of_data,
+ struct rsnd_priv *priv)
+{
+ struct device_node *src_node;
+ struct rcar_snd_info *info = rsnd_priv_to_info(priv);
+ struct rsnd_src_platform_info *src_info;
+ struct device *dev = &pdev->dev;
+ int nr;
+
+ if (!of_data)
+ return;
+
+ src_node = of_get_child_by_name(dev->of_node, "rcar_sound,src");
+ if (!src_node)
+ return;
+
+ nr = of_get_child_count(src_node);
+ if (!nr)
+ return;
+
+ src_info = devm_kzalloc(dev,
+ sizeof(struct rsnd_src_platform_info) * nr,
+ GFP_KERNEL);
+ if (!src_info) {
+ dev_err(dev, "src info allocation error\n");
+ return;
+ }
+
+ info->src_info = src_info;
+ info->src_info_nr = nr;
+}
+
int rsnd_src_probe(struct platform_device *pdev,
+ const struct rsnd_of_data *of_data,
struct rsnd_priv *priv)
{
struct rcar_snd_info *info = rsnd_priv_to_info(priv);
@@ -639,6 +673,8 @@ int rsnd_src_probe(struct platform_device *pdev,
char name[RSND_SRC_NAME_SIZE];
int i, nr;
+ rsnd_of_parse_src(pdev, of_data, priv);
+
/*
* init SRC
*/