* [linux-sof-driver:pr/1269 9/30] sound/soc/sof/intel/hda-pcm.c:103:6: error: 'sof_pcm_period_elapsed_work' undeclared; did you mean 'snd_pcm_period_elapsed'?
@ 2019-09-30 20:11 kbuild test robot
0 siblings, 0 replies; only message in thread
From: kbuild test robot @ 2019-09-30 20:11 UTC (permalink / raw)
To: kbuild-all
[-- Attachment #1: Type: text/plain, Size: 7091 bytes --]
tree: https://github.com/thesofproject/linux pr/1269
head: 139650b647059f8f5fad2c406910f8907acd9c73
commit: 57c311789ab56a9c85dfc92c0459bef4295a72ec [9/30] ASoC: SOF: HDA: Intel: initialise elapsed period work
config: x86_64-sof-customedconfig-sof-defconfig (attached as .config)
compiler: gcc-7 (Debian 7.4.0-13) 7.4.0
reproduce:
git checkout 57c311789ab56a9c85dfc92c0459bef4295a72ec
# save the attached .config to linux build tree
make ARCH=x86_64
If you fix the issue, kindly add following tag
Reported-by: kbuild test robot <lkp@intel.com>
Note: the linux-sof-driver/pr/1269 HEAD 139650b647059f8f5fad2c406910f8907acd9c73 builds fine.
It only hurts bisectibility.
All error/warnings (new ones prefixed by >>):
In file included from include/linux/srcu.h:21:0,
from include/linux/notifier.h:16,
from arch/x86/include/asm/uprobes.h:13,
from include/linux/uprobes.h:49,
from include/linux/mm_types.h:14,
from include/linux/mmzone.h:21,
from include/linux/gfp.h:6,
from include/linux/xarray.h:14,
from include/linux/radix-tree.h:18,
from include/linux/idr.h:15,
from include/linux/kernfs.h:13,
from include/linux/sysfs.h:16,
from include/linux/kobject.h:20,
from include/linux/device.h:16,
from include/sound/hdaudio.h:9,
from include/sound/hda_register.h:12,
from sound/soc/sof/intel/hda-pcm.c:18:
sound/soc/sof/intel/hda-pcm.c: In function 'hda_dsp_pcm_hw_params':
>> sound/soc/sof/intel/hda-pcm.c:103:6: error: 'sof_pcm_period_elapsed_work' undeclared (first use in this function); did you mean 'snd_pcm_period_elapsed'?
sof_pcm_period_elapsed_work);
^
include/linux/workqueue.h:245:20: note: in definition of macro '__INIT_WORK'
(_work)->func = (_func); \
^~~~~
>> sound/soc/sof/intel/hda-pcm.c:102:3: note: in expansion of macro 'INIT_WORK'
INIT_WORK(&spcm->stream[substream->stream].period_elapsed_work,
^~~~~~~~~
sound/soc/sof/intel/hda-pcm.c:103:6: note: each undeclared identifier is reported only once for each function it appears in
sof_pcm_period_elapsed_work);
^
include/linux/workqueue.h:245:20: note: in definition of macro '__INIT_WORK'
(_work)->func = (_func); \
^~~~~
>> sound/soc/sof/intel/hda-pcm.c:102:3: note: in expansion of macro 'INIT_WORK'
INIT_WORK(&spcm->stream[substream->stream].period_elapsed_work,
^~~~~~~~~
vim +103 sound/soc/sof/intel/hda-pcm.c
13
14 /*
15 * Hardware interface for generic Intel audio DSP HDA IP
16 */
17
> 18 #include <sound/hda_register.h>
19 #include <sound/pcm_params.h>
20 #include "../ops.h"
21 #include "hda.h"
22
23 #define SDnFMT_BASE(x) ((x) << 14)
24 #define SDnFMT_MULT(x) (((x) - 1) << 11)
25 #define SDnFMT_DIV(x) (((x) - 1) << 8)
26 #define SDnFMT_BITS(x) ((x) << 4)
27 #define SDnFMT_CHAN(x) ((x) << 0)
28
29 static inline u32 get_mult_div(struct snd_sof_dev *sdev, int rate)
30 {
31 switch (rate) {
32 case 8000:
33 return SDnFMT_DIV(6);
34 case 9600:
35 return SDnFMT_DIV(5);
36 case 11025:
37 return SDnFMT_BASE(1) | SDnFMT_DIV(4);
38 case 16000:
39 return SDnFMT_DIV(3);
40 case 22050:
41 return SDnFMT_BASE(1) | SDnFMT_DIV(2);
42 case 32000:
43 return SDnFMT_DIV(3) | SDnFMT_MULT(2);
44 case 44100:
45 return SDnFMT_BASE(1);
46 case 48000:
47 return 0;
48 case 88200:
49 return SDnFMT_BASE(1) | SDnFMT_MULT(2);
50 case 96000:
51 return SDnFMT_MULT(2);
52 case 176400:
53 return SDnFMT_BASE(1) | SDnFMT_MULT(4);
54 case 192000:
55 return SDnFMT_MULT(4);
56 default:
57 dev_warn(sdev->dev, "can't find div rate %d using 48kHz\n",
58 rate);
59 return 0; /* use 48KHz if not found */
60 }
61 };
62
63 static inline u32 get_bits(struct snd_sof_dev *sdev, int sample_bits)
64 {
65 switch (sample_bits) {
66 case 8:
67 return SDnFMT_BITS(0);
68 case 16:
69 return SDnFMT_BITS(1);
70 case 20:
71 return SDnFMT_BITS(2);
72 case 24:
73 return SDnFMT_BITS(3);
74 case 32:
75 return SDnFMT_BITS(4);
76 default:
77 dev_warn(sdev->dev, "can't find %d bits using 16bit\n",
78 sample_bits);
79 return SDnFMT_BITS(1); /* use 16bits format if not found */
80 }
81 };
82
83 int hda_dsp_pcm_hw_params(struct snd_sof_dev *sdev,
84 struct snd_pcm_substream *substream,
85 struct snd_pcm_hw_params *params,
86 struct sof_ipc_stream_params *ipc_params)
87 {
88 struct hdac_stream *hstream = substream->runtime->private_data;
89 struct hdac_ext_stream *stream = stream_to_hdac_ext_stream(hstream);
90 struct sof_intel_hda_dev *hda = sdev->pdata->hw_pdata;
91 struct snd_dma_buffer *dmab;
92 struct snd_sof_pcm *spcm;
93 int ret;
94 u32 size, rate, bits;
95
96 size = params_buffer_bytes(params);
97 rate = get_mult_div(sdev, params_rate(params));
98 bits = get_bits(sdev, params_width(params));
99
100 spcm = snd_sof_find_spcm_dai(sdev, substream->private_data);
101 if (spcm)
> 102 INIT_WORK(&spcm->stream[substream->stream].period_elapsed_work,
> 103 sof_pcm_period_elapsed_work);
104
105 hstream->substream = substream;
106
107 dmab = substream->runtime->dma_buffer_p;
108
109 hstream->format_val = rate | bits | (params_channels(params) - 1);
110 hstream->bufsize = size;
111 hstream->period_bytes = params_period_bytes(params);
112 hstream->no_period_wakeup =
113 (params->info & SNDRV_PCM_INFO_NO_PERIOD_WAKEUP) &&
114 (params->flags & SNDRV_PCM_HW_PARAMS_NO_PERIOD_WAKEUP);
115
116 ret = hda_dsp_stream_hw_params(sdev, stream, dmab, params);
117 if (ret < 0) {
118 dev_err(sdev->dev, "error: hdac prepare failed: %x\n", ret);
119 return ret;
120 }
121
122 /* disable SPIB, to enable buffer wrap for stream */
123 hda_dsp_stream_spib_config(sdev, stream, HDA_DSP_SPIB_DISABLE, 0);
124
125 /* set host_period_bytes to 0 if no IPC position */
126 if (hda && hda->no_ipc_position)
127 ipc_params->host_period_bytes = 0;
128
129 ipc_params->stream_tag = hstream->stream_tag;
130
131 return 0;
132 }
133
---
0-DAY kernel test infrastructure Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all Intel Corporation
[-- Attachment #2: config.gz --]
[-- Type: application/gzip, Size: 32127 bytes --]
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2019-09-30 20:11 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-09-30 20:11 [linux-sof-driver:pr/1269 9/30] sound/soc/sof/intel/hda-pcm.c:103:6: error: 'sof_pcm_period_elapsed_work' undeclared; did you mean 'snd_pcm_period_elapsed'? kbuild test robot
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.