From: "Mukunda,Vijendar" <vijendar.mukunda@amd.com>
To: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>,
Mark Brown <broonie@kernel.org>,
Linux-ALSA <alsa-devel@alsa-project.org>
Cc: "Vemuri, Murali-krishna" <Murali-krishna.Vemuri@amd.com>
Subject: Re: [PATCH 14/38] ASoC: amd: replace platform to component
Date: Wed, 24 Jan 2018 14:45:13 +0530 [thread overview]
Message-ID: <0bfdbf55-cff6-44eb-e245-94290a2064fd@amd.com> (raw)
In-Reply-To: <87vafs6q67.wl%kuninori.morimoto.gx@renesas.com>
Tested-by: Mukunda,Vijendar <vijendar.mukunda@amd.com>
On Wednesday 24 January 2018 06:16 AM, Kuninori Morimoto wrote:
> I have asked patch test to Mukunda / Vemuri.
> Cc this mail to them.
>
>> From: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
>>
>> Now platform can be replaced to component, let's do it.
>>
>> Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
>> ---
>> sound/soc/amd/acp-pcm-dma.c | 29 ++++++++++++++++++-----------
>> 1 file changed, 18 insertions(+), 11 deletions(-)
>>
>> diff --git a/sound/soc/amd/acp-pcm-dma.c b/sound/soc/amd/acp-pcm-dma.c
>> index c33a512..78d7b62 100644
>> --- a/sound/soc/amd/acp-pcm-dma.c
>> +++ b/sound/soc/amd/acp-pcm-dma.c
>> @@ -23,6 +23,8 @@
>> #include <drm/amd_asic_type.h>
>> #include "acp.h"
>>
>> +#define DRV_NAME "acp_audio_dma"
>> +
>> #define PLAYBACK_MIN_NUM_PERIODS 2
>> #define PLAYBACK_MAX_NUM_PERIODS 2
>> #define PLAYBACK_MAX_PERIOD_SIZE 16384
>> @@ -702,8 +704,8 @@ static int acp_dma_open(struct snd_pcm_substream *substream)
>> int ret = 0;
>> struct snd_pcm_runtime *runtime = substream->runtime;
>> struct snd_soc_pcm_runtime *prtd = substream->private_data;
>> - struct audio_drv_data *intr_data = dev_get_drvdata(prtd->platform->dev);
>> -
>> + struct snd_soc_component *component = snd_soc_rtdcom_lookup(prtd, DRV_NAME);
>> + struct audio_drv_data *intr_data = dev_get_drvdata(component->dev);
>> struct audio_substream_data *adata =
>> kzalloc(sizeof(struct audio_substream_data), GFP_KERNEL);
>> if (adata == NULL)
>> @@ -730,7 +732,7 @@ static int acp_dma_open(struct snd_pcm_substream *substream)
>> ret = snd_pcm_hw_constraint_integer(runtime,
>> SNDRV_PCM_HW_PARAM_PERIODS);
>> if (ret < 0) {
>> - dev_err(prtd->platform->dev, "set integer constraint failed\n");
>> + dev_err(component->dev, "set integer constraint failed\n");
>> kfree(adata);
>> return ret;
>> }
>> @@ -778,7 +780,8 @@ static int acp_dma_hw_params(struct snd_pcm_substream *substream,
>> struct snd_pcm_runtime *runtime;
>> struct audio_substream_data *rtd;
>> struct snd_soc_pcm_runtime *prtd = substream->private_data;
>> - struct audio_drv_data *adata = dev_get_drvdata(prtd->platform->dev);
>> + struct snd_soc_component *component = snd_soc_rtdcom_lookup(prtd, DRV_NAME);
>> + struct audio_drv_data *adata = dev_get_drvdata(component->dev);
>>
>> runtime = substream->runtime;
>> rtd = runtime->private_data;
>> @@ -907,6 +910,7 @@ static int acp_dma_trigger(struct snd_pcm_substream *substream, int cmd)
>> struct snd_pcm_runtime *runtime = substream->runtime;
>> struct snd_soc_pcm_runtime *prtd = substream->private_data;
>> struct audio_substream_data *rtd = runtime->private_data;
>> + struct snd_soc_component *component = snd_soc_rtdcom_lookup(prtd, DRV_NAME);
>>
>> if (!rtd)
>> return -EINVAL;
>> @@ -924,7 +928,7 @@ static int acp_dma_trigger(struct snd_pcm_substream *substream, int cmd)
>> while (acp_reg_read(rtd->acp_mmio, mmACP_DMA_CH_STS) &
>> BIT(SYSRAM_TO_ACP_CH_NUM)) {
>> if (!loops--) {
>> - dev_err(prtd->platform->dev,
>> + dev_err(component->dev,
>> "acp dma start timeout\n");
>> return -ETIMEDOUT;
>> }
>> @@ -970,7 +974,8 @@ static int acp_dma_trigger(struct snd_pcm_substream *substream, int cmd)
>> static int acp_dma_new(struct snd_soc_pcm_runtime *rtd)
>> {
>> int ret;
>> - struct audio_drv_data *adata = dev_get_drvdata(rtd->platform->dev);
>> + struct snd_soc_component *component = snd_soc_rtdcom_lookup(rtd, DRV_NAME);
>> + struct audio_drv_data *adata = dev_get_drvdata(component->dev);
>>
>> switch (adata->asic_type) {
>> case CHIP_STONEY:
>> @@ -987,7 +992,7 @@ static int acp_dma_new(struct snd_soc_pcm_runtime *rtd)
>> break;
>> }
>> if (ret < 0)
>> - dev_err(rtd->platform->dev,
>> + dev_err(component->dev,
>> "buffer preallocation failer error:%d\n", ret);
>> return ret;
>> }
>> @@ -998,7 +1003,8 @@ static int acp_dma_close(struct snd_pcm_substream *substream)
>> struct snd_pcm_runtime *runtime = substream->runtime;
>> struct audio_substream_data *rtd = runtime->private_data;
>> struct snd_soc_pcm_runtime *prtd = substream->private_data;
>> - struct audio_drv_data *adata = dev_get_drvdata(prtd->platform->dev);
>> + struct snd_soc_component *component = snd_soc_rtdcom_lookup(prtd, DRV_NAME);
>> + struct audio_drv_data *adata = dev_get_drvdata(component->dev);
>>
>> kfree(rtd);
>>
>> @@ -1044,7 +1050,8 @@ static int acp_dma_close(struct snd_pcm_substream *substream)
>> .prepare = acp_dma_prepare,
>> };
>>
>> -static struct snd_soc_platform_driver acp_asoc_platform = {
>> +static struct snd_soc_component_driver acp_asoc_platform = {
>> + .name = DRV_NAME,
>> .ops = &acp_dma_ops,
>> .pcm_new = acp_dma_new,
>> };
>> @@ -1102,7 +1109,8 @@ static int acp_audio_probe(struct platform_device *pdev)
>> return status;
>> }
>>
>> - status = snd_soc_register_platform(&pdev->dev, &acp_asoc_platform);
>> + status = devm_snd_soc_register_component(&pdev->dev,
>> + &acp_asoc_platform, NULL, 0);
>> if (status != 0) {
>> dev_err(&pdev->dev, "Fail to register ALSA platform device\n");
>> return status;
>> @@ -1123,7 +1131,6 @@ static int acp_audio_remove(struct platform_device *pdev)
>> status = acp_deinit(adata->acp_mmio);
>> if (status)
>> dev_err(&pdev->dev, "ACP Deinit failed status:%d\n", status);
>> - snd_soc_unregister_platform(&pdev->dev);
>> pm_runtime_disable(&pdev->dev);
>>
>> return 0;
>> --
>> 1.9.1
>>
next prev parent reply other threads:[~2018-01-24 9:16 UTC|newest]
Thread overview: 79+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-01-12 0:41 [PATCH 00/38] ASoC: replace platform to component Kuninori Morimoto
2018-01-12 0:42 ` [PATCH 01/38] ASoC: remove rtd->platform checck Kuninori Morimoto
2018-01-12 0:42 ` [PATCH 02/38] ASoC: soc-utils: replace platform to component Kuninori Morimoto
2018-01-12 0:43 ` [PATCH 03/38] ASoC: soc-generic-dmaengine-pcm: " Kuninori Morimoto
2018-02-12 12:32 ` Applied "ASoC: soc-generic-dmaengine-pcm: replace platform to component" to the asoc tree Mark Brown
2018-01-12 0:43 ` [PATCH 04/38] ASoC: intel: atom: replace platform to component Kuninori Morimoto
2018-01-12 0:43 ` [PATCH 05/38] ASoC: intel: skylake: " Kuninori Morimoto
2018-02-12 12:32 ` Applied "ASoC: intel: skylake: replace platform to component" to the asoc tree Mark Brown
2018-01-12 0:44 ` [PATCH 06/38] ASoC: intel: baytrail: replace platform to component Kuninori Morimoto
2018-02-12 12:32 ` Applied "ASoC: intel: baytrail: replace platform to component" to the asoc tree Mark Brown
2018-01-12 0:44 ` [PATCH 07/38] ASoC: intel: haswell: replace platform to component Kuninori Morimoto
2018-02-12 12:32 ` Applied "ASoC: intel: haswell: replace platform to component" to the asoc tree Mark Brown
2018-01-12 0:44 ` [PATCH 08/38] ASoC: bcm: cygnus: replace platform to component Kuninori Morimoto
2018-01-12 0:45 ` [PATCH 09/38] ASoC: sh: rsnd: " Kuninori Morimoto
2018-02-12 12:31 ` Applied "ASoC: sh: rsnd: replace platform to component" to the asoc tree Mark Brown
2018-01-12 0:45 ` [PATCH 10/38] ASoC: sh: dma-sh7760: replace platform to component Kuninori Morimoto
2018-02-12 12:31 ` Applied "ASoC: sh: dma-sh7760: replace platform to component" to the asoc tree Mark Brown
2018-01-12 0:45 ` [PATCH 11/38] ASoC: sh: fsi: replace platform to component Kuninori Morimoto
2018-01-12 0:46 ` [PATCH 12/38] ASoC: sh: siu: " Kuninori Morimoto
2018-01-12 0:46 ` [PATCH 13/38] ASoC: atmel: " Kuninori Morimoto
2018-02-12 12:30 ` Applied "ASoC: atmel: replace platform to component" to the asoc tree Mark Brown
2018-01-12 0:46 ` [PATCH 14/38] ASoC: amd: replace platform to component Kuninori Morimoto
2018-01-24 0:46 ` Kuninori Morimoto
2018-01-24 9:15 ` Mukunda,Vijendar [this message]
2018-02-12 12:30 ` Applied "ASoC: amd: replace platform to component" to the asoc tree Mark Brown
2018-01-12 0:47 ` [PATCH 15/38] ASoC: cs47l24: replace platform to component Kuninori Morimoto
2018-01-24 14:23 ` Charles Keepax
2018-02-12 12:30 ` Applied "ASoC: cs47l24: replace platform to component" to the asoc tree Mark Brown
2018-01-12 0:47 ` [PATCH 16/38] ASoC: rt5514-spi: replace platform to component Kuninori Morimoto
2018-02-12 12:30 ` Applied "ASoC: rt5514-spi: replace platform to component" to the asoc tree Mark Brown
2018-01-12 0:47 ` [PATCH 17/38] ASoC: wm5110: replace platform to component Kuninori Morimoto
2018-01-24 14:24 ` Charles Keepax
2018-02-12 12:30 ` Applied "ASoC: wm5110: replace platform to component" to the asoc tree Mark Brown
2018-01-12 0:48 ` [PATCH 18/38] ASoC: wm5102: replace platform to component Kuninori Morimoto
2018-01-24 14:25 ` Charles Keepax
2018-02-12 12:29 ` Applied "ASoC: wm5102: replace platform to component" to the asoc tree Mark Brown
2018-01-12 0:48 ` [PATCH 19/38] ASoC: davinci-i2s: replace platform to component Kuninori Morimoto
2018-02-12 12:29 ` Applied "ASoC: davinci-i2s: replace platform to component" to the asoc tree Mark Brown
2018-01-12 0:48 ` [PATCH 20/38] ASoC: fsl: dma: replace platform to component Kuninori Morimoto
2018-02-12 12:29 ` Applied "ASoC: fsl: dma: replace platform to component" to the asoc tree Mark Brown
2018-01-12 0:50 ` [PATCH 21/38] ASoC: fsl: asrc: replace platform to component Kuninori Morimoto
2018-01-16 0:55 ` Nicolin Chen
2018-02-12 12:29 ` Applied "ASoC: fsl: asrc: replace platform to component" to the asoc tree Mark Brown
2018-01-12 0:50 ` [PATCH 22/38] ASoC: fsl: imx: replace platform to component Kuninori Morimoto
2018-02-12 12:29 ` Applied "ASoC: fsl: imx: replace platform to component" to the asoc tree Mark Brown
2018-01-12 0:50 ` [PATCH 23/38] ASoC: fsl: mpc5200: replace platform to component Kuninori Morimoto
2018-02-12 12:29 ` Applied "ASoC: fsl: mpc5200: replace platform to component" to the asoc tree Mark Brown
2018-01-12 0:51 ` [PATCH 24/38] ASoC: dwc-pcm: replace platform to component Kuninori Morimoto
2018-02-12 12:29 ` Applied "ASoC: dwc-pcm: replace platform to component" to the asoc tree Mark Brown
2018-01-12 0:51 ` [PATCH 25/38] ASoC: kirkwood: replace platform to component Kuninori Morimoto
2018-02-12 12:29 ` Applied "ASoC: kirkwood: replace platform to component" to the asoc tree Mark Brown
2018-01-12 0:51 ` [PATCH 26/38] ASoC: pxa: mmp: replace platform to component Kuninori Morimoto
2018-02-12 12:29 ` Applied "ASoC: pxa: mmp: replace platform to component" to the asoc tree Mark Brown
2018-01-12 0:52 ` [PATCH 27/38] ASoC: pxa: pxa2xx: replace platform to component Kuninori Morimoto
2018-02-12 12:29 ` Applied "ASoC: pxa: pxa2xx: replace platform to component" to the asoc tree Mark Brown
2018-01-12 0:52 ` [PATCH 28/38] ASoC: qcom: lpass-platform: replace platform to component Kuninori Morimoto
2018-02-12 12:28 ` Applied "ASoC: qcom: lpass-platform: replace platform to component" to the asoc tree Mark Brown
2018-01-12 0:52 ` [PATCH 29/38] ASoC: samsung: idma: replace platform to component Kuninori Morimoto
2018-02-12 12:28 ` Applied "ASoC: samsung: idma: replace platform to component" to the asoc tree Mark Brown
2018-01-12 0:53 ` [PATCH 30/38] ASoC: xtfpga-i2s: replace platform to component Kuninori Morimoto
2018-02-12 12:28 ` Applied "ASoC: xtfpga-i2s: replace platform to component" to the asoc tree Mark Brown
2018-01-12 0:53 ` [PATCH 31/38] ASoC: blackfin: bf5xx-ac97-pcm: replace platform to component Kuninori Morimoto
2018-02-12 12:28 ` Applied "ASoC: blackfin: bf5xx-ac97-pcm: replace platform to component" to the asoc tree Mark Brown
2018-01-12 0:53 ` [PATCH 32/38] ASoC: blackfin: bf5xx-i2s-pcm: replace platform to component Kuninori Morimoto
2018-02-12 12:28 ` Applied "ASoC: blackfin: bf5xx-i2s-pcm: replace platform to component" to the asoc tree Mark Brown
2018-01-12 0:54 ` [PATCH 33/38] ASoC: omap-pcm: replace platform to component Kuninori Morimoto
2018-02-12 12:28 ` Applied "ASoC: omap-pcm: replace platform to component" to the asoc tree Mark Brown
2018-01-12 0:54 ` [PATCH 34/38] ASoC: au1x: dbdma2: replace platform to component Kuninori Morimoto
2018-02-12 12:28 ` Applied "ASoC: au1x: dbdma2: replace platform to component" to the asoc tree Mark Brown
2018-01-12 0:54 ` [PATCH 35/38] ASoC: au1x: dma: replace platform to component Kuninori Morimoto
2018-02-12 12:28 ` Applied "ASoC: au1x: dma: replace platform to component" to the asoc tree Mark Brown
2018-01-12 0:54 ` [PATCH 36/38] ASoC: nuc900-pcm: replace platform to component Kuninori Morimoto
2018-02-12 12:28 ` Applied "ASoC: nuc900-pcm: replace platform to component" to the asoc tree Mark Brown
2018-01-12 0:55 ` [PATCH 37/38] ASoC: txx9aclc: replace platform to component Kuninori Morimoto
2018-02-12 12:28 ` Applied "ASoC: txx9aclc: replace platform to component" to the asoc tree Mark Brown
2018-01-12 0:55 ` [PATCH 38/38] ASoC: mt2701/mt8173: replace platform to component Kuninori Morimoto
2018-01-12 9:46 ` [PATCH 00/38] ASoC: " Liam Girdwood
2018-01-12 11:28 ` Mark Brown
2018-01-14 23:51 ` Kuninori Morimoto
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=0bfdbf55-cff6-44eb-e245-94290a2064fd@amd.com \
--to=vijendar.mukunda@amd.com \
--cc=Murali-krishna.Vemuri@amd.com \
--cc=alsa-devel@alsa-project.org \
--cc=broonie@kernel.org \
--cc=kuninori.morimoto.gx@renesas.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: link
Be 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.