This doc is pretty old, but still was invaluable for actually writing a sound card driver when I was tasked to do so. Frankly, ALSA is one of the most over convoluted interfaces I've ever had the displeasure to work with when writing one.
Unfortunately, I wasn't writing a PCI driver -- I was writing an I2C/I2S driver that used the ASoC subsystem and its insane DAPM and audio routing. Most of ALSA seems to have been abandoned by its creators, and conventions are not adhered to in 99% of the routing and DAPM graphs. Since they're all stringly typed and the userland vs. the kernel naming is completely disjoint, this means that its practically a black art to get those graphs right.
Add pulseaudio's complete insanity with regard to hardware parameters and audio routing, and you have one of the most toxic development experiences of my life.
Frankly, I'm amazed anybody can get anything done with this system at all, and I'm amazed Linus hasn't ripped it all out by now. This is the one subsystem that should have been the easiest to implement and get right.
Audio on Linux is such a total shitshow that Android replaced ALSA with a total workaround called "tinyalsa" and ChromeOS replaced pulse and half of ALSA's routing behaviors with cras.
Unfortunately, I wasn't writing a PCI driver -- I was writing an I2C/I2S driver that used the ASoC subsystem and its insane DAPM and audio routing. Most of ALSA seems to have been abandoned by its creators, and conventions are not adhered to in 99% of the routing and DAPM graphs. Since they're all stringly typed and the userland vs. the kernel naming is completely disjoint, this means that its practically a black art to get those graphs right.
Add pulseaudio's complete insanity with regard to hardware parameters and audio routing, and you have one of the most toxic development experiences of my life.
Frankly, I'm amazed anybody can get anything done with this system at all, and I'm amazed Linus hasn't ripped it all out by now. This is the one subsystem that should have been the easiest to implement and get right.
Audio on Linux is such a total shitshow that Android replaced ALSA with a total workaround called "tinyalsa" and ChromeOS replaced pulse and half of ALSA's routing behaviors with cras.