From: Lennart Poettering <mznyfn@0pointer.de>
To: ALSA Development Mailing List <alsa-devel@alsa-project.org>
Subject: how is 'dir' in snd_pcm_hw_params_set_periods_near() supposed to work?
Date: Mon, 8 Sep 2008 22:28:08 +0200 [thread overview]
Message-ID: <20080908202808.GB5221@tango.0pointer.de> (raw)
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
next reply other threads:[~2008-09-08 20:28 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-09-08 20:28 Lennart Poettering [this message]
2008-09-09 8:02 ` how is 'dir' in snd_pcm_hw_params_set_periods_near() supposed to work? Clemens Ladisch
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=20080908202808.GB5221@tango.0pointer.de \
--to=mznyfn@0pointer.de \
--cc=alsa-devel@alsa-project.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 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.