HTC One M9 doesn't need root, just install Boldbeast Recorder and use following settings to record calls:
- Record Mode: 1, 5, 7
- Tune Audio Route: Group3
It records calls in two directions perfectly.
Bluetooth recording is supported also, this is the only recorder that works with bluetooth devices without root.