[alsa-devel] Device creation order

Clemens Ladisch clemens at ladisch.de
Fri Apr 3 09:38:30 CEST 2009


Jaroslav Kysela wrote:
> Unfortunately, driver may use more complex scenarios like:
> 
> - some hardware requires additional firmware - in this case devices
>    might be created, but they are not useable until firmware is loaded

This is only true for drivers that load firmware with a hwdep device
instead of using request_firmware().  Is there any driver that has not
yet been converted?  *grep*  ... except usx2y?

> - dynamic device creation at runtime - for example we have an
>    experimental HDA driver configuration code which might change
>    the arrangement of PCM devices on request from the user space
> 
> I would suggest to wait awhile with some small timeout (0.5 sec?) for all 
> devices to get the usual static arrangement working and handle extra
> dynamic cases, too.

The current implementation of the ALSA framework guarantees that the
control device file is that latest one to be created for all the devices
created at initialization.  Any devices created later depend on some
userspace action, so a small timeout won't help in this case.

In other words:
1) When the control device file has been created, all other devices
   (that are created during sound card initialization) are available.
2) When some device file for a specific sound card is created after the
   card's control device, the sound card configuration has changed.


Best regards,
Clemens


More information about the Alsa-devel mailing list