diff options
author | Takashi Iwai <tiwai@suse.de> | 2014-03-24 09:24:39 +0100 |
---|---|---|
committer | Takashi Iwai <tiwai@suse.de> | 2014-03-24 09:24:39 +0100 |
commit | 89c8ae73459443eabfd7f24b4379ddb9248f1ee9 (patch) | |
tree | e13e7c3a780668da718161305f2d1741c0b7ae6f /sound/soc/sh/rcar/src.c | |
parent | ALSA: hda - verify pin:cvt connection on preparing a stream for Intel HDMI codec (diff) | |
parent | Merge remote-tracking branches 'asoc/topic/simple' and 'asoc/topic/sirf' into... (diff) | |
download | linux-89c8ae73459443eabfd7f24b4379ddb9248f1ee9.tar.xz linux-89c8ae73459443eabfd7f24b4379ddb9248f1ee9.zip |
Merge tag 'asoc-v3.15-3' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound into for-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.
Diffstat (limited to 'sound/soc/sh/rcar/src.c')
-rw-r--r-- | sound/soc/sh/rcar/src.c | 36 |
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 */ |