This is a small bounty - but it also shouldn't be too much work.
Basically, I'd like to improve the volume wheel daemon aTc wrote so that it uses less power and gives some more improvements.
At the moment, it regularly polls the status of the volume wheel and changes the ALSA hardware volume accordingly.
This uses quite a bit of CPU power and additionally, a hardware volume of 0% in ALSA doesn't disable audio completely.
To my knowledge, modern systems usually have a fixed hardware volume and mostly change the software volume in playback (to minimize noise, etc.) - correct me if I'm wrong.
How can that volume wheel daemon be improved? (at least in my opinion, other opinions are more than welcome)
* Poll the wheel less often while it's not being used to reduce needed CPU power. Of course, when the user turns the wheel, it should poll more often to ensure a smooth volume change. But while it's not being touched, no need to poll it as often. So once the user turns the wheel, increase polling. Then go back to slower polling if the wheel is not being touched again for 4 seconds or something like that.
* Directly change PulseAudio volume instead of ALSA volume (there should be a way to talk directly to the PulseAudio daemon...?)
* Add a configuration to the daemon where the user can set a maximum and minimum possible volume and scale the wheel accordingly (thus, adding more steps to the wheel), set the polling frequencies, etc.
Good idea? Bad idea? Let me know!
Otherwise, the bounty I set for an improved volume wheel daemon would be 200 EUR
Basically, I'd like to improve the volume wheel daemon aTc wrote so that it uses less power and gives some more improvements.
At the moment, it regularly polls the status of the volume wheel and changes the ALSA hardware volume accordingly.
This uses quite a bit of CPU power and additionally, a hardware volume of 0% in ALSA doesn't disable audio completely.
To my knowledge, modern systems usually have a fixed hardware volume and mostly change the software volume in playback (to minimize noise, etc.) - correct me if I'm wrong.
How can that volume wheel daemon be improved? (at least in my opinion, other opinions are more than welcome)
* Poll the wheel less often while it's not being used to reduce needed CPU power. Of course, when the user turns the wheel, it should poll more often to ensure a smooth volume change. But while it's not being touched, no need to poll it as often. So once the user turns the wheel, increase polling. Then go back to slower polling if the wheel is not being touched again for 4 seconds or something like that.
* Directly change PulseAudio volume instead of ALSA volume (there should be a way to talk directly to the PulseAudio daemon...?)
* Add a configuration to the daemon where the user can set a maximum and minimum possible volume and scale the wheel accordingly (thus, adding more steps to the wheel), set the polling frequencies, etc.
Good idea? Bad idea? Let me know!
Otherwise, the bounty I set for an improved volume wheel daemon would be 200 EUR