From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id C10BCC433EF for ; Wed, 5 Jan 2022 16:55:40 +0000 (UTC) Received: from alsa1.perex.cz (alsa1.perex.cz [207.180.221.201]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by alsa0.perex.cz (Postfix) with ESMTPS id 730A11A90; Wed, 5 Jan 2022 17:54:48 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz 730A11A90 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1641401738; bh=l40QjUN5TVtH+DGFfYu8Iv/TfOY6Ks+x7it8yo8/09M=; h=Date:From:To:Subject:In-Reply-To:References:Cc:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From; b=n9HEGvDcnHtBdt8FoNKtTonbyaLGr1g0bVvJsjYz20CGk6wj1fH1tn/lU6cfgbYkR 2pDRX3+euo9aj/rDqFIsKyu0j6u3TSDu8LRg4B/ZL8rE0XtQX8UpTbSC1PNLGQMSHQ mGl34er2LVsxtrXlWpIjFazjij4ezVIofyfDE7BE= Received: from alsa1.perex.cz (localhost.localdomain [127.0.0.1]) by alsa1.perex.cz (Postfix) with ESMTP id C51A8F80227; Wed, 5 Jan 2022 17:54:46 +0100 (CET) Received: by alsa1.perex.cz (Postfix, from userid 50401) id 79475F8007E; Wed, 5 Jan 2022 17:54:45 +0100 (CET) Received: from smtp-out1.suse.de (smtp-out1.suse.de [195.135.220.28]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by alsa1.perex.cz (Postfix) with ESMTPS id 4A44CF8007E; Wed, 5 Jan 2022 17:54:36 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz 4A44CF8007E Authentication-Results: alsa1.perex.cz; dkim=pass (1024-bit key) header.d=suse.de header.i=@suse.de header.b="fHim+R3g"; dkim=permerror (0-bit key) header.d=suse.de header.i=@suse.de header.b="UZwnbn0z" Received: from relay2.suse.de (relay2.suse.de [149.44.160.134]) by smtp-out1.suse.de (Postfix) with ESMTP id 066F421114; Wed, 5 Jan 2022 16:54:36 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1641401676; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=ORLvyHTbDkO+rft66vIzFmVuYUCUuyoEeV/DWA7h77Y=; b=fHim+R3g/9uF1svWNsSrhkWmjBK1Rc9e3lId8ASMiZdEW7YFJCkqIklIKPuDaJEik8nVoo P2fskfsaoGMS3Fo5YesQ7bWUz4ivURDEm4gYWAdIzdSmCf+SM8e1Ij3WyiPxqDhWkkLsCb qSn/+Q7lj0KGNQ9XWfINq72K5buHDxU= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1641401676; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=ORLvyHTbDkO+rft66vIzFmVuYUCUuyoEeV/DWA7h77Y=; b=UZwnbn0zV/WYHCYS/AwL28KRF7bhskt966bzBRmrS3VjQKIbr55MqhrPru2n05wP6aKbBM tDJbSK7KAWwqRVBQ== Received: from alsa1.suse.de (alsa1.suse.de [10.160.4.42]) by relay2.suse.de (Postfix) with ESMTP id E30C2A3B83; Wed, 5 Jan 2022 16:54:35 +0000 (UTC) Date: Wed, 05 Jan 2022 17:54:35 +0100 Message-ID: From: Takashi Iwai To: Vinod Koul Subject: Re: Handling SIGTSTP (Ctrl+Z) /SIGCONT/fg with aplay/cplay In-Reply-To: References: User-Agent: Wanderlust/2.15.9 (Almost Unreal) SEMI/1.14.6 (Maruoka) FLIM/1.14.9 (=?UTF-8?B?R29qxY0=?=) APEL/10.8 Emacs/25.3 (x86_64-suse-linux-gnu) MULE/6.0 (HANACHIRUSATO) MIME-Version: 1.0 (generated by SEMI 1.14.6 - "Maruoka") Content-Type: text/plain; charset=US-ASCII Cc: Daniel Baluta , "S.j. Wang" , Takashi Iwai , Linux-ALSA , Mark Brown , sound-open-firmware@alsa-project.org X-BeenThere: alsa-devel@alsa-project.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: "Alsa-devel mailing list for ALSA developers - http://www.alsa-project.org" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: alsa-devel-bounces@alsa-project.org Sender: "Alsa-devel" On Wed, 05 Jan 2022 16:56:47 +0100, Vinod Koul wrote: > > Hi Daniel, > > On 05-01-22, 16:31, Daniel Baluta wrote: > > Hi all, > > > > Is there any quick document for handling Ctrl + Z with aplay/cplay? > > cplay does have have handler for it, patches would be welcome :) > > > I don't see this signal handled with alsa-lib or tinycompress although > > linux kernel offers PAUSE/RESUME ioctls. > > Are you sure, I checked with aplay, it seems to me work for me on Fedora > > $ aplay test.wav > Playing WAVE 'test.wav' : Signed 16 bit Little Endian, Rate 48000 Hz, Mono > ^Z > [1]+ Stopped aplay test.wav > > It did pause the file and I was able to resume it from the last > position. > > FWIW: > $ aplay --version > aplay: version 1.2.6 by Jaroslav Kysela > > > What should be the expected behavior? > > Pause the stream should be apt behaviour, unless Takashi or Jaroslav > have better ideas There is no special handling in alsa-lib or aplay program itself about this signal; it's just "paused" by the terminal, so no data is fed. And, after the resume, it deals with the standard XRUN error handling. That said, it's a sort of XRUN injection. (IIRC, someone explicitly requested to keep this "feature" in axfr, too.) Takashi