[alsa-devel] snd_device_register / snd_device_disconnect

Takashi Iwai tiwai at suse.de
Mon May 14 17:03:49 CEST 2012

At Mon, 14 May 2012 08:23:47 +1000,
Barratis wrote:
> Hi All,
> I would have a question regarding the behavior of snd_device_register.
> Currently, the register operation will only be carried out if the
> state is SNDRV_DEV_BUILD. This effectively prevents device which have
> been disconnected via snd_device_disconnect (and thus having the state
> SNDRV_DEV_DISCONNECTED) to be registered again.
> Is this a wanted behavior? If so, I can't seem to find a reason for
> this as per my testing and code reading registering a device in
> DISCONNECTED sate works just fine.

The disconnected device is disconnected.  Why it must be registered
again?  In other words, the disconnected device should be freed
eventually later.  The disconnected state is an intermediate state,
thus it's never a state ready for any use.


More information about the Alsa-devel mailing list