My headset speakers work perfectly when connected to laptop with a TRRS AUX cable. The microphone is detected but doesn't work. However, the laptop's internal microphone works perfectly well.
AlsaInfo: http://alsa-project.org/db/?f=96ec47301fa1b125fe19dbb13fbafd21540ff6e7
I have tried most of the suggested fixes listed here. When following the steps in this answer, I found that the codec for ALC289 is missing from kernel.org. I have a feeling that I might have to install support for the codec from external sources. But that seems far fetched.
If someone has more experience with such situations, please help me out. I will be happy to provide more system info or logs.