[alsa-devel] [PATCH] Softvol: Allow per process volume control.

Takashi Sakamoto o-takashi at sakamocchi.jp
Wed Jul 15 17:46:25 CEST 2015


Hi,

On Jul 15 2015 20:03, Takashi Iwai wrote:
> Also, removal of the ctl element is voluntarily done, that is, if a
> program aborts in the middle, it leaves the ctl element.  If we want
> the implementation with the user-space ctl element, it'd be better to
> have a support in kernel side to manage the life cycle of ctl element
> more safely.

I'm interested in this idea about the life cycle of ctl elements added
by userspace applications. (Of cource, interested in per-process volume
control for dmix PCM plugins, itself. Sorry to start another discussion
in this thread...)

My headache is 'struct snd_kcontrol.owner'. In kernel land, this member
is used to distinguish whether the control element is locked or not,
against its name.

This implementation cannot allows control elements to keep PID which has
added the control element. If a control element has lost the PID, snd
module cannot release it when a process with the PID closes ALSA ctl
character device.

Well, if adding members for owner's PID and lock state, and keep enough
backward-compatibility to userspace, we can achieve the idea, I think.


Regards

Takashi Sakamoto


More information about the Alsa-devel mailing list