This is the sample code developed during my Msc, where I created a UEFI application capable of processing sound streams at UEFI environment
Code in action can be found at 3 videos, being:
Initial tests, to check the communication with the codec using HDA Immediate Registers, and using the Codec's Beep Generator https://youtu.be/I-mgzcOnRCg
Play of a song, but due to misunderstanding the controller and codec were not configured correctly https://youtu.be/6ED2BSc89-Y
Song being played correctly at UEFI environment (This song's name is "Zero", from the brazilian heavy metal band "Dr Sin") https://youtu.be/2De9dI9WbwM
Ps .: Sorry for the bad quality videos, this will be improved in future.