[alsa-devel] Exclusive access to capture device

Sean McNamara smcnam at gmail.com
Sun Jun 24 22:31:19 CEST 2012


If you open a hardware device that doesn't have hardware mixing, it's
*always* exclusive access. But the driver can support hardware mixing
for sound cards that supply it, which makes it non-exclusive.

Also, if you open a soft device that has software mixing, such as the
pulseaudio plugin or dsnoop, it won't be exclusive.

Hopefully you aren't writing a desktop application, because distros
and users generally abhor the notion of an application "hogging" the
sound device for any reason, and would prefer that all access be
non-exclusive. But if you're coding for an embedded device, then I can
understand this approach.

Then again, if you're working in the embedded space, you have full
control over the entire software and hardware stack, right? So make
sure that the device you open, e.g. hw:0 or whatever, is a driver that
doesn't support hardware mixing. Problem solved; your access is



On Sun, Jun 24, 2012 at 4:17 PM, Guy Rutenberg <guyrutenberg at gmail.com> wrote:
> Hi,
> Is there a way to open a capture device exclusively? E.g. I want to capture
> audio and be sure no other application can capture from that device at the
> same time.
> I've went through the API and searched the mailing list and haven't found a
> way to do so.
> Thanks a lot,
> Guy
> ----
> http://www.guyrutenberg.com/
> _______________________________________________
> Alsa-devel mailing list
> Alsa-devel at alsa-project.org
> http://mailman.alsa-project.org/mailman/listinfo/alsa-devel

More information about the Alsa-devel mailing list