Hi,
some developers probably already noted, I commited to alsactl utility (alsa-utils package) initial implementation of soundcard initialization stuff aka 'alsactl init'. The basic idea was to "reuse" nice udev configuration style and modify it to ALSA purposes. I hope that I ended up with a syntax which is easy understandable and configuration can be created with minimal effort. Please, look to 'man 7 alsactl_init' for more details and to alsa-utils/alsactl/init directory for example files. Note that the runtime evaluation of commands can be modified using environment variables like udev does. Just try 'alsactl -E CMD=help init' or 'CMD=help alsactl init'. Hardware can be detected using sysfs. For older kernel, I'm plannig to add some compatibility layer to read at least ATTR{subsystem_vendor} and ATTR{subsystem_device} information from procfs (codec files). Also, a way to gather working configurations for specific hardware is required. A nice script alsa-info.sh is already in the alsa-driver package, so I just created a simple persistent "file" dabatase on www.alsa-project.org: http://www.alsa-project.org/cardinfo-db/ and modified alsa-info.sh to use this database for the contents upload by default. Developers can download whole database in a tar package to extract necessary information using command line text tools and use this database also for other purposes (HDA codec graphing and so).
More ideas, corrections, opinions are welcome.
Jaroslav
----- Jaroslav Kysela perex@perex.cz Linux Kernel Sound Maintainer ALSA Project, Red Hat, Inc.