[alsa-devel] [sound:for-next 127/148] sound/drivers/aloop.c:313: undefined reference to `snd_timer_close'
kbuild test robot
lkp at intel.com
Sat Nov 23 23:17:53 CET 2019
tree: https://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound.git for-next
head: 9314e44f455c8b46d08b2d379cb9e8fba5767207
commit: 26c53379f98d22d6a3e50bb146651dc7824334d7 [127/148] ALSA: aloop: Support selection of snd_timer instead of jiffies
config: i386-randconfig-f001-20191124 (attached as .config)
compiler: gcc-7 (Debian 7.4.0-14) 7.4.0
reproduce:
git checkout 26c53379f98d22d6a3e50bb146651dc7824334d7
# save the attached .config to linux build tree
make ARCH=i386
If you fix the issue, kindly add following tag
Reported-by: kbuild test robot <lkp at intel.com>
All errors (new ones prefixed by >>):
ld: sound/drivers/aloop.o: in function `loopback_snd_timer_close_cable':
>> sound/drivers/aloop.c:313: undefined reference to `snd_timer_close'
>> ld: sound/drivers/aloop.c:314: undefined reference to `snd_timer_instance_free'
ld: sound/drivers/aloop.o: in function `loopback_snd_timer_stop':
>> sound/drivers/aloop.c:276: undefined reference to `snd_timer_stop'
ld: sound/drivers/aloop.o: in function `loopback_snd_timer_start':
>> sound/drivers/aloop.c:237: undefined reference to `snd_timer_start'
ld: sound/drivers/aloop.o: in function `loopback_snd_timer_open':
>> sound/drivers/aloop.c:1129: undefined reference to `snd_timer_instance_new'
>> ld: sound/drivers/aloop.c:1164: undefined reference to `snd_timer_open'
ld: sound/drivers/aloop.c:1173: undefined reference to `snd_timer_instance_free'
vim +313 sound/drivers/aloop.c
227
228 /* call in cable->lock */
229 static int loopback_snd_timer_start(struct loopback_pcm *dpcm)
230 {
231 struct loopback_cable *cable = dpcm->cable;
232 int err;
233
234 /* Loopback device has to use same period as timer card. Therefore
235 * wake up for each snd_pcm_period_elapsed() call of timer card.
236 */
> 237 err = snd_timer_start(cable->snd_timer.instance, 1);
238 if (err < 0) {
239 /* do not report error if trying to start but already
240 * running. For example called by opposite substream
241 * of the same cable
242 */
243 if (err == -EBUSY)
244 return 0;
245
246 pcm_err(dpcm->substream->pcm,
247 "snd_timer_start(%d,%d,%d) failed with %d",
248 cable->snd_timer.id.card,
249 cable->snd_timer.id.device,
250 cable->snd_timer.id.subdevice,
251 err);
252 }
253
254 return err;
255 }
256
257 /* call in cable->lock */
258 static inline int loopback_jiffies_timer_stop(struct loopback_pcm *dpcm)
259 {
260 del_timer(&dpcm->timer);
261 dpcm->timer.expires = 0;
262
263 return 0;
264 }
265
266 /* call in cable->lock */
267 static int loopback_snd_timer_stop(struct loopback_pcm *dpcm)
268 {
269 struct loopback_cable *cable = dpcm->cable;
270 int err;
271
272 /* only stop if both devices (playback and capture) are not running */
273 if (cable->running ^ cable->pause)
274 return 0;
275
> 276 err = snd_timer_stop(cable->snd_timer.instance);
277 if (err < 0) {
278 pcm_err(dpcm->substream->pcm,
279 "snd_timer_stop(%d,%d,%d) failed with %d",
280 cable->snd_timer.id.card,
281 cable->snd_timer.id.device,
282 cable->snd_timer.id.subdevice,
283 err);
284 }
285
286 return err;
287 }
288
289 static inline int loopback_jiffies_timer_stop_sync(struct loopback_pcm *dpcm)
290 {
291 del_timer_sync(&dpcm->timer);
292
293 return 0;
294 }
295
296 /* call in loopback->cable_lock */
297 static int loopback_snd_timer_close_cable(struct loopback_pcm *dpcm)
298 {
299 struct loopback_cable *cable = dpcm->cable;
300
301 /* snd_timer was not opened */
302 if (!cable->snd_timer.instance)
303 return 0;
304
305 /* wait till drain tasklet has finished if requested */
306 tasklet_kill(&cable->snd_timer.event_tasklet);
307
308 /* will only be called from free_cable() when other stream was
309 * already closed. Other stream cannot be reopened as long as
310 * loopback->cable_lock is locked. Therefore no need to lock
311 * cable->lock;
312 */
> 313 snd_timer_close(cable->snd_timer.instance);
> 314 snd_timer_instance_free(cable->snd_timer.instance);
315 memset(&cable->snd_timer, 0, sizeof(cable->snd_timer));
316
317 return 0;
318 }
319
---
0-DAY kernel test infrastructure Open Source Technology Center
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org Intel Corporation
-------------- next part --------------
A non-text attachment was scrubbed...
Name: .config.gz
Type: application/gzip
Size: 33863 bytes
Desc: not available
URL: <http://mailman.alsa-project.org/pipermail/alsa-devel/attachments/20191124/d4a59d59/attachment-0001.gz>
More information about the Alsa-devel
mailing list