From: Takashi Iwai <tiwai@suse.de>
To: Giuliano Pochini <pochini@shiny.it>
Cc: Jaroslav Kysela <perex@suse.cz>,
alsa-devel <alsa-devel@lists.sourceforge.net>
Subject: Re: period crossing page boundary
Date: Thu, 20 Mar 2003 11:37:58 +0100 [thread overview]
Message-ID: <s5h7kaus4qh.wl@alsa2.suse.de> (raw)
In-Reply-To: <XFMail.20030320100439.pochini@shiny.it>
At Thu, 20 Mar 2003 10:04:39 +0100 (CET),
Giuliano Pochini wrote:
>
>
> >> They are different:
> >>
> >> [aplay <no options> track.wav]
> >> Mar 19 19:21:23 localhost kernel: pcm_hw_params (bufsize=88200 periods=3
> >> persize=22052)
> >>
> >> bufsize==88200 != 3*22052 == 66156
> >
> > Note that there is no guarantee that the periods == integer value.
> > If your hardware doesn't allow to set period_size and buffer_size
> > independently (if buffer_size must be multiple of period_size) then put
> > this code to the open callback:
> >
> > if ((err = snd_pcm_hw_constraint_integer(runtime, SNDRV_PCM_HW_PARAM_PERIODS)) < 0)
> > return err;
> >
> > See alsa-kernel/pci/via82xx.c for an example.
> >
> > In other cases, runtime->buffer_size MUST BE USED.
>
>
> Ok, but how do I build the sg list when bufsize!=sz*periods ? Take
> the example above: have I to build 4 periods and let the last one
> smaller than 22052 ?
it depends on the hardware.
if you need to set up a buffer-descriptor list like via82xx, the above
h/w constraint (integer periods) will be most likely necessary.
then the buffer size will be aligned to the period size
automatically.
otherwise, you'll need to change the BD list dynamically with
different sizes.
Takashi
-------------------------------------------------------
This SF.net email is sponsored by: Tablet PC.
Does your code think in ink? You could win a Tablet PC.
Get a free Tablet PC hat just for playing. What are you waiting for?
http://ads.sourceforge.net/cgi-bin/redirect.pl?micr5043en
next prev parent reply other threads:[~2003-03-20 10:37 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2003-03-19 12:24 period crossing page boundary Giuliano Pochini
2003-03-19 17:06 ` Takashi Iwai
2003-03-19 21:06 ` Giuliano Pochini
2003-03-19 20:16 ` Jaroslav Kysela
2003-03-20 9:04 ` Giuliano Pochini
2003-03-20 10:37 ` Takashi Iwai [this message]
2003-03-20 14:13 ` Giuliano Pochini
2003-03-20 14:24 ` Jaroslav Kysela
2003-03-20 14:45 ` 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=s5h7kaus4qh.wl@alsa2.suse.de \
--to=tiwai@suse.de \
--cc=alsa-devel@lists.sourceforge.net \
--cc=perex@suse.cz \
--cc=pochini@shiny.it \
/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.