From mboxrd@z Thu Jan 1 00:00:00 1970 From: David Henningsson Subject: Re: snd_pcm_wait function (really snd_pcm_draiin) Date: Fri, 16 Nov 2012 20:10:38 +0100 Message-ID: <50A68FAE.9010505@canonical.com> References: <50A0A3FE.4090901@tele2.nl> <50A0A709.1050307@ladisch.de> <50A6695B.6080202@tele2.nl> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii"; Format="flowed" Content-Transfer-Encoding: 7bit Return-path: Received: from youngberry.canonical.com (youngberry.canonical.com [91.189.89.112]) by alsa0.perex.cz (Postfix) with ESMTP id 43D4126171E for ; Fri, 16 Nov 2012 20:10:41 +0100 (CET) In-Reply-To: <50A6695B.6080202@tele2.nl> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: alsa-devel-bounces@alsa-project.org Sender: alsa-devel-bounces@alsa-project.org To: Enno Fennema Cc: Daniel Sanz , Trent Piepho , Clemens Ladisch , alsa-devel@alsa-project.org List-Id: alsa-devel@alsa-project.org On 11/16/2012 05:27 PM, Enno Fennema wrote: > On 11/16/12 11:41, Daniel Sanz wrote: >> Thanks, Trent, I've been playing a bit with snd_pcm_drain, >> snd_pcm_writei, blocking mode, non-blocking mode, etc. but even if I >> ... > > I wanted to play a short sound and release the pcm. It works with a > non-block drain as Clemens suggested. > > I noticed using gettimeofday() around drain() that it takes a bit over 2 > seconds. Rather long for a sound that only takes 0.1 sec. That is a known pulseaudio problem; which we also noted on PulseConf a few weeks ago. I want to do something about it but it is not on the top of my priority list right now. Are the rest of you trying with PulseAudio as well? Maybe it could be worth also trying the direct plughw path do see if the behaviour is different. -- David Henningsson, Canonical Ltd. https://launchpad.net/~diwic