From: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> To: Ravulapati Vishnu vardhan rao <Vishnuvardhanrao.Ravulapati@amd.com> Cc: "moderated list:SOUND - SOC LAYER / DYNAMIC AUDIO POWER MANAGEM..." <alsa-devel@alsa-project.org>, Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>, "Gustavo A. R. Silva" <gustavo@embeddedor.com>, open list <linux-kernel@vger.kernel.org>, Takashi Iwai <tiwai@suse.com>, YueHaibing <yuehaibing@huawei.com>, Liam Girdwood <lgirdwood@gmail.com>, Akshu.Agrawal@amd.com, Mark Brown <broonie@kernel.org>, djkurtz@google.com, Vijendar Mukunda <Vijendar.Mukunda@amd.com>, Alexander.Deucher@amd.com Subject: Re: [alsa-devel] [PATCH v8 2/6] ASoC: amd: Refactoring of DAI from DMA driver Date: Tue, 19 Nov 2019 07:53:59 -0600 [thread overview] Message-ID: <0c3d3545-b0ee-4bb3-558a-045633a30e46@linux.intel.com> (raw) In-Reply-To: <1574155967-1315-3-git-send-email-Vishnuvardhanrao.Ravulapati@amd.com> > +static int acp3x_dai_probe(struct platform_device *pdev) > +{ > + struct resource *res; > + struct i2s_dev_data *adata; > + int status; > + > + adata = devm_kzalloc(&pdev->dev, sizeof(struct i2s_dev_data), > + GFP_KERNEL); > + if (!adata) > + return -ENOMEM; > + > + res = platform_get_resource(pdev, IORESOURCE_MEM, 0); > + if (!res) { > + dev_err(&pdev->dev, "IORESOURCE_MEM FAILED\n"); > + return -ENOMEM; > + } > + > + adata->acp3x_base = devm_ioremap(&pdev->dev, res->start, > + resource_size(res)); > + if (IS_ERR(adata->acp3x_base)) > + return PTR_ERR(adata->acp3x_base); > + > + adata->i2s_irq = res->start; > + dev_set_drvdata(&pdev->dev, adata); > + status = devm_snd_soc_register_component(&pdev->dev, > + &acp3x_dai_component, &acp3x_i2s_dai, 1); > + if (status) { > + dev_err(&pdev->dev, "Fail to register acp i2s dai\n"); > + return -ENODEV; > + } > + pm_runtime_set_autosuspend_delay(&pdev->dev, 5000); > + pm_runtime_use_autosuspend(&pdev->dev); > + pm_runtime_enable(&pdev->dev); question: here you want to use pm_runtime for this platform device... > + return 0; > +} > + > +static int acp3x_dai_remove(struct platform_device *pdev) > +{ > + pm_runtime_disable(&pdev->dev); > + return 0; > +} > +static struct platform_driver acp3x_dai_driver = { > + .probe = acp3x_dai_probe, > + .remove = acp3x_dai_remove, > + .driver = { > + .name = "acp3x_i2s_playcap", ... but here there is no .pm structure and I don't see any suspend/resume routines for this driver... > + }, > +}; > @@ -774,13 +586,14 @@ static struct platform_driver acp3x_dma_driver = { > .probe = acp3x_audio_probe, > .remove = acp3x_audio_remove, > .driver = { > - .name = "acp3x_rv_i2s", > + .name = "acp3x_rv_i2s_dma", > .pm = &acp3x_pm_ops, > }, ... but for this other platform_driver you do have a .pm structure and suspend-resume implementations. Wondering if this is a miss or a feature?
WARNING: multiple messages have this Message-ID (diff)
From: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> To: Ravulapati Vishnu vardhan rao <Vishnuvardhanrao.Ravulapati@amd.com> Cc: "moderated list:SOUND - SOC LAYER / DYNAMIC AUDIO POWER MANAGEM..." <alsa-devel@alsa-project.org>, Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>, "Gustavo A. R. Silva" <gustavo@embeddedor.com>, Liam Girdwood <lgirdwood@gmail.com>, YueHaibing <yuehaibing@huawei.com>, Takashi Iwai <tiwai@suse.com>, open list <linux-kernel@vger.kernel.org>, Mark Brown <broonie@kernel.org>, djkurtz@google.com, Vijendar Mukunda <Vijendar.Mukunda@amd.com>, Alexander.Deucher@amd.com, Akshu.Agrawal@amd.com Subject: Re: [alsa-devel] [PATCH v8 2/6] ASoC: amd: Refactoring of DAI from DMA driver Date: Tue, 19 Nov 2019 07:53:59 -0600 [thread overview] Message-ID: <0c3d3545-b0ee-4bb3-558a-045633a30e46@linux.intel.com> (raw) In-Reply-To: <1574155967-1315-3-git-send-email-Vishnuvardhanrao.Ravulapati@amd.com> > +static int acp3x_dai_probe(struct platform_device *pdev) > +{ > + struct resource *res; > + struct i2s_dev_data *adata; > + int status; > + > + adata = devm_kzalloc(&pdev->dev, sizeof(struct i2s_dev_data), > + GFP_KERNEL); > + if (!adata) > + return -ENOMEM; > + > + res = platform_get_resource(pdev, IORESOURCE_MEM, 0); > + if (!res) { > + dev_err(&pdev->dev, "IORESOURCE_MEM FAILED\n"); > + return -ENOMEM; > + } > + > + adata->acp3x_base = devm_ioremap(&pdev->dev, res->start, > + resource_size(res)); > + if (IS_ERR(adata->acp3x_base)) > + return PTR_ERR(adata->acp3x_base); > + > + adata->i2s_irq = res->start; > + dev_set_drvdata(&pdev->dev, adata); > + status = devm_snd_soc_register_component(&pdev->dev, > + &acp3x_dai_component, &acp3x_i2s_dai, 1); > + if (status) { > + dev_err(&pdev->dev, "Fail to register acp i2s dai\n"); > + return -ENODEV; > + } > + pm_runtime_set_autosuspend_delay(&pdev->dev, 5000); > + pm_runtime_use_autosuspend(&pdev->dev); > + pm_runtime_enable(&pdev->dev); question: here you want to use pm_runtime for this platform device... > + return 0; > +} > + > +static int acp3x_dai_remove(struct platform_device *pdev) > +{ > + pm_runtime_disable(&pdev->dev); > + return 0; > +} > +static struct platform_driver acp3x_dai_driver = { > + .probe = acp3x_dai_probe, > + .remove = acp3x_dai_remove, > + .driver = { > + .name = "acp3x_i2s_playcap", ... but here there is no .pm structure and I don't see any suspend/resume routines for this driver... > + }, > +}; > @@ -774,13 +586,14 @@ static struct platform_driver acp3x_dma_driver = { > .probe = acp3x_audio_probe, > .remove = acp3x_audio_remove, > .driver = { > - .name = "acp3x_rv_i2s", > + .name = "acp3x_rv_i2s_dma", > .pm = &acp3x_pm_ops, > }, ... but for this other platform_driver you do have a .pm structure and suspend-resume implementations. Wondering if this is a miss or a feature? _______________________________________________ Alsa-devel mailing list Alsa-devel@alsa-project.org https://mailman.alsa-project.org/mailman/listinfo/alsa-devel
next prev parent reply other threads:[~2019-11-19 14:25 UTC|newest] Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top [not found] <1574155967-1315-1-git-send-email-Vishnuvardhanrao.Ravulapati@amd.com> 2019-11-19 9:32 ` [PATCH v8 1/6] ASoC: amd:Create multiple I2S platform device endpoint Ravulapati Vishnu vardhan rao 2019-11-19 9:32 ` [alsa-devel] " Ravulapati Vishnu vardhan rao 2019-11-19 11:14 ` Dan Carpenter 2019-11-19 11:14 ` [alsa-devel] " Dan Carpenter 2019-11-19 9:32 ` [PATCH v8 2/6] ASoC: amd: Refactoring of DAI from DMA driver Ravulapati Vishnu vardhan rao 2019-11-19 9:32 ` [alsa-devel] " Ravulapati Vishnu vardhan rao 2019-11-19 13:53 ` Pierre-Louis Bossart [this message] 2019-11-19 13:53 ` Pierre-Louis Bossart 2019-11-20 7:21 ` vishnu 2019-11-20 7:21 ` vishnu 2019-11-20 14:48 ` Pierre-Louis Bossart 2019-11-20 14:48 ` Pierre-Louis Bossart 2019-11-19 9:32 ` [PATCH v8 3/6] ASoC: amd: Enabling I2S instance in DMA and DAI Ravulapati Vishnu vardhan rao 2019-11-19 9:32 ` [alsa-devel] " Ravulapati Vishnu vardhan rao 2019-11-19 9:32 ` [PATCH v8 4/6] ASoC: amd: add ACP3x TDM mode support Ravulapati Vishnu vardhan rao 2019-11-19 9:32 ` [alsa-devel] " Ravulapati Vishnu vardhan rao 2019-11-19 9:32 ` [PATCH v8 5/6] ASoC: amd: Handle ACP3x I2S-SP Interrupts Ravulapati Vishnu vardhan rao 2019-11-19 9:32 ` [alsa-devel] " Ravulapati Vishnu vardhan rao 2019-11-19 9:32 ` [PATCH v8 6/6] ASoC: amd: Added ACP3x system resume and runtime pm Ravulapati Vishnu vardhan rao 2019-11-19 9:32 ` [alsa-devel] " Ravulapati Vishnu vardhan rao
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=0c3d3545-b0ee-4bb3-558a-045633a30e46@linux.intel.com \ --to=pierre-louis.bossart@linux.intel.com \ --cc=Akshu.Agrawal@amd.com \ --cc=Alexander.Deucher@amd.com \ --cc=Vijendar.Mukunda@amd.com \ --cc=Vishnuvardhanrao.Ravulapati@amd.com \ --cc=alsa-devel@alsa-project.org \ --cc=broonie@kernel.org \ --cc=djkurtz@google.com \ --cc=gustavo@embeddedor.com \ --cc=kuninori.morimoto.gx@renesas.com \ --cc=lgirdwood@gmail.com \ --cc=linux-kernel@vger.kernel.org \ --cc=tiwai@suse.com \ --cc=yuehaibing@huawei.com \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes, see mirroring instructions on how to clone and mirror all data and code used by this external index.