From mboxrd@z Thu Jan 1 00:00:00 1970 From: Kuninori Morimoto Subject: [PATCH 50/54 v2] ASoC: switch over to use snd_soc_register_component() on tegra20 ac97 Date: Thu, 21 Mar 2013 03:37:44 -0700 (PDT) Message-ID: <8738vpca2z.wl%kuninori.morimoto.gx@renesas.com> References: <87txo96xiu.wl%kuninori.morimoto.gx@renesas.com> <8738vpf3qd.wl%kuninori.morimoto.gx@renesas.com> Mime-Version: 1.0 (generated by SEMI 1.14.6 - "Maruoka") Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from mail-da0-f48.google.com (mail-da0-f48.google.com [209.85.210.48]) by alsa0.perex.cz (Postfix) with ESMTP id BDA9B265EE7 for ; Thu, 21 Mar 2013 11:37:46 +0100 (CET) Received: by mail-da0-f48.google.com with SMTP id p8so1564027dan.35 for ; Thu, 21 Mar 2013 03:37:45 -0700 (PDT) In-Reply-To: <8738vpf3qd.wl%kuninori.morimoto.gx@renesas.com> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: alsa-devel-bounces@alsa-project.org Sender: alsa-devel-bounces@alsa-project.org To: Mark Brown , Liam Girdwood , Lars-Peter Clausen , Stephen Warren , Peter Ujfalusi Cc: Linux-ALSA , Simon , Kuninori Morimoto List-Id: alsa-devel@alsa-project.org Signed-off-by: Kuninori Morimoto --- sound/soc/tegra/tegra20_ac97.c | 15 ++++++++++----- sound/soc/tegra/tegra_wm9712.c | 2 +- 2 files changed, 11 insertions(+), 6 deletions(-) diff --git a/sound/soc/tegra/tegra20_ac97.c b/sound/soc/tegra/tegra20_ac97.c index 336dcdd..b5cee92 100644 --- a/sound/soc/tegra/tegra20_ac97.c +++ b/sound/soc/tegra/tegra20_ac97.c @@ -248,6 +248,10 @@ static struct snd_soc_dai_driver tegra20_ac97_dai = { .ops = &tegra20_ac97_dai_ops, }; +static const struct snd_soc_component_driver tegra20_ac97_component = { + .name = DRV_NAME, +}; + static bool tegra20_ac97_wr_rd_reg(struct device *dev, unsigned int reg) { switch (reg) { @@ -398,7 +402,8 @@ static int tegra20_ac97_platform_probe(struct platform_device *pdev) ac97->playback_dma_data.width = 32; ac97->playback_dma_data.req_sel = of_dma[1]; - ret = snd_soc_register_dais(&pdev->dev, &tegra20_ac97_dai, 1); + ret = snd_soc_register_component(&pdev->dev, &tegra20_ac97_component, + &tegra20_ac97_dai, 1); if (ret) { dev_err(&pdev->dev, "Could not register DAI: %d\n", ret); ret = -ENOMEM; @@ -408,7 +413,7 @@ static int tegra20_ac97_platform_probe(struct platform_device *pdev) ret = tegra_pcm_platform_register(&pdev->dev); if (ret) { dev_err(&pdev->dev, "Could not register PCM: %d\n", ret); - goto err_unregister_dai; + goto err_unregister_component; } ret = tegra_asoc_utils_init(&ac97->util_data, &pdev->dev); @@ -434,8 +439,8 @@ err_asoc_utils_fini: tegra_asoc_utils_fini(&ac97->util_data); err_unregister_pcm: tegra_pcm_platform_unregister(&pdev->dev); -err_unregister_dai: - snd_soc_unregister_dai(&pdev->dev); +err_unregister_component: + snd_soc_unregister_component(&pdev->dev); err_clk_put: clk_put(ac97->clk_ac97); err: @@ -447,7 +452,7 @@ static int tegra20_ac97_platform_remove(struct platform_device *pdev) struct tegra20_ac97 *ac97 = dev_get_drvdata(&pdev->dev); tegra_pcm_platform_unregister(&pdev->dev); - snd_soc_unregister_dai(&pdev->dev); + snd_soc_unregister_component(&pdev->dev); tegra_asoc_utils_fini(&ac97->util_data); diff --git a/sound/soc/tegra/tegra_wm9712.c b/sound/soc/tegra/tegra_wm9712.c index 68d4240..6839f88 100644 --- a/sound/soc/tegra/tegra_wm9712.c +++ b/sound/soc/tegra/tegra_wm9712.c @@ -55,7 +55,7 @@ static int tegra_wm9712_init(struct snd_soc_pcm_runtime *rtd) static struct snd_soc_dai_link tegra_wm9712_dai = { .name = "AC97 HiFi", .stream_name = "AC97 HiFi", - .cpu_dai_name = "tegra-ac97-pcm", + .cpu_dai_name = "tegra20-ac97", .codec_dai_name = "wm9712-hifi", .codec_name = "wm9712-codec", .init = tegra_wm9712_init, -- 1.7.9.5