From: Clemens Ladisch <clemens@ladisch.de>
To: Prasant J <pj0585@gmail.com>
Cc: alsa-devel@alsa-project.org
Subject: Re: ASoC: mmap or read/write?
Date: Thu, 18 Oct 2012 11:09:38 +0200 [thread overview]
Message-ID: <507FC752.1050005@ladisch.de> (raw)
In-Reply-To: <CAA2DH4uhwV0NmxEbLKN=m+VC9ruOHM13Vpu1m33j0DNm+n6yKQ@mail.gmail.com>
Prasant J wrote:
> I'm writing an alsa application for recording & playing 16 channel audio.
>
> The application is intended to run on an embedded platform & the
> resources are highly constrained.
Then I wonder how you manage to handle 16 channels.
What hardware is this?
> My application is not performing well with read/write methods.
How much CPU usage?
> Does the mmap method has any advantages over read/write?
No, except when then samples are generated in/consumed from the
device's buffer directly without copying them around, and even then
it's unlikely that the time needed for copying actually matters.
> Is there any thumb rule to decide when to use mmap or read/write?
Yes; use read/write.
Regards,
Clemens
next prev parent reply other threads:[~2012-10-18 9:10 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-10-18 8:38 ASoC: mmap or read/write? Prasant J
2012-10-18 9:09 ` Clemens Ladisch [this message]
2012-10-18 9:37 ` Prasant J
2012-10-18 14:32 ` Clemens Ladisch
[not found] <mailman.1.1350554402.30975.alsa-devel@alsa-project.org>
2012-10-19 6:33 ` Mike Looijmans
2012-10-19 8:58 ` Clemens Ladisch
2012-10-19 9:36 ` Prasant J
2012-10-19 9:56 ` Mike Looijmans
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=507FC752.1050005@ladisch.de \
--to=clemens@ladisch.de \
--cc=alsa-devel@alsa-project.org \
--cc=pj0585@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.