On Wed, Oct 7, 2009 at 2:03 AM, Takashi Iwai <tiwai@xxxxxxx> wrote: > At Wed, 7 Oct 2009 01:42:50 +0800, > Li Bo wrote: >> >> On Tue, Oct 6, 2009 at 11:55 PM, Li Bo <liboat@xxxxxxxxx> wrote: >> > On Tue, Oct 6, 2009 at 1:47 PM, Takashi Iwai <tiwai@xxxxxxx> wrote: >> >> At Tue, 6 Oct 2009 12:44:28 +0800, >> >> Li Bo wrote: >> >>> >> >>> Hi, Takashi >> >>> When independent hp switches from >> >>> on -> off: hp volume/switch is deactivated >> >>> off -> hp volume switch is activated >> >>> These 2 actions are one-shot setup, so we put "need reboot" to remind user >> >>> that hp volume/switch update will only take effect after reboot. >> >> >> >> First off, you don't have to "reboot" at all :) >> >> >> > >> > I also want to kick that "reboot" off:) >> > >> >> And, the activation/deactivation can be done on the fly, so it's no >> >> more "one-shot" action (if implemented properly). >> >> >> >> >> >> Takashi >> >> >> > >> > You mean just act/deact on via_independent_hp_put? I'll try and update this, >> > thank you! >> > >> Sorry I don't know how to activate/deactivate on the fly. I toggle access' >> SNDRV_CTL_ELEM_ACCESS_INACTIVE bit in via_independent_hp_put, but >> in alsamixer it cannot reflect the change unless restart it. Please >> give some help. > > You simply need to notify the control elements you changed via > snd_ctl_notify(). > Then the mixer app will update the status as well. > > > Takashi > I add snd_ctl_notify after access update, but test with results that: - alsamixer (v1.0.21) will gray/de-grayed the control only after restart the application - gnome-volume-control will just ignore the access bit and display the control as usual. Maybe we have to backward to snd_ctl_remove implementation. _______________________________________________ Alsa-devel mailing list Alsa-devel@xxxxxxxxxxxxxxxx http://mailman.alsa-project.org/mailman/listinfo/alsa-devel