Ghee Teo wrote:
> Brian Cameron wrote:
>> - 6604602 - mixer applet should poll less frequently.  This patch is
>>   a bit smart and reduces the number of times we poll from 10 times
>>   a second to every 1.5 seconds.  If the mixer applet notices a change
>>   has been made, then it will update 10 times a second for 10 seconds
>>   after the last time it changes.  This way the mixer applet updates
>>   frequently when the user is actually changing the value, but doesn't
>>   update often in the normal case.
>   Update once every 1.5 seconds is still too aggressive when user is not
> using it. That is, once I log in, it just refreshes at whatever rate it 
> is even
> if I have have done nothing to the sound/mixer. I think a default on that
> would be no harm to be set to 5 seconds or more.
> 
>  From the case it has noticed a change, I think your suggestion is great!
> But I don't know/understand enough how the changes is being trigger off,
> can't make better suggestion.

What is better than polling, of course, is only waking up when there's 
been a change. The only notification mechanism I know that SunAudio 
provides is to register for a SIGPOLL signal (see the mixer man page). 
In GStreamer, this isn't a useful way to get the notifications, because 
signal handling is process-wide. In this situation though it might be 
possible to contrive to use the SIGPOLL notification, by patching the 
mixer_applet code, perhaps by detecting that the SunAudio mixer is in 
use and opening the audioctl device a 2nd time. Ugly, but possibly worth it.

What would be better yet would be if it were possible to poll() on the 
audioctl fd itself to get notifications of changes.

Jan.

> 
> I also justed noted that on my Sun Ray, I have no sound device, hence 
> the CPU
> on my mixer is none.   But on some other users on the same Sun Ray, it 
> chews up
> CPU big time, I think this is valuable bug to fix :)
> 
> ib100698  4159     1   0   Oct 04 ?          23:19 
> /usr/lib/mixer_applet2 
> --oaf-activate-iid=OAFIID:GNOME_MixerApplet_Factory --oa
> md101715 29901     1   0   Oct 09 ?          13:18 
> /usr/lib/mixer_applet2 
> --oaf-activate-iid=OAFIID:GNOME_MixerApplet_Factory --oa
> bn128650  3459     1   0   Oct 08 ?          14:54 
> /usr/lib/mixer_applet2 
> --oaf-activate-iid=OAFIID:GNOME_MixerApplet_Factory --oa
> ro23758 11051     1   0   Oct 09 ?          13:36 /usr/lib/mixer_applet2 
> --oaf-activate-iid=OAFIID:GNOME_MixerApplet_Factory --oa
> ao98105  8623     1   0   Oct 04 ?          22:40 /usr/lib/mixer_applet2 
> --oaf-activate-
> ck139935  1298     1   0   Oct 04 ?          22:32 
> /usr/lib/mixer_applet2 
> --oaf-activate-iid=OAFIID:GNOME_MixerApplet_Factory --oa
> db145136 29362     1   0   Oct 04 ?          23:01 
> /usr/lib/mixer_applet2 
> --oaf-activate-iid=OAFIID:GNOME_MixerApplet_Factory --oa
> rw209861  4681     1   0   Oct 08 ?          15:14 
> /usr/lib/mixer_applet2 
> --oaf-activate-iid=OAFIID:GNOME_MixerApplet_Factory --oa
> dermotm  4351     1   0   Oct 04 ?          22:31 /usr/lib/mixer_applet2 
> --oaf-activate-iid=OAFIID:GNOME_MixerApplet_Factory --oa
> mb23721  3077     1   0   Oct 11 ?           8:35 /usr/lib/mixer_applet2 
> --oaf-activate-iid=OAFIID:GNOME_MixerApplet_Factory --oa
> hz159841 11599     1   0   Oct 12 ?           6:08 
> /usr/lib/mixer_applet2 
> --oaf-activate-iid=OAFIID:GNOME_MixerApplet_Factory --oa
> dw100960 19477     1   0   Oct 09 ?          12:42 
> /usr/lib/mixer_applet2 
> --oaf-activate-iid=OAFIID:GNOME_MixerApplet_Factory --oa
> dm89450 22156     1   0   Oct 05 ?          21:13 /usr/lib/mixer_applet2 
> --oaf-activate-iid=OAFIID:GNOME_MixerApplet_Factory --oa
> cb114949 15143     1   0   Oct 05 ?          20:41 
> /usr/lib/mixer_applet2 
> --oaf-activate-iid=OAFIID:GNOME_MixerApplet_Factory --oa
> wt210074 21089     1   0   Oct 09 ?          13:30 
> /usr/lib/mixer_applet2 
> --oaf-activate-iid=OAFIID:GNOME_MixerApplet_Factory --oa
> cl209504 12795     1   0   Oct 09 ?          13:21 
> /usr/lib/mixer_applet2 
> --oaf-activate-iid=OAFIID:GNOME_MixerApplet_Factory --oa
> pm209982  8897     1   0   Oct 08 ?          14:49 
> /usr/lib/mixer_applet2 
> --oaf-activate-iid=OAFIID:GNOME_MixerApplet_Factory --oa
> applet on the panel.
> 
> -Ghee


Reply via email to