From: Takashi Iwai <tiwai@suse.de>
To: Guilhem Tardy <guilhem_tardy@yahoo.com>
Cc: alsa-devel@lists.sourceforge.net
Subject: Re: documentation
Date: Fri, 26 Apr 2002 19:54:53 +0200 [thread overview]
Message-ID: <s5hvgaejqfm.wl@alsa2.suse.de> (raw)
In-Reply-To: <20020424193226.2349.qmail@web11503.mail.yahoo.com>
At Wed, 24 Apr 2002 12:32:26 -0700 (PDT),
Guilhem Tardy wrote:
>
> > > What is required from my part to support memory mapping from the driver
> > > to the application? Would this be supported through the OSS compatibility
> > > layer, too?
> >
> > hmm... mmap without dma?
> > how do you transfer the data on buffer to hardware?
>
> The card doesn't support DMA, yet. Data is transferred to/from the buffer by
> the driver copying 32-bit chunks. Those buffers were allocated by the MMAP,
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
> today through the V4Lv2 API (this is an audio+video card).
how do you mean here?
the allocated buffers are mmaped to user?
> > the copy and silence ops are called when write() is called (more
> > exactly on alsa it's ioctl) - the thread writing to the device does
> > actually work like DMA. on mmap mode, there is no such one. so you
> > need an extra thread (or if it's not too heavy then tasklet might be
> > available) anyway.
>
> Having checked the brief documentation you referred to
> (http://www.alsa-project.org/alsa-doc/alsa-lib/), I guess using the direct
no, i posted to alsa-devel ML, a month ago or so.
the document you read is for the user library, not for the driver.
> audio buffer to communicate with the device means DMA+MMAP. I would like to do
> the same thing, but have the driver actually copy data to/from the device. What
> do you call "mmap mode" above?
in your case, you need to copy the data on the buffer to the hw by
yourself. then what is the merit of mmap?
(well, it would be a bit more efficient than copy_from_user(), but
the advantage of copy_from_user() is that you can use non-contiguous
buffer while alsa's mmap supports, so far, only contiguous region.)
on alsa, when the program runs in the mmap mode, no read/write is
called but the data is read/written on the mmapped buffer, and the
also mmaped status is updated. during the app writes data, DMA
transfers the data from the mmaped buffer.
that is, the thread is free from the kernel mode.
> Is there any other documentation more specific to driver development?
at least i am not aware of such documents.
check alsa-devel ML archive.
Takashi
next prev parent reply other threads:[~2002-04-26 17:54 UTC|newest]
Thread overview: 52+ messages / expand[flat|nested] mbox.gz Atom feed top
2002-04-24 14:26 documentation Guilhem Tardy
2002-04-24 16:58 ` documentation Takashi Iwai
2002-04-24 19:32 ` documentation Guilhem Tardy
2002-04-26 17:54 ` Takashi Iwai [this message]
2002-05-03 16:11 ` documentation Guilhem Tardy
2002-05-03 16:22 ` documentation Paul Davis
2002-05-03 16:28 ` documentation Takashi Iwai
2002-04-25 0:05 ` more info Guilhem Tardy
2002-04-25 0:34 ` Paul Davis
-- strict thread matches above, loose matches on Subject: below --
2020-06-06 17:09 Documentation G.W. Haywood
2020-06-07 21:23 ` Documentation Pablo Neira Ayuso
2020-06-10 12:55 ` Documentation G.W. Haywood
2017-03-27 5:53 documentation Julia Lawall
2011-04-13 23:33 Documentation Eugene Shatsky
2011-04-14 4:44 ` Documentation Jonáš Vidra
2011-04-14 13:54 ` Documentation Edward Shishkin
2011-01-31 21:39 documentation Roberto Spadim
2011-01-31 21:43 ` documentation Mathias Burén
2011-01-31 21:58 ` documentation NeilBrown
2011-01-31 22:14 ` documentation Roberto Spadim
2011-02-01 9:37 ` documentation hansbkk
2011-02-01 13:49 ` documentation Roberto Spadim
2010-12-01 18:00 Documentation David Lambert
2010-12-01 18:06 ` Documentation Stefan Schmidt
2010-12-01 18:39 ` Documentation David Lambert
2010-12-01 18:54 ` Documentation Stefan Schmidt
2010-12-01 22:46 ` Documentation Robert Foerster
2010-12-02 20:37 ` Documentation David Lambert
2010-12-02 20:52 ` Documentation Robert Foerster
2010-12-03 7:35 ` Documentation Christophe Aeschlimann
2010-03-14 0:17 Documentation Giuseppe Macrì
2006-02-10 8:20 Documentation Nico -telmich- Schottelius
2005-10-24 19:05 Documentation Vagin Andrey S.
2004-06-24 17:10 Documentation Tomas Ebenlendr
2004-06-24 22:03 ` Documentation Yoshinori K. Okuji
2004-06-25 13:17 ` Documentation Jeroen Dekkers
2004-06-26 15:05 ` Documentation Yoshinori K. Okuji
2004-05-27 13:12 Documentation Alexander E. Patrakov
2004-05-28 23:25 ` Documentation Greg KH
2004-06-02 6:11 ` Documentation Niko Sauer
2004-05-15 14:28 Documentation Jody
2004-05-17 13:35 ` Documentation Andrey Romanenko
2004-05-17 13:40 ` Documentation Miguel Bolanos
2003-06-06 13:20 Documentation Matthew Wilcox
2002-08-29 9:39 documentation vandana mehtani
2002-08-29 15:46 ` documentation Dave Wilhardt
2002-03-22 15:32 Documentation Gopakumar.C.E
2002-03-30 7:42 ` Documentation Ralf Baechle
2002-02-02 9:18 Documentation Guillaume Chamberland-Larose
2002-02-02 10:39 ` Documentation Yven J. Leist
2002-02-05 18:18 ` Documentation Randy.Dunlap
2001-11-15 18:03 Documentation war
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=s5hvgaejqfm.wl@alsa2.suse.de \
--to=tiwai@suse.de \
--cc=alsa-devel@lists.sourceforge.net \
--cc=guilhem_tardy@yahoo.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.