3 ms·
I wrote several ALSA drivers in the early 2000's. It hasn't changed much since then, but I'm not close enough to ALSA anymore at the kernel level ot offer any a
by PaulDavisThe1st 7y ago
I wrote several ALSA drivers in the early 2000's. It hasn't changed much since then, but I'm not close enough to ALSA anymore at the kernel level ot offer any advice. What I can tell you is that stuff like "Device Tree" and "Device Tree overlays" are concepts restricted to one specific class of audio interface (based on HDA and its concepts), and do not exist in any of the devices you would actually buy to function as an audio interface.
There are no "new" ALSA driver tutorials because, IIUC, ALSA hasn't really changed much in the last decade. Just like CoreAudio and the older Windows APIs (they finally have some new ones worthy of the name "audio API").
Your complaint about "why a given soundcards multichannel support only ..." is really just a reflection of the screwed up nature of HDA and its cousins. Again, if you go and actually buy a "real" multichannel soundcard, you won't run into this issue. If you're stuck with what a mobo or SoC maker gave you, then the problem is typically with the fact that they changed the h/w setup and relied on a BIOS hack to make it work.
Driver stuff is "broken" with respect to much newer device hardware, but that's hardly suprising when Android ripped out ALSA and so nobody working on mainline kernels has much motivation to make ALSA work with the sort of audio hardware that shows up in things like phones.
I do know that on very contemporary RPi systems, things like Ardour and JACK (both of which I wrote, by the way) work out of the box.
There are two primary audio "transports" as you call them today: USB, which is more or less fully and totally supported by the class compliant ALSA driver (thanks, iPads, for enforcing a "no driver" policy") and HDA-via-PCI which is technically supported but the specs allow so much wiggle room that hardware makers (not audio hardware, mobos and SoC stuff) regularly and routinely break things.
Most of your complaints seem to be centered on the HDA-via-PCI family of devices, and there's really not a lot Linux can do there. MS provides BIOS patches, Apple builds their own hardware - what's Linux supposed to do with a useless standard that is routinely ignored?
I appreciate that "i just want my laptop audio to work" is a legitimate issue (although for the most part, they just do). But that's a tiny corner of what ALSA and audio is all about, and we're badly hurt by the (non)standard HDA and all of its misfeatures (which, as I noted Apple and MS workaroudn in different ways).
- hootbootscoot 7y agoOh, I'm specifically referring to pro-audio (a Tascam 8x8 I/O, and a Presonus 1804) interfaces, that my Ubuntu 16.04 system was pretending were "surround sound" interfaces, so it's something configuration related, not ALSA/driver itself. (I'm exclusively interested in pro-audio, vs whatever the OP of this comment was concerned with) I have 2 interests with regard to this: 1) writing a driver for a home-brew soundcard with an MCU running the DAC/ADC TDM interfaces, and interfacing with the computer via SPI, as it's clock is a function of the audio sample clock running the whole shebang, and I never saw an SPI transport for ALSA in my life 2) just generally trying to get to the bottom of how linux/ALSA sees my soundcard hardware (the specific multi-channel audio interface being interpreted/configured as a surround sound interface etc.) I mentioned the Device Tree Overlays as it appears that this is how the Bela system manages it's PRU supported audio codecs in Alsa mode, but consider it a clueless comment off-topic... Thanks for writing back, I appreciate it! I'm a big Ardour fan. Jack is standard for everything in pro-audio these days, and yes, I know that you literally have spent 30 ++ years in this realm, hence my questions... By the way, when they ask for "quantizing audio" in Ardour, it's already there! I can say that the following works GREAT in Ardour: 1) strip silence function 2) snap the audio bits created by #1 to grid/quantize value.
- hootbootscoot 7y agoI guess I'm not entirely clear on what I would need to implement to use ALSA's PCM interface with an arbitrary transport, given a defined memory area and buffer size. I appear to be fuzzy on the topic of what parts I need to write and what is already provided, generally. The class-compliant USB interfaces do indeed generally "just work" (with the configuration issues I mentioned on my particular system, but I'm not clear on where this occurs, "channel mapping" or somesuch calling my 8 outputs a singular surround interface etc...)