Thank you! I had a similar issue - my speakers “disappeared” after 23.11 → 24.05 upgrade (Lenovo ThinkPad T480). I couldn’t find the line in my configuration though:
boot.kernelParams = [ "snd_hda_intel.dmic_detect=0" ];
Anyway, I added the second one you mentioned:
boot.kernelParams = [ "snd-intel-dspcfg.dsp_driver=1" ];
and my builtin speakers play again!