I'm currently writing an OS (in rust of all things) and its going well so far, though I've ran into some hard-to-solve quandaries.
My OS currently has no audio driver, and while that's fine and all I'd like to at least get some kind of sound working. Right now I'm using QEMU tied to a serial port to stdio to build and read the output from my OS (since I'm visually impaired), however I'd love to get some actual noise. I've tried the PC speaker method over at https://wiki.osdev.org/PC_Speaker, but didn't get anything, even after programming the RTC and using that as my central timing subsystem. Next I tried the SB16, but I'm having issues with interrupts (my interrupt handlers are placed in a single file, and I doubt its safe to change IDT entries after I've loaded the IDT, since I'd then need to reload it again). So now I'm trying to get HDA working with even something as simple as a beep without interrupt handling. My OS detects the audio controller:
My question is, how do I actually configure it for audio playback? The wiki article was extremely vague and confusing, and searching the web to try and find something (bar the HdA spec itself) yielded nothing other than stuff that already required an existing OS to run, which wouldn't help. Reading the HDA spec is possible, but my PDF reader renders figures and tables in a way that's hard to interpret as a table (and tends to throw rows and columns all over the place).PCI: probe: found Intel Corporation 82801FB/FBM/FR/FW/FRW (ICH6 Family) High Definition Audio Controller (Multimedia controller)
I've tried looking through the Linux kernel code, as I thought that might be helpful, but it turned out not to be helpful this time.
Edit: updated and modified my issues paragraph and added the one above this one.