From: Takashi Iwai Subject: Re: [BUG] snd_pcm_drop() does not stop the PCM immediately Date: Wed, 14 Mar 2018 16:13:51 +0100 Message-ID: References: <32cead2b-d2fc-485f-70e9-e528bc2fe63e@gmail.com> Mime-Version: 1.0 (generated by SEMI 1.14.6 - "Maruoka") Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from mx2.suse.de (mx2.suse.de [195.135.220.15]) by alsa0.perex.cz (Postfix) with ESMTP id 5D0652670F8 for ; Wed, 14 Mar 2018 16:13:52 +0100 (CET) In-Reply-To: <32cead2b-d2fc-485f-70e9-e528bc2fe63e@gmail.com> 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: Martin Schreiber Cc: alsa-devel@alsa-project.org List-Id: alsa-devel@alsa-project.org On Wed, 14 Mar 2018 15:59:07 +0100, Martin Schreiber wrote: > > Hi, > The documentation states: > " > This function stops the PCM immediately. The pending samples on the > buffer are ignored. > " > This does not work for the device "sysdefault" where a piece of the old > sound and the new sound overlap, see attached alsadrop1.c testprogram. > It is OK with the "default" device which is wired over Pulseaudio, > uncomment alsadrop1.c:55 in order to test. > The project is here: > https://gitlab.com/mseide-msegui/mseuniverse/tree/master/testcase/audio/c/alsadrop > > Environment: openSUSE Leap 42.3, see attached alsa-info.tar.gz. It's a best-effort base stopping mechanism with dmix, so it's a sort of expected behavior, unfortunately. Due to its nature of implementation, scratching off the existing data from the mixed buffer isn't so trivial for now. Takashi