All of lore.kernel.org
 help / color / mirror / Atom feed
From: Stefan Schoenleitner <dev.c0debabe@gmail.com>
To: "alsa-devel@alsa-project.org" <alsa-devel@alsa-project.org>
Subject: Re: "Resource temporarily unavailable" while reading although poll returns POLLIN event
Date: Wed, 21 Apr 2010 18:15:40 +0200	[thread overview]
Message-ID: <4BCF24AC.3000301@gmail.com> (raw)
In-Reply-To: <4BCEE140.5060704@gmail.com>

Stefan Schoenleitner wrote:
> Since a POLLIN event only occurs after at least a full period is available for
> reading (as set up by snd_pcm_sw_params_set_avail_min() above)
> and I only read after a POLLIN event occured on the capture device fd,
> I really do not understand why I get the above error.

By using snd_pcm_avail_update() I found out that polling on the PCMs
*does not work at all*.

Although I verified that avail_min is 160 frames, polling on the
capture/playback PCMs returns a POLLIN/POLLOUT event even if the number
of frames for reading/writing *is less than avail_main*.

I also tried snd_pcm_wait() which should also wait until there are at
least avail_min frames available for reading/writing.
The result is the same: snd_pcm_avail_update() shows that it returns
even if there are far less than avail_min frames available for processing.

I suspect that this is a bug in ALSA ?


cheers,
stefan

  reply	other threads:[~2010-04-21 16:15 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-04-21 11:28 "Resource temporarily unavailable" while reading although poll returns POLLIN event Stefan Schoenleitner
2010-04-21 16:15 ` Stefan Schoenleitner [this message]
2010-04-21 17:18   ` Jaroslav Kysela
2010-04-22 10:09     ` Stefan Schoenleitner
2010-04-23  4:10       ` Raymond Yau
2010-04-24  1:32       ` Raymond Yau
2010-04-24 14:38         ` Stefan Schoenleitner
2010-04-24 23:43           ` Raymond Yau
2010-04-26  7:52             ` Stefan Schoenleitner
2010-04-27  0:35               ` Raymond Yau
2010-04-26  1:46           ` Raymond Yau
2010-04-26  8:19             ` Stefan Schoenleitner
2010-04-26 11:10               ` Raymond Yau
2010-04-22  4:28   ` Raymond Yau
2010-04-22 10:49     ` Stefan Schoenleitner
2010-04-23  7:45       ` Raymond Yau
2010-04-23 11:16         ` Stefan Schoenleitner
2010-04-22  2:41 ` Raymond Yau
2010-04-22 10:15   ` Stefan Schoenleitner

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=4BCF24AC.3000301@gmail.com \
    --to=dev.c0debabe@gmail.com \
    --cc=alsa-devel@alsa-project.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.