From: Valentin Corfu <corfuvalentin@gmail.com>
To: alsa-devel@alsa-project.org
Subject: Playback in infinitely loop - bug in alsa-jack-plugins?
Date: Fri, 16 Jan 2015 11:42:46 +0200 [thread overview]
Message-ID: <54B8DD16.7020406@gmail.com> (raw)
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
reply other threads:[~2015-01-16 9:42 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=54B8DD16.7020406@gmail.com \
--to=corfuvalentin@gmail.com \
--cc=alsa-devel@alsa-project.org \
/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 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).