[alsa-devel] alsactl adds volume controls?

Jaroslav Kysela perex at perex.cz
Thu Sep 2 17:24:30 CEST 2010


On Thu, 2 Sep 2010, Clemens Ladisch wrote:

> Jaroslav Kysela wrote:
>> On Thu, 2 Sep 2010, David Henningsson wrote:
>>> Interesting. I went looking into the snd_mixer_selem_* documentation (PA
>>> uses the simple mixer interface), but I couldn't find a function for
>>> determining whether a control is user-defined or not, would you mind
>>> pointing me to it? Thanks!
>>
>> This logic is bad. We can have user-defined controls for the user space
>> drivers or daemons.
>>
>> The additional flag to mixer open functions - as proposed by Takashi - is
>> more appropriate in this case when there is a system handling the software
>> volume itself. But the question is quite same: How we can distinguish the
>> software volume control? I think that some TLV information might do this
>> job well.
>
> I think applications should not be required to distinguish software
> controls.
>
> The problem is that PA tries to use this control although it is inactive.
> The obvious solution is that this control should be marked as inactive,
> and that the softvol plugin marks it active only while actually running.

It's nice idea.

> 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. Maybe 
we need to add another flag - inactive but persistent.

 						Jaroslav

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



More information about the Alsa-devel mailing list