It is a problem of Bios and the dual system between Windows and macOS.
There are times when entering Windows, when returning to macOS the audio codec stops working. It is solved in the following way:
1. You enter the Bios and you deactivate the audio codec. Now we leave the Bios and save.
2. You turn off the PC from the power supply for at least 10 seconds.
3. Turn on the power supply, turn on the PC and enter the Bios.
4. Activate the audio codec again. Now we leave the Bios and save.
5. You turn off the PC and the source for 10 seconds again.
Now when entering macOs again, you will have sound.