I think it's a sort of weird problem. I got this problem too. I got skullcandy earphones. But why weird? The last time they worked was on Xperia U CM11. After upgrading to Lolipop, they doesn't work. Okay, seems like CM12.1 issue.
But I got this same issue on my Xperia Z3 Compact with stock firmware. Right after upgrade to Lolipop they stopped working. I thought I've got broken earphones or so. But on PC or few other phones they are still working.
Your answer is, that there's no solution except soundabout (or something similar)... Or try other earphones
Sent using XDA One on my D5803