[pulseaudio-discuss] Why doesn't mixer control (values) have some kind of locking mechanism? (mutex?)
o-takashi at sakamocchi.jp
Thu Aug 6 17:47:08 UTC 2020
On Thu, Aug 06, 2020 at 10:30:36AM -0500, Pierre-Louis Bossart wrote:
> What I was trying to describe in my earlier answer is a different need to
> have an atomic update of *multiple* controls.
> If e.g. a DSP or hardware engine exposes two separate filters for left and
> right channels, and the coefficients for those filters are modified with
> separate controls, it would be really nice to have the capability of writing
> these controls separately, but have a 'commit' mechanism so that these
> updated coefficients are used at the same time by the left and right
For the pair of left and right filters, the simplest solution is to unify
the two control elements into single one, as you know. The array of
two values can be passed to your driver by single system call and
ALSA control core surely calls driver code under lock acquisition
against any operation for control element.
The other options are case-by-case. At least, you need to describe each
detail for better discussion.
More information about the pulseaudio-discuss