All of lore.kernel.org
 help / color / mirror / Atom feed
From: Josh Haberman <joshua@haberman.com>
To: Paul Davis <paul@linuxaudiosystems.com>
Cc: jackit-devel@lists.sourceforge.net, alsa-devel@lists.sourceforge.net
Subject: Re: Re: [Jackit-devel] alsa_driver_wait -> libasound?
Date: 14 Jan 2003 11:04:52 -0800	[thread overview]
Message-ID: <1042571092.10955.142.camel@birdie> (raw)
In-Reply-To: <200301141438.h0EEcWFH028649@spider.tela.com>

On Tue, 2003-01-14 at 06:38, Paul Davis wrote:
>  [ cc'ed to alsa-devel ]
> 
> >I think I've asked something to this effect before, but is there any
> >reason why the polling portion of alsa_driver_wait should not be in
> >libasound?  It's a very complicated piece of code that performs an
> >operation that many programs are likely to want.  What if it was written
> >as a companion function to snd_pcm_wait():
> >
> >   int snd_pcm_wait_many( snd_pcm_t **handles, int num_handles,
> >                          int timeout);
> >
> >...not that JACK would have to give up its version with extra error
> >reporting and timing, but for programs with simpler needs it would be a
> >lot nicer than having to set and test all those poll conditions for all
> >of the pfds on all the handles.
> >
> >I should probably ask this on the ALSA list, but I'm more familiar with
> >the people here.  Any reason why this couldn't go into libasound?
> 
> seems like a good idea to me, although there is a small problem. the
> current snd_pcm_wait function waits till the handles is
> readable/writable, whereas the JACK code waits till the handles all
> have a certain minimum amount of data/space.

It does?  Reading the function, I cannot find where it checks to make
sure that a minimum number of frames are available.  The main loop is
while( need_capture || need_playback ), and these two conditions are
satisfied simply by having the poll() not time out on the appropriate
pfds.  Later it checks to see how many frames are available, but never
branches based on the number.

Josh


-------------------------------------------------------
This SF.NET email is sponsored by: Take your first step towards giving 
your online business a competitive advantage. Test-drive a Thawte SSL 
certificate - our easy online guide will show you how. Click here to get 
started: http://ads.sourceforge.net/cgi-bin/redirect.pl?thaw0027en

  parent reply	other threads:[~2003-01-14 19:04 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <1042530370.10960.111.camel@birdie>
2003-01-14 14:38 ` [Jackit-devel] alsa_driver_wait -> libasound? Paul Davis
2003-01-14 16:31   ` Jaroslav Kysela
2003-01-14 16:42     ` Paul Davis
2003-01-14 19:35       ` Jaroslav Kysela
2003-01-14 20:23         ` Paul Davis
2003-01-16  0:14           ` Josh Haberman
2003-01-14 18:55     ` Josh Haberman
2003-01-14 19:25       ` Jaroslav Kysela
2003-01-14 16:32   ` Takashi Iwai
2003-01-14 16:47     ` Paul Davis
2003-01-14 17:03       ` Takashi Iwai
2003-01-14 19:04   ` Josh Haberman [this message]
2003-01-14 19:20     ` Paul Davis

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=1042571092.10955.142.camel@birdie \
    --to=joshua@haberman.com \
    --cc=alsa-devel@lists.sourceforge.net \
    --cc=jackit-devel@lists.sourceforge.net \
    --cc=paul@linuxaudiosystems.com \
    /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.