how is 'dir' in snd_pcm_hw_params_set_periods_near() supposed to work?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Heya!

How is the 'dir' argument in snd_pcm_hw_params_set_periods_near()
supposed to work?

I'd assume that passing dir=1 would mean that it is looked for a
number of periods that is greater *or equal* to what we request. If we
pass dir=-1 we'd be looking for a number of periods that is smaller
*or equal* to what we request. 

However, what I am experiencing is that there is no "or equal". On my
softvol on hda setup here if I ask for 5 periods I will always get 6
if I pass dir=1 -- even if the could give me 5 and will give me five
if I pass dir=0.

The docs don't really elaborate on this much. 

I'd certainly think that having ">=" and "<=" here is much more useful
and natural than ">" and "<", and hence I was wondering: is this just
a bug in the software or is it really intended to be this way?

Lennart

-- 
Lennart Poettering                        Red Hat, Inc.
lennart [at] poettering [dot] net         ICQ# 11060553
http://0pointer.net/lennart/           GnuPG 0x1A015CC4
_______________________________________________
Alsa-devel mailing list
Alsa-devel@xxxxxxxxxxxxxxxx
http://mailman.alsa-project.org/mailman/listinfo/alsa-devel

[Index of Archives]     [ALSA User]     [Linux Audio Users]     [Kernel Archive]     [Asterisk PBX]     [Photo Sharing]     [Linux Sound]     [Video 4 Linux]     [Gimp]     [Yosemite News]

  Powered by Linux