[alsa-devel] snd_pcm_sw_params_set_xfer_align replacement?

Aaron J. Grier agrier at poofygoof.com
Mon Jul 21 20:31:35 CEST 2008


On Mon, Jul 21, 2008 at 10:37:09AM +0200, Clemens Ladisch wrote:
> Aaron J. Grier wrote:
> > snd_pcm_sw_params_set_xfer_align() has been deprecated but the docs
> > don't mention what it was replaced with.
> 
> There is no replacement; the transfer alignment always is one frame,
> i.e., there is none.

would it be possible for a note to be added to the documentation
explaining this?

> > I don't ever want or need partial reads and writes
> 
> You get partial reads/writes only when you ask for it (by using non-
> blocking mode) or when an error occurs.

I want non-blocking behavior (return immediately if there is no data
available), but I don't want to have to deal with partial reads.  I
figured out a workaround using snd_pcm_avail_update(), but I'm wondering
if there isn't a better way.

if I switched to using callbacks, how would I control the amount of data
passed to the callbacks now that set_xfer_align() is gone?

-- 
  Aaron J. Grier | "Not your ordinary poofy goof." | agrier at poofygoof.com


More information about the Alsa-devel mailing list