>Interesting... I briefly looked at COG (http://nedbatchelder.com/code/cog/) >when I was still in the "maintain the abstraction" stance. But it was >ultimately untenable. I can not speak to sound drivers, but for isci it >needs to inter-operate with libata, libsas/sas transport class, and the >rest of the scsi midlayer. Duplicating all those common definitions was a >big problem. Redoing work that an upper layer had already handled was >another item. General non-idiomatic expressions and code organization got >in the way...
For the driver I refer to, the majority of it is 'below' alsa midlayer, and handles the detailed interface to the hardware. There is one alsa-specific file that uses APIs provided by our shared code.
Sometimes this does get in the way, and the driver may slowly change to cut out the middle-man, but meanwhile, it is still usable.
And yes, I'm familiar with COG. We use it a bit, but not for this purpose.