All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Clemens Ladisch" <cladisch@fastmail.net>
To: Stefano D'Angelo <zanga.mail@gmail.com>,
	alsa-devel@lists.sourceforge.net
Subject: Re: Line6 TonePort
Date: Fri, 11 Aug 2006 19:21:53 +0200	[thread overview]
Message-ID: <1155316913.11766.268179999@webmail.messagingengine.com> (raw)
In-Reply-To: <160c13350608100919yee3fc8p14096f59aa0071f7@mail.gmail.com>

Stefano D'Angelo wrote:
> The problem is quite simple: this USB card does not support DMA transfers

No USB device supports DMA transfers.  USB devices support USB transfers.

The host controller supports DMA transfers.  Yours does, too.

> Takashi told me to use an intermediate buffer,

This is just because the buffer for a USB frame must be continguous, but
you cannot always guarantee this when you're near the end of ALSA's ring
buffer.

> but I really don't know how to do it.  Should I copy data from the
> buffer (playback) on usb transfer completition callbacks?

You should copy the data just before you submit the URB.  In other words,
yes.

> But in such case isn't it the same to just copy data into the urb's
> transfer buffer?

This is indeed the same.  The URB's transfer buffer _is_ the
intermediate buffer mentioned by Takashi.

The opposite, i.e., not using an intermediate buffer, would mean that
the URB's transfer_buffer pointed into ALSA's ring buffer.

> I tried to avoid using this buffer and what I obtain is something that
> resembles what the card should be playing but with huge noise.

How do you determine how much data to send in each USB frame?


Regards,
Clemens

-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642

  parent reply	other threads:[~2006-08-11 17:21 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-08-10 16:19 Line6 TonePort Stefano D'Angelo
2006-08-10 16:32 ` Markus Rechberger
2006-08-10 16:39   ` Stefano D'Angelo
2006-08-11 17:21 ` Clemens Ladisch [this message]
2006-08-11 20:07   ` Stefano D'Angelo
2006-08-11 23:44     ` Markus Rechberger
2006-08-14  8:46       ` Stefano D'Angelo
2006-08-14 15:22         ` Markus Rechberger
2006-08-16 20:46           ` Stefano D'Angelo

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=1155316913.11766.268179999@webmail.messagingengine.com \
    --to=cladisch@fastmail.net \
    --cc=alsa-devel@lists.sourceforge.net \
    --cc=zanga.mail@gmail.com \
    /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.