alsa-devel.alsa-project.org archive mirror
 help / color / mirror / Atom feed
* Playback in infinitely loop - bug in alsa-jack-plugins?
@ 2015-01-16  9:42 Valentin Corfu
  0 siblings, 0 replies; only message in thread
From: Valentin Corfu @ 2015-01-16  9:42 UTC (permalink / raw)
  To: alsa-devel

Hello guys,

Few days ago I have started to look over a new challenging issue with alsa..
The problem is that the sound entry in a loop infinitely and it seems 
that the last samples in the buffer are just repeated over and over again.
This behaviour it happens when I have too less and only sporadically 
data ready to be playbacked on my embedded system configured with alsa 
jack pcm plugin.

To solve this issue, (I don't want to use snd_pcm_drain()), I see 2 ways:
     1) to clear(or overwrite with silence) the "just played" frames 
from the ring buffer
     2) when I am in this situation, to gracefully stop/close the alsa 
opened port

In both situations I have tried without success, 
_set_silence_threshold(), set_stop_threshold and other googled solutions..

More over, I also tested with "default" device and the result is as 
expected... the sound can be hear just once, then it's going into 
underrun state.

I also created a small test(based on pcm_min.c example), where I 
intentionally put a ~1s(can be more) delay after _writei() function, to 
see the issue reproduced. (http://pastebin.com/4KyUG0BA)

log with pcm jack plugin: http://pastebin.com/MtKQ4ASz
log with "default": http://pastebin.com/G0zq6fmJ

Now I'm suspecting one issue with the underrun, over alsa jack plugin...

(In case I'm not wrong with the test case or my assumption..)
  - Isn't it implemented underrun detection over jack plugin or it is a 
new bug here?


Best Regards,
Valentin Corfu

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2015-01-16  9:42 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-01-16  9:42 Playback in infinitely loop - bug in alsa-jack-plugins? Valentin Corfu

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).