In QEMU 4 or higher you can no longer use the normal "-soundhw ac97" flag and it is much more complicated but here is a simple copy and paste on Linux that will just work:
-audiodev you have to use -audiodev to specify the driver and id
-device you have to specify the same audiodev id you used in -audiodev and driver
-audiodev driver=pa,id=pa1 -device AC97,audiodev=pa1
Below creates the audio device based off of your host's pulse audio driver and an id that is "pa1" the -device AC97 is the AC97 hardware that the guest gets and the audiodev (device) is the same one we specified earlier with id "pa1".