All of lore.kernel.org
 help / color / mirror / Atom feed
From: Takashi Iwai <tiwai@suse.de>
To: Vinod Koul <vkoul@kernel.org>
Cc: Daniel Baluta <daniel.baluta@gmail.com>,
	"S.j. Wang" <shengjiu.wang@nxp.com>,
	Takashi Iwai <tiwai@suse.com>,
	Linux-ALSA <alsa-devel@alsa-project.org>,
	Mark Brown <broonie@kernel.org>,
	sound-open-firmware@alsa-project.org
Subject: Re: Handling SIGTSTP (Ctrl+Z) /SIGCONT/fg with aplay/cplay
Date: Wed, 05 Jan 2022 17:54:35 +0100	[thread overview]
Message-ID: <s5h7dbei0ms.wl-tiwai@suse.de> (raw)
In-Reply-To: <YdW/v6qFoWAg8YWT@matsya>

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 <perex@perex.cz>
> 
> > 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

      reply	other threads:[~2022-01-05 16:55 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-01-05 14:31 Handling SIGTSTP (Ctrl+Z) /SIGCONT/fg with aplay/cplay Daniel Baluta
2022-01-05 15:56 ` Vinod Koul
2022-01-05 16:54   ` 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=s5h7dbei0ms.wl-tiwai@suse.de \
    --to=tiwai@suse.de \
    --cc=alsa-devel@alsa-project.org \
    --cc=broonie@kernel.org \
    --cc=daniel.baluta@gmail.com \
    --cc=shengjiu.wang@nxp.com \
    --cc=sound-open-firmware@alsa-project.org \
    --cc=tiwai@suse.com \
    --cc=vkoul@kernel.org \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.