dev builds
themes manual
device status forums
mailing lists
IRC bugs
dev guide

Rockbox mail archive

Subject: Re: Volume handling: steps and radio

Re: Volume handling: steps and radio

From: Marcin Bukat <>
Date: Fri, 19 Jul 2013 12:47:11 +0200

> 1) Handling of steps
> With the recent rework of jhMikes, the internal representation of the
> volume changed: now the hardware drivers also work in tenth dB
> representation and this has the nasty side effect that not all values are
> valid. Consider the following example (Fuze+):
> AUDIOHW_SETTING(VOLUME, "dB", 1, 5,-580, 120, -250)
> It means the volume ranges from -58.0 dB to 12.0 dB, with default at -25.0
> dB, one digit precision and 0.5dB steps. Now consider this code in WPS
> (similarly in list and radio):
> global_settings.volume ++;
> This is clearly wrong: it should be incremented of 5 because the audio
> settings says the hardware works with steps of 5. More precisely it should
> be:
> global_settings.volume += sound_steps(SOUND_VOLUME);
> I opened a patch to fix this issue but it incomplete: it only handles the
> output volume and I'm pretty sure this issue exists for recording volumes
> as well. If you feel like checking all places where this could be wrong,
> please help me !
I hit this long time ago (when porting rb to MPIO HD200). I proposed the
same fix (but in rec) as yours. AFAIK It was rejected. Some devs stated
that low level drivers are free to use arbitrary units internally. IMO the
approach proposed is the right thing to do.

Marcin Bukat
Received on 2013-07-19

Page template was last modified "Tue Sep 7 00:00:02 2021" The Rockbox Crew -- Privacy Policy