From: Takashi Iwai <tiwai@suse.de>
To: Mark Brown <broonie@kernel.org>
Cc: Peter Rosin <peda@axentia.se>,
linux-kernel@vger.kernel.org, alsa-devel@alsa-project.org,
Liam Girdwood <lgirdwood@gmail.com>
Subject: Re: [alsa-devel] [PATCH] ASoC: pcm: allow changing the playback/capture rates for symmetric links
Date: Mon, 09 May 2016 14:17:21 +0200 [thread overview]
Message-ID: <s5h37prqvce.wl-tiwai@suse.de> (raw)
In-Reply-To: <20160504164922.GB6292@sirena.org.uk>
On Wed, 04 May 2016 18:49:22 +0200,
Mark Brown wrote:
>
> On Mon, May 02, 2016 at 09:43:53AM +0200, Peter Rosin wrote:
>
> > The problem is in the drain/close part. If I leave out snd_pcm_drain
> > I naturally lose the tail of the output, but if I have it I get what
> > I guess is a repeat of the content in some circular buffer. I.e. the
> > very last part of the played sound is played twice(ice).
>
> > If I instead write the generated samples to a file and play them
> > with aplay, all is fine, so I appear to be misunderstanding the
> > alsa api?
>
> > Anything obviously wrong in the above code?
>
> Look at how aplay handles this... it's a natural consequence of the
> hardware being free running. You need to either make the teardown
> non-blocking or play some silence at the end.
Right, usually the transfer is aligned with the period size, and the
application is supposed to fill the period size at least.
Takashi
prev parent reply other threads:[~2016-05-09 12:17 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-04-27 8:49 Peter Rosin
2016-04-27 16:15 ` Mark Brown
2016-04-27 20:45 ` Peter Rosin
2016-04-28 10:38 ` Mark Brown
2016-04-28 11:03 ` Takashi Iwai
2016-04-28 11:10 ` Mark Brown
2016-04-28 11:26 ` Takashi Iwai
2016-04-28 11:41 ` Mark Brown
2016-04-28 12:02 ` Takashi Iwai
2016-04-28 17:13 ` Mark Brown
2016-05-02 7:43 ` Peter Rosin
2016-05-04 16:49 ` Mark Brown
2016-05-09 12:17 ` Takashi Iwai [this message]
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=s5h37prqvce.wl-tiwai@suse.de \
--to=tiwai@suse.de \
--cc=alsa-devel@alsa-project.org \
--cc=broonie@kernel.org \
--cc=lgirdwood@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=peda@axentia.se \
/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
all inboxes | Powered by JetHome®