Alsa-Devel Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Manuel Jander <manuel.jander@mat.utfsm.cl>
To: Alsa Devel list <alsa-devel@lists.sourceforge.net>
Subject: Re: Scatter Gather
Date: Tue, 02 Mar 2004 00:09:42 -0400	[thread overview]
Message-ID: <1078200582.1446.21.camel@localhost> (raw)
In-Reply-To: <Pine.HPX.4.33n.0403010928390.5532-100000@studcom.urz.uni-halle.de>

Hi,

On Mon, 2004-03-01 at 08:52, Clemens Ladisch wrote:
> Manuel Jander wrote:
> > AFAIK, it seems that when using a scatter gather buffer, not every
> > period is located inside of a page. ...
> > The problem is that a DMA transfer can not go accross 2 different pages.
> > On Aureal hardware, even on contiguous buffers this causes all sort of
> > odd problems. Each DMA chunk must be on the same page.
> > ...
> > That means that i would have to split each period that crosses a page
> > boundary into 2 DMA chunks, with all the complications involved because
> > of irregular sizes, offsets... ARghhh!
> 
> Yes.  Every driver using SG must do this.  Look into bt87x.c or
> via82xx.c for examples.

Well, i guess in that case the period size loses any relevance in terms
of efficiency. Is there any gain if DMA chunks and period sizes are
related in any way ?

> > I could just leave the period size as a power of 2, on that way, a
> > period would never cross any page boundary, but most ALSA programs are
> > too picky to accept that kind of restrictions in most cases.
> 
> Devices like usb and ymfpci have a fixed period size, but their
> drivers emulate arbitrary period sizes.

That means that those hwparam restrictions "should not be used" ?? After
realizing that 99% of ALSA apps don't work when using them, renders them
quiet useless.

By the way, is it really really necesary that "snd_pcm_period_elapsed()"
is called exactly when one period has been playback ? Must that callback
be called for every period ?
After looking at the bt87x driver it seems that it doesn't matter after
all (is that right ?). I was thinking in calling
snd_pcm_period_elapsed() just after each page crossing, instead of
period crossing, for simplicity.

Any comments ?

Best Regards

Manuel




-------------------------------------------------------
SF.Net is sponsored by: Speed Start Your Linux Apps Now.
Build and deploy apps & Web services for Linux with
a free DVD software kit from IBM. Click Now!
http://ads.osdn.com/?ad_id=1356&alloc_id=3438&op=click

  reply	other threads:[~2004-03-02  4:09 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-02-27 18:17 Scatter Gather Manuel Jander
2004-03-01 12:52 ` Clemens Ladisch
2004-03-02  4:09   ` Manuel Jander [this message]
2004-03-02  8:00     ` Jaroslav Kysela
2004-03-02 10:16     ` Giuliano Pochini
2004-03-02 10:23       ` 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=1078200582.1446.21.camel@localhost \
    --to=manuel.jander@mat.utfsm.cl \
    --cc=alsa-devel@lists.sourceforge.net \
    /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