you can find pin IDs in ALSA data
alsa-info.sh
or use hdajacksenseetest
sudo hdajacksensetest --card=0
But it might not possible to resolve this problem using hdajackretask
if the headset jack connection is not compatible
Headsets from mobile phones and other devices can be wired to one of two standards
- CTIA - Apple, HTC, latest Nokia, latest Samsung, Jolla, Sony, Microsoft and most Android phones
- OMTP - Older Nokia & Samsung, Motorola, Sony Ericsson, Huawei, LG
A headphone adaptors that swaps the microphone connections might be needed to connect headset to laptop combined input jack
The laptop manual might confirm in specifications if the jack socket uses OMTP or CTIA standard, but I have only seen it mentioned in manuals for older Lenovo laptops