Question Problems with proximity sensor on Xperia Mini CM9.1

Hi! I've a problem with my xperia mini with CM 9.1 and Mesa Hybrid Kernel 4.4. If i make a call and approach the phone at my head, the screen doesn't turn black.

I tested the proximity sensor with ad app and the sensor works (also in calls) only if i put the phone brutally in vertical position in front of a surface.

I tried to solve whit the help of this post, but nothing. The strange thing is that i must modify the values two times. I've two equal blocks "val cycle=0" etc.

How can i solve this problem?

Thanks in advance for the answers