All of lore.kernel.org
 help / color / mirror / Atom feed
From: Clemens Ladisch <clemens@ladisch.de>
To: "Varadarajan, Srikanth" <srikanth.varadarajan@intel.com>
Cc: "alsa-devel@alsa-project.org" <alsa-devel@alsa-project.org>
Subject: Re: MMAP in ALSA
Date: Tue, 25 May 2010 10:55:18 +0200	[thread overview]
Message-ID: <4BFB9076.7030709@ladisch.de> (raw)
In-Reply-To: <BCF80163639E9F4296FC4B208F99BA47013899D48F@orsmsx504.amr.corp.intel.com>

Varadarajan, Srikanth wrote:
> If we have one application using the hardware through ALSA, other
> applications are unable to get access to it. So, we want to have
> PulseAudio on top and use the pulse virtual device to render audio
> through ALSA. Is this a recommended way of having multiple applications
> access one audio HW simultaneously?

Usually yes.

> Is there any other way of handling multiple applications get access to
> the same hardware?

With ALSA's dmix plugin, but this requires that the hardware supports
mmap, i.e., DMA to/from the main memory.

> Also, why are mmap and munmap operations required in ALSA?

They aren't, except for dmix.

> Right now, we do not have mmap and munmap operations exposed.
> Though the hardware constraints have "SNDRV_PCM_INFO_MMAP |
> SNDRV_PCM_INFO_MMAP_VALID" defined.

In most drivers, the buffer management, including mmap, is automatically
handled by the ALSA framework.

> If there is a close enough ALSA implementation in the current Linux
> kernel that I can lookup, please point me to that.

Close to what?  What kind of buffer does your device use, DMA in main
memory, memory-mapped device memory, or PIO?


Regards,
Clemens

      parent reply	other threads:[~2010-05-25  8:55 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-05-25  0:16 MMAP in ALSA Varadarajan, Srikanth
2010-05-25  5:35 ` pl bossart
2010-05-25  8:55 ` Clemens Ladisch [this message]

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=4BFB9076.7030709@ladisch.de \
    --to=clemens@ladisch.de \
    --cc=alsa-devel@alsa-project.org \
    --cc=srikanth.varadarajan@intel.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.