From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754147AbcEDQth (ORCPT ); Wed, 4 May 2016 12:49:37 -0400 Received: from mezzanine.sirena.org.uk ([106.187.55.193]:50036 "EHLO mezzanine.sirena.org.uk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752032AbcEDQtg (ORCPT ); Wed, 4 May 2016 12:49:36 -0400 Date: Wed, 4 May 2016 17:49:22 +0100 From: Mark Brown To: Peter Rosin Cc: alsa-devel@alsa-project.org, Liam Girdwood , Jaroslav Kysela , Takashi Iwai , linux-kernel@vger.kernel.org Message-ID: <20160504164922.GB6292@sirena.org.uk> References: <1461746959-11443-1-git-send-email-peda@axentia.se> <20160427161504.GZ3217@sirena.org.uk> <122ca84a-230e-654e-425f-3adb0ca00ec7@axentia.se> <20160428103822.GJ3217@sirena.org.uk> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="zKD0QXBepZ0ysD7Q" Content-Disposition: inline In-Reply-To: X-Cookie: Use in well-ventilated area. User-Agent: Mutt/1.6.0 (2016-04-01) X-SA-Exim-Connect-IP: 2a01:348:6:8808:fab::3 X-SA-Exim-Mail-From: broonie@sirena.org.uk Subject: Re: [PATCH] ASoC: pcm: allow changing the playback/capture rates for symmetric links X-SA-Exim-Version: 4.2.1 (built Mon, 26 Dec 2011 16:24:06 +0000) X-SA-Exim-Scanned: Yes (on mezzanine.sirena.org.uk) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org --zKD0QXBepZ0ysD7Q Content-Type: text/plain; charset=us-ascii Content-Disposition: inline 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. --zKD0QXBepZ0ysD7Q Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iQEcBAEBCAAGBQJXKigRAAoJECTWi3JdVIfQzhQIAIQvWx3Sop7mLUHDXpuYAI5n /FKDyGJGI/TegfvF1s/KbIRsnekt2SoLqcm89vAdJZscKpUwSNT7tiUThOiSU2NR VBVporNq9t4ksemrR27jMsRfJZ3OzwqFcG1Fn24Ynh7AEiHEmBeD0lXW7ovodrnu jzIHXmEWsno3mt+lq87Komdcboz4q+AGSDoDicyCeEIHSmtRL4rMkc9k57G6COi9 P61tuDVWe43hiSd667nBx7xYMr0WyOBlU2XlCQhvtxFaFGxNdYbtRzpgLnMcVLS7 o3EqrpxewEFmOslLv+eHj3yo6L0soMwZB5+gKzGtKaCsWG1+pZD7vEJ+CSBWTdQ= =2/ia -----END PGP SIGNATURE----- --zKD0QXBepZ0ysD7Q--