[alsa-devel] alsactl adds volume controls?

Jaroslav Kysela perex at perex.cz
Thu Sep 2 19:28:24 CEST 2010

On Thu, 2 Sep 2010, Clemens Ladisch wrote:

> Jaroslav Kysela wrote:
>> On Thu, 2 Sep 2010, Clemens Ladisch wrote:
>>> What is the reason for alsactl not trying to restore inactive controls?
>> Most (maybe all - need to check drivers) of inactive control values are
>> reset to the original value when they're going to the active state.
> (There are both kinds of inactive controls.)
> It wouldn't hurt to restore controls that will be reset later.
>> Maybe we need to add another flag - inactive but persistent.
> This is more or less implied by the current documentation:
> /* control does actually nothing, but may be updated */
> I'd rather add a flag for controls that will be reset by the driver,
> because this is an action that is done in addition to the 'normal'
> control behaviour.
> One could also say that inactive controls that will be reset have a
> value only as long as they are active, i.e., while inactive, there is
> no current value.  In other words, while inactive, they should be
> neither readable nor writable.  (Hmm, one could make them just readonly

Another good idea.

> to avoid problems due to unexpected error codes in mixer applications,
> but the last value that it had before becoming inactive isn't likely to
> be interesting to anyone.)

The read only value can be used with a monitoring application to set the 
original value back for a reason.


Jaroslav Kysela <perex at perex.cz>
Linux Kernel Sound Maintainer
ALSA Project, Red Hat, Inc.

More information about the Alsa-devel mailing list