All of lore.kernel.org
 help / color / mirror / Atom feed
From: Rob Duncan <rduncan@tesla.com>
To: Takashi Iwai <tiwai@suse.de>
Cc: "'alsa-devel@alsa-project.org'" <alsa-devel@alsa-project.org>
Subject: Re: Miscellaneous ioplug questions
Date: Tue, 14 Aug 2018 09:25:15 -0700	[thread overview]
Message-ID: <dw77em36vgq5jo.fsf@tesla.com> (raw)
In-Reply-To: <s5ha7pueqzk.wl-tiwai@suse.de>

Hi Takashi,

>> - Should the poll FD be made writeable as soon as data is available, or
>>   only when at least avail_min is available?
>
> The latter.  Again, ioplug emulates the hardware driver, so the poll
> should behave same as the hardware driver does.
> (Though, admittedly, not all plugin implementations follow this
> strictly....)

So, the poll FD must be readable while there is at least avail_min in
the buffer, and must NOT be readable if there is less than avail_min.
Is that right?

To labor the point a bit, if exactly avail_min becomes available the
poll FD must be made readable.  If a single frame is now transferred, so
the buffer has (avail_min - 1) available, what must the state of the
poll FD be?

A couple more questions:

If we are configured to do blocking operations must the read and write
callbacks always transfer the full requested size, or can they do
partial transfers?

On the other hand, what if we are configured to do non-blocking
operations?

Or does the caller guarantee not to request a transfer larger than what
the ioplugin reports as available?

Thanks,

Rob.

  reply	other threads:[~2018-08-14 16:25 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-08-09 18:45 Miscellaneous ioplug questions Rob Duncan
2018-08-10  5:21 ` Takashi Iwai
2018-08-14 16:25   ` Rob Duncan [this message]
2018-08-15  9:47     ` 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=dw77em36vgq5jo.fsf@tesla.com \
    --to=rduncan@tesla.com \
    --cc=alsa-devel@alsa-project.org \
    --cc=tiwai@suse.de \
    /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.