From: Takashi Iwai <tiwai@suse.de>
To: "Anders Boström" <anders@netinsight.net>
Cc: alsa-devel@alsa-project.org, 438118@bugs.debian.org
Subject: Re: [Pkg-alsa-devel] Bug#438118: alsa-utils: aplay non-blocking mode isn't working
Date: Tue, 18 Sep 2007 17:45:24 +0200 [thread overview]
Message-ID: <s5hzlzkrn8r.wl%tiwai@suse.de> (raw)
In-Reply-To: <20070918.094148.-529052212.anders@netinsight.se>
At Tue, 18 Sep 2007 09:41:48 +0200 (CEST),
Anders Boström wrote:
>
> >>>>> "TI" == Takashi Iwai <tiwai@suse.de> writes:
>
> Hi!
>
> >> Hi all,
> >>
> >> can one please have a lokk at this? aplay -N isn't working for the
> >> OP.
>
> TI> Cannot reproduce here. Could you _post_ more details?
>
> OK, I've tested more, and discovered that the problem seems to be that
> the end of the sound is cut in non-blocking mode. And if I play a very
> short sound-file, I can't hear anything. Blocking mode works fine.
>
> When using non-blocking mode, an strace contains "ioctl(4, 0x4144,
> 0x2b9f785d8000) = -1 EAGAIN (Resource temporarily
> unavailable)". Blocking mode never contains the EAGAIN response.
>
> I attach two files. When playing halt.au, I can only hear the start,
> about as much as "ha". When playing metal.au, I can't hear anything.
OK, thanks, I see the problem now.
I don't remember whether it's a feature or a bug. The drain ioctl
rejects the non-block mode.
Anyway, a simple patch is below. Let me know if it works.
Takashi
diff -r 0028e39ead78 core/pcm_native.c
--- a/core/pcm_native.c Tue Sep 18 00:52:38 2007 +0200
+++ b/core/pcm_native.c Tue Sep 18 17:44:31 2007 +0200
@@ -1368,8 +1368,6 @@ static int snd_pcm_prepare(struct snd_pc
static int snd_pcm_pre_drain_init(struct snd_pcm_substream *substream, int state)
{
- if (substream->f_flags & O_NONBLOCK)
- return -EAGAIN;
substream->runtime->trigger_master = substream;
return 0;
}
next prev parent reply other threads:[~2007-09-18 15:45 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <20070815.153103.-1470506910.anders@netinsight.se>
[not found] ` <20070815172821.GB7381@frodo.home.lxtec.de>
[not found] ` <20070816.094636.-753684517.anders@netinsight.se>
2007-09-11 16:08 ` [Pkg-alsa-devel] Bug#438118: alsa-utils: aplay non-blocking mode isn't working Elimar Riesebieter
2007-09-17 15:20 ` Takashi Iwai
2007-09-18 7:41 ` Bug#438118: [alsa-devel] " Anders Boström
2007-09-18 15:45 ` Takashi Iwai [this message]
2007-09-27 12:16 ` Anders Boström
2007-10-09 10:38 ` Takashi Iwai
2007-12-14 10:37 ` Anders Boström
2007-12-14 10:53 ` Jaroslav Kysela
2007-12-14 12:41 ` Takashi Iwai
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=s5hzlzkrn8r.wl%tiwai@suse.de \
--to=tiwai@suse.de \
--cc=438118@bugs.debian.org \
--cc=alsa-devel@alsa-project.org \
--cc=anders@netinsight.net \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox