Volume controls

"Marco Trevisan (Treviño)" mail at 3v1n0.net
Thu Nov 27 01:55:02 CET 2008

Tick Chen wrote:
> Hi List, 
>   I created a patch that makes user can control their call volume via a
> slidebar when calling.
> It's uses AT+CLVL controling the call volume.  According to 
> http://doc.trolltech.com/qtextended4.4/qphoneprofile.html#setVolume
> the valid range is 0~5, and the volume degree maping to TI Calypso volume range
> 0~255 equally. 
> By current the volume default is 3 of 0~5, and TI calypso default is 177 of
> 0~255. It will be switched and  follow the setting in QPhoneProfile. ie
> AT+CLVL=153. I tested and found it's okay for me. The volume is loud
> enough for me, and people on the other side of call does not complains at all. :-) 
> Maybe other device need to switch to a larger value.
> Users can control the default volume by using QPhoneProfile, and
> PhoneSettings. Or edit /opt/Qtopia/etc/default/Trolltech/PhoneProfile.conf directly.
> If there are no other issues, I will commit it tomorrow.

Well, I've tested this implementation but there's something of bugged.
In fact you use the Qtopia PhoneProfile "Volume" setting as the earphone
setting, while that value is mainly used by Qtopia for the ringtone volume!

So if you try to place a call with this code when your phone is in the
"Vibrate Only" or "Silent" profile, as soon as the call starts, it gets

As a workaround I've actually changed the callscreen.cpp file to use
only if the currentProfile.volume() is not 0, but I guess that we should
have a better implementation adding the support to "callvolume" to
QPhoneProfileManager. The implementation should be really easy, but I
had not time to write a patch to attach here... :(

Ehm, then why in vendor_ficgta01.cpp currentVolumeLevel is set to 3 at
the beginning and then to 153 (that i figure is 255*3/5)? I figure that
the first line should be removed (not only because it is ignored, but
also because in the next git commit the currentVolumeLevel is changed to
4, and maybe this should imply the update of currentVolumeLevel from 153
to 204 [= 255*4/5]; isn't it?)


Treviño's World - Life and Linux

More information about the devel mailing list