2010/9/25 Sebastian H. vand2@gmx.de
snd_mixer_selem_is_active() has been ignored so far since I wasn't sure what it really meant.
Seems the proper way to handle and *inactive* element is to hide the slider/switch/enum widgets completely. Alternatively they could be greyed out. But showing dead widgets would probably just distract users and waste screen space.
Btw. I'm still working on a alsamixer-qt4. There've been just so many changes in the background that it takes some time to stabilize everything again. And there're still open issues (mostly QT stuff). So I would estimate two or three more weeks for a new release.
Seem I have quoted a wrong example
Refer to patch_via.c , when "Independent Headphone" switch is on/off, In via_independent_hp_put() function call activate_ctl() which set the "Headphone Playback volume" and "Headphone Playback switch" controls to active/inactive
This mean that the controls are only temporary inactive and can become active again the driver also call snd_ctl_notify(codec->bus->card, SNDRV_CTL_EVENT_MASK_VALUE, &ctl->id)
Does it mean that the mixer application receive an event about the change of the active/inactive state of the control ?