Thanks to Remigio Ruberto, he shared with us following settings:
Record Mode: 1
- Tune Samsung 1: No
- Tune Samsung 2: No
- Tune Samsung 3: No
- Tune Audio Route: Group3
- Change Audio Controls: Yes
- Change Audio Driver: Yes
- Start Input Stream: Yes
These settings work great for Galaxy S4 GT-I9505 Cyanogenmod CM12 Nightly. Root is needed.