At Wed, 7 Oct 2009 14:01:51 +0800, Li Bo wrote:
On Wed, Oct 7, 2009 at 2:03 AM, Takashi Iwai tiwai@suse.de 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@gmail.com wrote:
On Tue, Oct 6, 2009 at 1:47 PM, Takashi Iwai tiwai@suse.de 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
Hm, strange. Are you sure that it's notified?
- gnome-volume-control will just ignore the access bit and display
the control as usual.
Then it's a bug of gnome-volume-control (maybe in gstreamer).
Maybe we have to backward to snd_ctl_remove implementation.
No, removing is a really bad interface. If the control notification is done properly, it's just a matter of application side.
When the control is inactive, you can't change the value, so it's anyway safe in the driver perspective.
thanks,
Takashi