alsa-devel.alsa-project.org archive mirror
 help / color / mirror / Atom feed
From: Andrew Eikum <aeikum@codeweavers.com>
To: Takashi Iwai <tiwai@suse.de>
Cc: Andrew Eikum <aeikum@codeweavers.com>, alsa-devel@alsa-project.org
Subject: Re: hw_params ignores ioplug's buffer size requirements
Date: Wed, 8 Aug 2012 09:51:42 -0500	[thread overview]
Message-ID: <20120808145142.GO2424@foghorn.codeweavers.com> (raw)
In-Reply-To: <s5h4noehekq.wl%tiwai@suse.de>

On Tue, Aug 07, 2012 at 06:06:13PM +0200, Takashi Iwai wrote:
> At Tue, 7 Aug 2012 09:32:11 -0500,
> Andrew Eikum wrote:
> > There is also test client, alsa-test.c, which attempts to violate
> > those hw_params restrictions, and succeeds! The eventual call to the
> > ioplug's example_hw_params() callback gets an invalid buffer_size
> > parameter (it happens to be 512).
> 
> Why is it wrong?  512 frames = 512 * 2 channel * 2 bytes-per-sample
>  = 2048 bytes.
> 
> I guess you are confused about the units passed to
> snd_pcm_hw_params_set_buffer_size_near().  It's in frames, not in
> bytes.
> 

Yeah, you're right. I should've noticed the type for that parameter.
Thanks for pointing it out, sorry for the noise.

Andrew

      reply	other threads:[~2012-08-08 14:21 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-08-07 14:32 hw_params ignores ioplug's buffer size requirements Andrew Eikum
2012-08-07 16:06 ` Takashi Iwai
2012-08-08 14:51   ` Andrew Eikum [this message]

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=20120808145142.GO2424@foghorn.codeweavers.com \
    --to=aeikum@codeweavers.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).