After digging around various stackexchange questions, I finally got my headset mic working on Ubuntu 21.04 kernel 5.12:
-
I checked my codec version
cat /proc/asound/card0/codec* | grep Codec
This told me Realtek ALC295. -
Then I looked through the kernel documentation page here. In the ALC22x/23x/25x/269/27x/28x/29x section it lists
dell-headset-multi
for headsets that can also be used as mic-in. -
In
/etc/modprobe.d/alsa-base.conf
I added this line at the end:
options snd-hda-intel model=dell-headset-multi
-
Then restarted the laptop, plugged in my headset and now I see headset microphone and internal microphone as audio input device options in my sound settings.