CyanogenMod/android_device_samsung_galaxys2-common — pull request #4 by davidhsilaban (2013-07-08 05:35:13+00:00)
Title: Fix for headphone volume (nearer to the stock ROM behaviour)

Regarding the low volume issue I think the good way to amplify the headphone volume is to set the Headphone Playback Volume to 31 rather than changing the HP Gain into 3, as the max value for the Headphone Playback Volume is 31, not 15 as set in the xml file. This method is also used in the stock kernel actually, you can see it from AlsaMixer app available from the Market, and then make sure the phone is rooted