# HG changeset patch # User Mychaela Falconia # Date 1627714826 0 # Node ID f59d2577df2ddc7a5de19c95a86ac28dd4aaf196 # Parent 754be25cd6a03d54de1ee87f73990bb461ab3868 pirelli/volume-ctrl: captured VBDCTRL for all levels in all modes diff -r 754be25cd6a0 -r f59d2577df2d pirelli/volume-ctrl --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/pirelli/volume-ctrl Sat Jul 31 07:00:26 2021 +0000 @@ -0,0 +1,55 @@ +Pirelli's fw offers 10 audio output volume levels selectable via volume up/down +keys. Cycling through these volume levels on the idle screen and reading out +Iota VBDCTRL register (fc-tmsh abbr 0 6) at each level yields the following +table: + +Volume level VBDCTRL Vol PGA Total +----------------------------------------------------- +1 047 -18 +1 -17 +2 04A -18 +4 -14 +3 006 -12 0 -12 +4 008 -12 +2 -10 +5 00A -12 +4 -8 +6 067 -6 +1 -5 +7 06A -6 +4 -2 +8 026 0 0 0 +9 028 0 +2 +2 +10 02A 0 +4 +4 + +In an active call in handheld (earpiece output) mode, the above relation of +selectable volume level to VBDCTRL remains the same. However, when the +loudspeaker is turned on in a call, the mapping changes to the following: + +Volume level VBDCTRL Vol PGA Total +----------------------------------------------------- +1 046 -18 0 -18 +2 049 -18 +3 -15 +3 005 -12 -1 -13 +4 007 -12 +1 -11 +5 009 -12 +3 -9 +6 066 -6 0 -6 +7 069 -6 +3 -3 +8 025 0 -1 -1 +9 027 0 +1 +1 +10 029 0 +3 +3 + +Plugging in Pirelli's wired headset and cycling through volume levels on the +idle screen, we get this: + +Volume level VBDCTRL Vol PGA Total +----------------------------------------------------- +1 045 -18 -1 -19 +2 048 -18 +2 -16 +3 004 -12 -2 -14 +4 006 -12 0 -12 +5 008 -12 +2 -10 +6 065 -6 -1 -7 +7 068 -6 +2 -4 +8 024 0 -2 -2 +9 026 0 0 0 +10 028 0 +2 +2 + +In-call state in headset mode follows the same mapping as headset mode idle +screen. If the user turns on the loudspeaker while in a call with the headset +inserted, the volume table becomes that of the loudspeaker mode, not the +headset mode.