]> rtime.felk.cvut.cz Git - linux-imx.git/commitdiff
ASoC: switch over to use snd_soc_register_component() on sh4 siu
authorKuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Fri, 22 Mar 2013 07:54:50 +0000 (00:54 -0700)
committerMark Brown <broonie@opensource.wolfsonmicro.com>
Tue, 26 Mar 2013 21:57:55 +0000 (21:57 +0000)
siu_dai.c is using snd_soc_register_dais(),
even though array size of siu_i2s_dai is 1.
OTOH, new API snd_soc_register_component() uses properly
snd_soc_register_dai()  (henceforth dai()) or
snd_soc_register_dais() (henceforth dais()) via num_dai.
Then, cpu_dai_name will be "siu-i2s-dai" if dais() was used,
and it will be "siu-pcm-audio" if dai() was used.
Therefore this patch fixup migor_dai :: cpu_dai_name too.

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
sound/soc/sh/migor.c
sound/soc/sh/siu_dai.c

index 8526e1edaf45cad2fc4ba1d1e30b9b59a1e8f951..5014a884afeebff8fdf168a76dd90d33e2387bbf 100644 (file)
@@ -153,7 +153,7 @@ static int migor_dai_init(struct snd_soc_pcm_runtime *rtd)
 static struct snd_soc_dai_link migor_dai = {
        .name = "wm8978",
        .stream_name = "WM8978",
-       .cpu_dai_name = "siu-i2s-dai",
+       .cpu_dai_name = "siu-pcm-audio",
        .codec_dai_name = "wm8978-hifi",
        .platform_name = "siu-pcm-audio",
        .codec_name = "wm8978.0-001a",
index 34facdc9e4acfd68594e3db561b2aca108235459..9dc24ffa892a45fcee55009322aeebaa768b361f 100644 (file)
@@ -726,6 +726,10 @@ static struct snd_soc_dai_driver siu_i2s_dai = {
        .ops = &siu_dai_ops,
 };
 
+static const struct snd_soc_component_driver siu_i2s_component = {
+       .name           = "siu-i2s",
+};
+
 static int siu_probe(struct platform_device *pdev)
 {
        const struct firmware *fw_entry;
@@ -783,7 +787,8 @@ static int siu_probe(struct platform_device *pdev)
        dev_set_drvdata(&pdev->dev, info);
 
        /* register using ARRAY version so we can keep dai name */
-       ret = snd_soc_register_dais(&pdev->dev, &siu_i2s_dai, 1);
+       ret = snd_soc_register_component(&pdev->dev, &siu_i2s_component,
+                                        &siu_i2s_dai, 1);
        if (ret < 0)
                goto edaiinit;
 
@@ -796,7 +801,7 @@ static int siu_probe(struct platform_device *pdev)
        return ret;
 
 esocregp:
-       snd_soc_unregister_dai(&pdev->dev);
+       snd_soc_unregister_component(&pdev->dev);
 edaiinit:
        iounmap(info->reg);
 emapreg:
@@ -823,7 +828,7 @@ static int siu_remove(struct platform_device *pdev)
        pm_runtime_disable(&pdev->dev);
 
        snd_soc_unregister_platform(&pdev->dev);
-       snd_soc_unregister_dai(&pdev->dev);
+       snd_soc_unregister_component(&pdev->dev);
 
        iounmap(info->reg);
        iounmap(info->yram);