Microphone of the headset isn't detected

I have a Lenovo IdeaPad S145 laptop running Fedora 38. Recently, I bought a headset that under Windows works correctly, then I know it isn’t a hardware problem.

However, its microphone isn’t detected. pavucontrol says the headset microphone is disconnected (even though it isn’t) and, indeed, all the audio capture seems to be coming from the laptop’s microphone. GNOME also detects when I plug in the headset and asks me whether it’s a headphone or a headset, but still does not work.

The audio codec on my machine is ALC236:

$ grep Codec /proc/asound/card*/codec*             
/proc/asound/card1/codec#0:Codec: ATI R6xx HDMI
/proc/asound/card2/codec#0:Codec: Realtek ALC236

I’ve tried tinkering with hda-jack-retask and with module options for the snd-hda-intel module (as recommended e.g. here), but it does not help.

What else can I try?