Linux Sound subsystem development
 help / color / mirror / Atom feed
From: Paco <paco@OhKeePa.Net>
To: linux-sound@vger.kernel.org
Subject: Re: SNDCTL_DSP_BUSY
Date: Fri, 22 Oct 1999 23:17:31 +0000	[thread overview]
Message-ID: <marc-linux-sound-94063531708919@msgid-missing> (raw)
In-Reply-To: <marc-linux-sound-94063085304036@msgid-missing>

On Fri, 22 Oct 1999, Jirka Hanika wrote:

> Hi,
> 
> a programming question.
> 
> I need an ioctl or some other API to find out whether the sound card 
> has completely processed the buffers.  Something exactly like 
> ioctl(SNDCTL_DSP_SYNC), but an asynchronous breed.
> I have looked at audio.c and there is no such ioctl.
> 
> The only solution known to me is to write the neutral sample (silence)
> asynchronously to the sound card until a bufferfarmfull bytes is 
> written, then ioctl(SNDCTL_DSP_RESET).  This is however ugly as 
> 12-bit FAT.
> 
> In case there is no better approach available, what would you think of a 
> new ioctl (say SNDCTL_DSP_BUSY)?
> 
> Jirka
> 


Hi, Jirka...

I'm slightly confused about what exactly it is that you want, but if you
simply want to wait for the soundcard to finish with the buffers before
your program progresses to the next stage, you can use a SNDCTL_DSP_POST.

Normally, the cards wait until the buffer is full before playing that
audio, but this will force the soundcard to play any data in the buffer,
even if the buffer is only partially filled.

Sorry if this is not the answer you are looking for, but I really wasn't
sure what the question was.

-Paco

  reply	other threads:[~1999-10-22 23:17 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1999-10-22 21:22 SNDCTL_DSP_BUSY Jirka Hanika
1999-10-22 23:17 ` Paco [this message]
1999-10-25 10:07 ` SNDCTL_DSP_BUSY Thomas Sailer

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=marc-linux-sound-94063531708919@msgid-missing \
    --to=paco@ohkeepa.net \
    --cc=linux-sound@vger.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox