Re: [alsa-devel] [PATCH] ASoC: AMD: make channel 1 dma as circular
From: kbuild test robot
Date: Sun May 27 2018 - 08:11:44 EST
Hi Akshu,
Thank you for the patch! Yet something to improve:
[auto build test ERROR on asoc/for-next]
[cannot apply to v4.17-rc6]
[if your patch is applied to the wrong git tree, please drop us a note to help improve the system]
url: https://github.com/0day-ci/linux/commits/Akshu-Agrawal/ASoC-AMD-make-channel-1-dma-as-circular/20180527-170008
base: https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git for-next
config: x86_64-randconfig-x014-201821 (attached as .config)
compiler: gcc-7 (Debian 7.3.0-16) 7.3.0
reproduce:
# save the attached .config to linux build tree
make ARCH=x86_64
All errors (new ones prefixed by >>):
sound/soc//amd/acp-pcm-dma.c: In function 'acp_dma_trigger':
>> sound/soc//amd/acp-pcm-dma.c:978:62: error: 'prtd' undeclared (first use in this function); did you mean 'rtd'?
struct snd_soc_component *component = snd_soc_rtdcom_lookup(prtd,
^~~~
rtd
sound/soc//amd/acp-pcm-dma.c:978:62: note: each undeclared identifier is reported only once for each function it appears in
sound/soc//amd/acp-pcm-dma.c:978:28: warning: unused variable 'component' [-Wunused-variable]
struct snd_soc_component *component = snd_soc_rtdcom_lookup(prtd,
^~~~~~~~~
vim +978 sound/soc//amd/acp-pcm-dma.c
7c31335a Maruthi Srinivas Bayyavarapu 2016-01-08 970
7c31335a Maruthi Srinivas Bayyavarapu 2016-01-08 971 static int acp_dma_trigger(struct snd_pcm_substream *substream, int cmd)
7c31335a Maruthi Srinivas Bayyavarapu 2016-01-08 972 {
7c31335a Maruthi Srinivas Bayyavarapu 2016-01-08 973 int ret;
61add814 Vijendar Mukunda 2017-11-03 974 u64 bytescount = 0;
7c31335a Maruthi Srinivas Bayyavarapu 2016-01-08 975
7c31335a Maruthi Srinivas Bayyavarapu 2016-01-08 976 struct snd_pcm_runtime *runtime = substream->runtime;
7c31335a Maruthi Srinivas Bayyavarapu 2016-01-08 977 struct audio_substream_data *rtd = runtime->private_data;
13838c11 Mukunda, Vijendar 2018-04-17 @978 struct snd_soc_component *component = snd_soc_rtdcom_lookup(prtd,
13838c11 Mukunda, Vijendar 2018-04-17 979 DRV_NAME);
7c31335a Maruthi Srinivas Bayyavarapu 2016-01-08 980
7c31335a Maruthi Srinivas Bayyavarapu 2016-01-08 981 if (!rtd)
7c31335a Maruthi Srinivas Bayyavarapu 2016-01-08 982 return -EINVAL;
7c31335a Maruthi Srinivas Bayyavarapu 2016-01-08 983 switch (cmd) {
7c31335a Maruthi Srinivas Bayyavarapu 2016-01-08 984 case SNDRV_PCM_TRIGGER_START:
7c31335a Maruthi Srinivas Bayyavarapu 2016-01-08 985 case SNDRV_PCM_TRIGGER_PAUSE_RELEASE:
7c31335a Maruthi Srinivas Bayyavarapu 2016-01-08 986 case SNDRV_PCM_TRIGGER_RESUME:
7f004847 Vijendar Mukunda 2018-05-08 987 bytescount = acp_get_byte_count(rtd);
9af8937e Vijendar Mukunda 2018-05-08 988 if (rtd->bytescount == 0)
9af8937e Vijendar Mukunda 2018-05-08 989 rtd->bytescount = bytescount;
7c31335a Maruthi Srinivas Bayyavarapu 2016-01-08 990 if (substream->stream == SNDRV_PCM_STREAM_PLAYBACK) {
695a41b3 Akshu Agrawal 2018-05-25 991 acp_dma_start(rtd->acp_mmio, rtd->ch1);
695a41b3 Akshu Agrawal 2018-05-25 992 acp_dma_start(rtd->acp_mmio, rtd->ch2);
695a41b3 Akshu Agrawal 2018-05-25 993 } else {
695a41b3 Akshu Agrawal 2018-05-25 994 acp_dma_start(rtd->acp_mmio, rtd->ch2);
695a41b3 Akshu Agrawal 2018-05-25 995 acp_dma_start(rtd->acp_mmio, rtd->ch1);
7c31335a Maruthi Srinivas Bayyavarapu 2016-01-08 996 }
7c31335a Maruthi Srinivas Bayyavarapu 2016-01-08 997 ret = 0;
7c31335a Maruthi Srinivas Bayyavarapu 2016-01-08 998 break;
7c31335a Maruthi Srinivas Bayyavarapu 2016-01-08 999 case SNDRV_PCM_TRIGGER_STOP:
7c31335a Maruthi Srinivas Bayyavarapu 2016-01-08 1000 case SNDRV_PCM_TRIGGER_PAUSE_PUSH:
7c31335a Maruthi Srinivas Bayyavarapu 2016-01-08 1001 case SNDRV_PCM_TRIGGER_SUSPEND:
8769bb55 Vijendar Mukunda 2018-05-08 1002 /* For playback, non circular dma should be stopped first
8769bb55 Vijendar Mukunda 2018-05-08 1003 * i.e Sysram to acp dma transfer channel(rtd->ch1) should be
8769bb55 Vijendar Mukunda 2018-05-08 1004 * stopped before stopping cirular dma which is acp sram to i2s
8769bb55 Vijendar Mukunda 2018-05-08 1005 * fifo dma transfer channel(rtd->ch2). Where as in Capture
8769bb55 Vijendar Mukunda 2018-05-08 1006 * scenario, i2s fifo to acp sram dma channel(rtd->ch2) stopped
8769bb55 Vijendar Mukunda 2018-05-08 1007 * first before stopping acp sram to sysram which is circular
8769bb55 Vijendar Mukunda 2018-05-08 1008 * dma(rtd->ch1).
7c31335a Maruthi Srinivas Bayyavarapu 2016-01-08 1009 */
61add814 Vijendar Mukunda 2017-11-03 1010 if (substream->stream == SNDRV_PCM_STREAM_PLAYBACK) {
8769bb55 Vijendar Mukunda 2018-05-08 1011 acp_dma_stop(rtd->acp_mmio, rtd->ch1);
8769bb55 Vijendar Mukunda 2018-05-08 1012 ret = acp_dma_stop(rtd->acp_mmio, rtd->ch2);
61add814 Vijendar Mukunda 2017-11-03 1013 } else {
8769bb55 Vijendar Mukunda 2018-05-08 1014 acp_dma_stop(rtd->acp_mmio, rtd->ch2);
8769bb55 Vijendar Mukunda 2018-05-08 1015 ret = acp_dma_stop(rtd->acp_mmio, rtd->ch1);
61add814 Vijendar Mukunda 2017-11-03 1016 }
9af8937e Vijendar Mukunda 2018-05-08 1017 rtd->bytescount = 0;
7c31335a Maruthi Srinivas Bayyavarapu 2016-01-08 1018 break;
7c31335a Maruthi Srinivas Bayyavarapu 2016-01-08 1019 default:
7c31335a Maruthi Srinivas Bayyavarapu 2016-01-08 1020 ret = -EINVAL;
7c31335a Maruthi Srinivas Bayyavarapu 2016-01-08 1021 }
7c31335a Maruthi Srinivas Bayyavarapu 2016-01-08 1022 return ret;
7c31335a Maruthi Srinivas Bayyavarapu 2016-01-08 1023 }
7c31335a Maruthi Srinivas Bayyavarapu 2016-01-08 1024
:::::: The code at line 978 was first introduced by commit
:::::: 13838c11c31e764d8143fdfcccea47691afd5ff2 ASoC: amd: fixed checkpatch pl warnings
:::::: TO: Mukunda, Vijendar <Vijendar.Mukunda@xxxxxxx>
:::::: CC: Mark Brown <broonie@xxxxxxxxxx>
---
0-DAY kernel test infrastructure Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all Intel Corporation
Attachment:
.config.gz
Description: application/gzip