[pulseaudio-discuss] Device reservation improvement suggestions
David Henningsson
david.henningsson at canonical.com
Mon Oct 19 00:37:05 PDT 2015
On 2015-10-04 17:05, Zeno Endemann wrote:
> Hi,
>
> I have two suggestions how the device reservation can be improved for
> app developers wanting to have exclusive access to an alsa card:
>
> 1.
> I knew about this scheme only by accident, so I think the
> discoverability should be improved. Adding a few lines to the PA
> developer documentation site ([1]) with a link to [2] would already be
> good (it took me quite a while to even find [2]).
Good idea, added now.
> Since the most important sound server (PA and jack, right?) are using it
> and thus it having a good de facto adoption I furthermore suggest adding
> the spec to the freedesktop.org specifications page. Should I ask about
> this on the freedesktop mailing list?
>
> 2.
> The spec implies that the reservation is for a whole device (ie. alsa
> card), so I believe a well-behaving client should not touch a reserved
> alsa card in any way. But PA only uses the reservation for PCM streams,
> not for the mixer controls of the card. My suggestion is either fixing
> PA (my preference) so that it reserves the card before writing any
> changes to the mixer, or at least making it clear in the spec that the
> reservation is only for all PCM devices on the corresponding card.
I agree that PA should reserve the card before opening the mixer.
Patches welcome :-) Although you might want to synchronize with Tanu who
recently talked about closing the mixer when we lost access to it, that
sounds like something that touches similar parts of the code at least.
(Side note: I would have liked to see the device reservation protocol on
the system bus instead of the session one, but that's likely too late to
change now)
--
David Henningsson, Canonical Ltd.
https://launchpad.net/~diwic
More information about the pulseaudio-discuss
mailing list