Maybe you noticed that the sound volume on Xperia M isn't too satisfactory. Maybe, like me, you tried to raise the volume with AlsaMixer, but the issue is that the settings are temporary and you have to set the volumes everytime you want to listen some music...
So there's how you raise the volume on this phone. I tested only on the dual-SIM version, please confirm if this is working on single-SIM version, too.
1. Make sure your phone is rooted and you have a capable root file explorer (I used FX File explorer with the root plugin).
2. Navigate to /etc/snd_soc_msm and make sure that the /system partition is mounted as r/w.
3. Open snd_soc_msm_Sitar in a text editor (FX File Manager has one embeded)
4. Search for "Headphones" (including quotes). You should find something like in this image:
5. Edit the 'HPHL Volume' and 'HPHR Volume' values, from the "EnableSequence" section. For a 100% volume you shoud have something like
'HPHL Volume':1:100 'HPHR Volume':1:100
Warning: at 100% the sound is very loud and I guess you need a good pair of headphones to avoid distorsions. Play whit those values to get an optimal volume for your preferences.
This tutorial is provided as it is, I don't assume any responsability if you brick your phone during this process.