if (headset->ramp == TWL6040_RAMP_NONE)
                return;
 
-       /* HS PGA volumes have 4 bits of resolution to ramp */
-       for (i = 0; i <= 16; i++) {
+       /* HS PGA gain range: 0x0 - 0xf (0 - 15) */
+       for (i = 0; i < 16; i++) {
                headset_complete = twl6040_hs_ramp_step(codec,
                                                headset->left_step,
                                                headset->right_step);
        if (handsfree->ramp == TWL6040_RAMP_NONE)
                return;
 
-       /* HF PGA volumes have 5 bits of resolution to ramp */
-       for (i = 0; i <= 32; i++) {
+       /*
+        * HF PGA gain range: 0x00 - 0x1d (0 - 29) */
+       for (i = 0; i < 30; i++) {
                handsfree_complete = twl6040_hf_ramp_step(codec,
                                                handsfree->left_step,
                                                handsfree->right_step);