Both HDA and USB audio are using a generic driver model. There is some structural similarities between the two in fact: In both cases the hardware/firmware provides an API by which the driver can explore the hardware and retrieve something like a wiring diagram. Basically, it’s a list of nodes (amplifiers, mixers, selector switches, input/output sockets, etc.) including their in/out-pins and what pin on what other node they are connected to.
Special/advanced hardware will include non-standard nodes, like filters, DTS decoders. Only the manufacturer’s driver knows how to handle them. Generic drivers can safely ignore them since manufacturers make sure those nodes are either bypassed or put in a neutral state on initialization.
The main difficulty for the generic driver is to actually set up correct signal paths by putting selector switches into correct positions, setting the gain of all amplifiers within the path to proper values and switching off mute controls. It also needs to decide which parameters of which nodes to include as parameters for what the user will see in the device’s media preference panel. Haiku requires that at least a volume control be present for output and an amplifier gain for inputs. The kernel log messages of the HDA driver give some impression of that process.
With laptops, the problem is mostly that
- they put extra nodes into the signal path for muting and
- the correct selection between headphone / speaker / line-out is more complex.
My suggestion is to have the option to have all node controls accessible in the media preferences so that the user can set up the circuit until it’s working (and hopefully save that setup).
BTW, the BParameterWeb, i.e. the software infrastructure that Haiku provides to drivers for communicating parameter settings is still way ahead of what other OSs have.